Index | Rundeck: P1SoM40 | Created: Mon May 20 03:30:12 EDT 2024 |
DD2D_UTILS | File: dd2d_utils.f |
Author : M. Kelley
Version: 1.0
Usage:
Access is through the following types/interfaces. Below, grid is an instance of the dist_grid derived type, and the optional argument jdim indicates which array index corresponds to the last distributed dimension (usually, j). If jdim is not specified, it is assumed to be 2. dist_grid: a derived type containing domain decomp info, initialized by calling subroutine init_dist_grid( & npx,npy,ntiles, ! x,y size of tile and # of tiles & is,ie,js,je, ! start, end of local i,j domain & isd,ied,jsd,jed, ! start, end of local data domain (not used) & grid) ntiles = 1 for a latlon layout, and 6 for a cubed sphere layout NOTE: all arguments save for grid are inputs - this routine does NOT decide the domain decomposition is,ie,js,je! halo_update(grid,array,jdim) fills the halo cells of array with the appropriate values from neighboring PEs. The depth of the halo is inferred by comparing the dimension sizes of array to the start,end info in grid. For a latlon grid, no halos are performed in the I direction. For the cubed-sphere layout, the current implementation requires npx=npy and an N x N layout of PEs on each face. pack_data(grid,local_array,global_array,jdim) gathers local arrays into a global array on root unpack_data(grid,global_array,local_array,jdim) scatters a global array on root into local arrays If global_array has the same rank as local_array, the gather/scatter operations are over the local tile. Each tile has a root PE with a valid copy of global_array. If the rank of global_array = 1 + rank of local_array, the gather/scatter operations are over all tiles. The last index of global_array is the tile index in this case. globalsum(grid,local_arr,arrsum,all) calculates the global sum of distributed array local_arr and stores the result in arrsum; the result is independent of the number of PEs. If all=.true., all PEs receive the result. Currently only implemented for real*8 local_arr(i,j). pack_row(grid,local_array,row_array_1d,jdim) unpack_row(grid,row_array_1d,local_array,jdim) These routines are like pack_data/unpack_data, but only gather/scatter to/from one PE for each "row" of PEs. For now, the row array with the contents of all PEs in the row is 1D since it is only used for I/O. Dimensioned versions of row_array will be added soon.
Subroutines:
- alloc_gs_wksp
- alloc_gs_wksp_default
- do_2d
- do_2d
- do_2d
- do_2d
- do_2d
- do_2d
- do_3d
- do_3d
- do_3d
- do_3d
- do_3d
- do_3d
- do_4d
- do_4d
- do_4d
- do_4d
- do_4d
- do_4d
- do_5d
- do_5d
- do_5d
- do_5d
- do_5d
- do_5d
- get_nlnk
- get_nlnk_2d
- get_nlnk_3d
- get_nlnk_4d
- get_nlnk_5d
- init_dist_grid
- isinlocalsubdomain
- on_ullr
- pack_data
- swap_int
- unpack_data
Global Variables:
- hidden_type : used from hidden_mod
- lookup_pet :
- index of PET for a given J
- nkmax :
integer, parameter
- Initial Value
= 100
- buf1d_local :
real*8, dimension(:), allocatable
- buf1d_tile :
real*8, dimension(:), allocatable
- bufij_tile :
real*8, dimension(:), allocatable
- bufsend :
real*8, dimension(:), allocatable
- bufrecv :
real*8, dimension(:), allocatable
- reallocatebufsend :
logical
- buf1d_local_size :
integer
- Initial Value
= -1
- buf1d_tile_size :
integer
- Initial Value
= -1
- bufij_tile_size :
integer
- Initial Value
= -1
- communicator_ :
integer