WRF driver layer routine: module_tiles: set_tiles examples

There are two forms of the set_tiles subroutine. The first, shown in examples 1-3, takes 9 arguments and is used to specify an interior region of a domain. This is done by specifying the domain indices (ids, ide, jds, jde) of the extent of the region to be tiled. Note that the tile boundaries do not change within the interior; rather set_tiles removes the appropriate cells from the tiles containing parts of the boundary.  The number of tiles used (in this case, 4) is determined by the namelist or the environment. This form of set_tiles can also be used to specify computation out onto the patch halo (last four arguments; no examples shown on this page).

The second form of the set_tiles subroutine takes 6 arguments, and is used to specify a computation that only occurs on the boundaries (examples 4-6). The second through fifth arguments are the domain indices of the extent of the region and the sixth argument is the number of cells in the boundary to be computed. Note that this form of set_tiles always uses four tiles.

Set tiles returns the number of tiles as grid%num_tiles. The ranges for the tiles are returned in the integer arrays grid%i_start, grid%i_end, grid%j_start, and grid%j_end, each of which is dimensioned with grid%num_tiles elements.

All of the examples below assume the grid is decomposed over a single patch; however, the algorithm will work properly for multiple patches. The colors in the diagrams below represent tile number (indicated in legend for each plot).

1. Set tiles to cover entire domain

CALL set_tiles ( grid , ids , ide , jds , jde , ips , ipe , jps , jpe )

legend: blue = tile 0, blue-green = tile 1, yellow-green = tile 2, red = tile 3

2. Set tiles to cover interior of mass points except 1-boundary

CALL set_tiles ( grid , ids+1 , ide-2 , jds+1 , jde-2 , ips , ipe , jps , jpe )

legend: light-blue = tile 0, yellow-green = tile 1, orange(ish) = tile 2, red = tile 3

3. Set tiles to cover interior 2-boundary on E/S and 1 boundary N/W

CALL set_tiles ( grid , ids+2 , ide-1 , jds+2 , jde-1 , ips , ipe , jps , jpe )

legend: light-blue = tile 0, yellow-green = tile 1, orange(ish) = tile 2, red = tile 3

4. Set tiles to compute only the 1-boundary

 CALL set_tiles ( grid , ids , ide , jds , jde , 1 )

legend: light-blue = tile 0, yellow-green = tile 1, orange(ish) = tile 2, red = tile 3

5. Set tiles to compute only the 2-boundary

 CALL set_tiles ( grid , ids , ide , jds , jde , 2 )

legend: light-blue = tile 0, yellow-green = tile 1, orange(ish) = tile 2, red = tile 3

6. Set tiles to compute 2-boundary on mass grid

CALL set_tiles ( grid , ids , ide-1 , jds , jde-1 , 2 )

legend: light-blue = tile 0, yellow-green = tile 1, orange(ish) = tile 2, red = tile 3
 


Created September 8, 2000
John Michalakes
michalak@ucar.edu