Well because of parallelism, you need to use loop structure in ROMS according to the C-grid type. In ROMS, all the horizontal array dimensions
(LBi:UBi,LBj:UBj) are the same for all arrays to facilitate parallelization. Some of the elements are never used (U- and V-type variables). For example, a RHO-type variable interior point values are assigned using the following loop structure and horizontal computational indices
(Istr:Iend,Jstr:Jend):
Code: Select all
DO j=Jstr,Jend
DO i=Istr,Iend
...
END DO
END DO
Notice that
(LBi:UBi,LBj:UBj) and
(Istr:Iend,Jstr:Jend) are not the same
The former has local (global) values in distributed-memory (serial and shared-memory) applications. There is a difference between global and private variables. In private variables, we need to follow the rules of parallelism for ghost-points. In some cases vales are needed for
i-1,
i+1,
j-1, and
j+1 operations. Now, there is also the issue of land/sea masking. Notice that almost all the executable code is pretty much in F77 with a F90 superstructure. Therefore, advanced F90/F95 syntax is not used. This syntax performs differently in various compilers.
The command for array operation
c = a*b is illegal in any of adjoint-based codes.
A good guideline is to check any of the ROMS kernel routines and follow the few roules. Notice that we have a special continuation roules:
Code: Select all
CALL omega_tile (ng, tile, &
& LBi, UBi, LBj, UBj, &
& ...)