orog_mask_tools  1.12.0
 All Data Structures Files Functions Variables Pages
cs_nb Module Reference

Data Types

type  nb_gp_idx
 Neighboring cell descriptor. More...
 
type  nb_tile_idx
 Neighboring tile descriptor. More...
 

Public Member Functions

INTEGER function bndry (i, j)
 Get boundary type from indices for global grid. More...
 
INTEGER function bndry_reg (i, j)
 Get boundary type from indices for regional grid. More...
 
subroutine idx_init (cres_in)
 Initialize inter-panel neighbor index for global grid. More...
 
subroutine idx_init_reg (xres_in, yres_in)
 Initialize resolution module variables for regional grid. More...
 
subroutine neighbors (tile, i, j, nb)
 Get neighbors of cell 'c' at (tile, i, j) for global grid. More...
 
subroutine neighbors_reg (i, j, nb)
 Get neighbors of cell 'c' at (tile, i, j) for regional grid. More...
 

Data Fields

integer cres
 Cubed sphere resolution. More...
 
type(nb_tile_idx), dimension(4, 6) nb_tile
 Descriptor for each edge of each tile on the cubed sphere. More...
 
integer xres
 x resolution of regional grid More...
 
integer yres
 y resolution of regional grid More...
 

Detailed Description

Definition at line 7 of file nb.F90.


Data Type Documentation

type cs_nb::nb_gp_idx

Neighboring cell descriptor.

Definition at line 17 of file nb.F90.

Data Fields
integer gp_type Cell boundary type from bndry function.
integer, dimension(3, 8) ijt Neighboring cell indices.
type cs_nb::nb_tile_idx

Neighboring tile descriptor.

Definition at line 11 of file nb.F90.

Data Fields
character(1) nb_tile_bndry Neighbor tile boundary (l)eft, (r)ight, (t)op, (b)ottom.
integer nb_tile_num Neighbor tile number (1..6)

Member Function/Subroutine Documentation

INTEGER function cs_nb::bndry ( integer  i,
integer  j 
)

Get boundary type from indices for global grid.

Parameters
[in]icell index
[in]jcell index
Returns
bndry cell boundary type
Author
Ning Wang

Definition at line 106 of file nb.F90.

Referenced by neighbors().

INTEGER function cs_nb::bndry_reg ( integer  i,
integer  j 
)

Get boundary type from indices for regional grid.

Parameters
[in]icell index
[in]jcell index
Returns
cell boundary type
Author
Ning Wang

Definition at line 140 of file nb.F90.

Referenced by neighbors_reg().

subroutine cs_nb::idx_init ( integer  cres_in)

Initialize inter-panel neighbor index for global grid.

Parameters
[in]cres_incubed sphere resolution (48, 96...)
   _______1_______
  |               |       1-upper, 2-bottom, 3-left, 4-right 
  |               |
  |               |
 3|               |4
  |               |
  |               |
  |_______________|
          2
      Figure 1. Boundary numbers
Author
Ning Wang

Definition at line 48 of file nb.F90.

Referenced by inland_mask(), and neighbors_reg().

subroutine cs_nb::idx_init_reg ( integer, intent(in)  xres_in,
integer, intent(in)  yres_in 
)

Initialize resolution module variables for regional grid.

Parameters
[in]xres_inx resolution
[in]yres_iny resolution
Author
Ning Wang

Definition at line 91 of file nb.F90.

Referenced by inland_mask().

subroutine cs_nb::neighbors ( integer  tile,
integer  i,
integer  j,
type(nb_gp_idx nb 
)

Get neighbors of cell 'c' at (tile, i, j) for global grid.

     ______________
    |    |    |    |              ________
    | 5  | 1  | 6  |             /\ 1 \ 6 
    |____|____|____|            /  \___\___
    |    |    |    |           /\2 / c / 3 /
    | 2  | c  | 3  |          /  \/___/___/
    |____|____|____|          \7 / 4 / 8 /
    |    |    |    |           \/___/___/
    | 7  | 4  | 8  |       
    |____|____|____|    
  
 Figure 2.  Eight neighbors of cell 'c' and special cases at upper left
 cornner of the tile
Parameters
[in]tiletile face
[in]icell index
[in]jcell index
[out]nbneighbors
Author
Ning Wang

Definition at line 192 of file nb.F90.

References bndry().

Referenced by mark_global_inland_rec_d(), and neighbors_reg().

subroutine cs_nb::neighbors_reg ( integer  i,
integer  j,
type(nb_gp_idx nb 
)

Get neighbors of cell 'c' at (tile, i, j) for regional grid.

Parameters
[in]icell index
[in]jcell index
[out]nbneighbors
Author
Ning Wang

Definition at line 393 of file nb.F90.

References bndry_reg(), idx_init(), and neighbors().

Referenced by mark_regional_inland_rec_d().

Field Documentation

integer cs_nb::cres

Cubed sphere resolution.

Definition at line 24 of file nb.F90.

type(nb_tile_idx), dimension(4,6) cs_nb::nb_tile

Descriptor for each edge of each tile on the cubed sphere.

Definition at line 22 of file nb.F90.

integer cs_nb::xres

x resolution of regional grid

Definition at line 25 of file nb.F90.

integer cs_nb::yres

y resolution of regional grid

Definition at line 26 of file nb.F90.


The documentation for this module was generated from the following file: