Four new variables are introduced in tile.h to set the size of the private storage arrays for each nested grid:
Code: Select all
!
! Set horizontal starting and ending indices for automatic private storage
! arrays.
!
IminS=BOUNDS(ng)%Istr(tile)-3
ImaxS=BOUNDS(ng)%Iend(tile)+3
JminS=BOUNDS(ng)%Jstr(tile)-3
JmaxS=BOUNDS(ng)%Jend(tile)+3
Code: Select all
CALL xxxxx_tile (ng, tile, &
& LBi, UBi, LBj, UBj, &
& IminS, ImaxS, JminS, JmaxS, &
& ...)
Code: Select all
#define PRIVATE_1D_SCRATCH_ARRAY IminS:ImaxS
#define PRIVATE_2D_SCRATCH_ARRAY IminS:ImaxS,JminS:JmaxS
Warning:
If you added additional routines to the model or have customized analytical (ana_xxx.h) routines that require private storage, you need to add the new four arguments:
Code: Select all
#include "tile.h"
CALL my_routine_tile (ng, tile, &
& LBi, UBi, LBj, UBj, &
& IminS, ImaxS, JminS, JmaxS, & ! <= insert
& ...)
END SUBROUTINE my_routine
SUBROUTINE my_routine_tile (ng, tile, &
& LBi, UBi, LBj, UBj, &
& IminS, ImaxS, JminS, JmaxS, & ! <= insert
& ...)
...
integer, intent(in) :: ng, tile
integer, intent(in) :: LBi, UBi, LBj, UBj
integer, intent(in) :: IminS, ImaxS, JminS, JmaxS ! <= insert
END SUBROUTINE my_routine_tile
Notice that the following ROMS routines do not required these four additional arguments:
- bc_r2d_tile, bc_u2d_tile, and bc_u3d_tile
- bc_r3d_tile, bc_u3d_tile, bc_u3d_tile, and bc_w3d_tile
- exchange_p2d_tile, exchange_r2d_tile, exchange_u2d_tile, and exchange_v2d_tile
- exchange_p3d_tile, exchange_r3d_tile, exchange_u3d_tile, exchange_v3d_tile, and exchange_w3d_tile
- mp_exchange2d, mp_exchange3d, and mp_exchange4d
Good luck