hgrid_mod Generate horizontal grid. The horizontal grid can be conventional lon-lat spherical grid or a reprojected rotated tripolar grid (R. Murray, "Explicit generation of orthogonal grids for ocean models", 1996, J.Comp.Phys., v. 126, p. 251-273.).
Ni,j +----------+-----------+Ci,j | | | | | | + +Ti,j +Ei,j | | | | +----------+-----------+The grid_spec file would contains all of the following information on each subgrid. The following example is for T subgrid. Repeated for E, C, and N subgrids.
x_T, y_T = Geographic location of T-cell center x_vert_T, y_vert_T = Geographic location of T-cell vertices(each cell has 4 vertices) area_T = area of T-cell angle_T = Angle clockwise between logical and geographic east of T-cell ds_00_02_T = Length of western face of T-cell ds_20_22_T = Length of eastern face of T-cell ds_02_22_T = Length of northern face of T-cell ds_00_20_T = Length of southern face of T-cell ds_00_01_T = Distance from southwest corner to western face center of T-cell ds_01_02_T = Distance from northwest corner to western face center of T-cell ds_02_12_T = Distance from northwest corner to northern face center of T-cell ds_12_22_T = Distance from northeast corner to northern face center of T-cell ds_21_22_T = Distance from northeast corner to eastern face center of T-cell ds_20_21_T = Distance from southeast corner to eastern face center of T-cell ds_10_20_T = Distance from southeast corner to southern face center of T-cell ds_00_10_T = Distance from southwest corner to southern face center of T-cell ds_01_11_T = Distance from center to western face of T-cell ds_11_12_T = Distance from center to northern face of T-cell ds_11_21_T = Distance from center to eastern face of T-cell ds_10_11_T = Distance from center to southern face of T-cell ds_01_21_T = width of T-cell ds_10_12_T = height of T-cell Distances between points are described in the following schematics (for T-cell). +<----ds_02_12_T---->+<----ds_12_22_T---->+ ^ ^ ^ | | | | | | ds_01_02_T ds_11_12_T ds_21_22_T | | | | | | v v v +<----ds_01_11_T---->+<----ds_11_21_T---->+ ^ ^ ^ | | | | | | ds_00_01_T ds_10_11_T ds_20_21_T | | | | | | v v v +<----ds_00_10_T---->+<----ds_10_20_T---->+ <-------------- ds_02_22_T----------------> ^ +--------------------+--------------------+ ^ | | ^ | | | | | | | | | | | | | | | | | | | | | | ds_00_02_T|<-------------------+--ds_01_21_T------->| ds_20_22_T | | | | | | | ds_10_12_T | | | | | | | | | | | | | | | | | | | v | | v +--------------------+--------------------+ v <-------------- ds_00_20_T----------------> The other three subgrids (E, N, C subgrids) have similiar name but replacing T. Axis specifications involve specifying the number of regions for varying resolution, the bondaries of said regions and the nominal resolution in the respective regions. For instance, for longitude axis specification: dx_lon(1) = 4 dx_lon(2) = 6 |<----|----|----|----|----|----|------|------|------|------|------|------>| | | | x_lon(1) x_lon(2) x_lon(3) Grid cells are constructed such that dxt(i) = 0.5*(dxu(i-1)+dxu(i))
mpp_mod
mpp_io_mod
mpp_domains_mod
fms_mod
constants_mod
axis_utils_mod
grids_type_mod
grids_util_mod
call hgrid_init ( )
call generate_hgrid (Hgrid)
Hgrid | A derived-type variable that contains horizontal grid information. [hgrid_data_type] |
call write_hgrid_data (unit,Hgrid)
unit | The unit corresponding the output netcdf file. Always is returned by mpp_open. [integer] |
Hgrid | A derived-type variable that contains horizontal grid information. [hgrid_data_type] |
call write_hgrid_meta (unit, Hgrid, axis_x, axis_y)
unit | The unit corresponding the output netcdf file. Always is returned by mpp_open. [integer] |
Hgrid | A derived-type variable that contains horizontal grid information. [hgrid_data_type] |
axis_x, axis_y | axis of T-cell center [type(axistype), optional] |
call hgrid_end ( Hgrid )
Hgrid | A derived-type variable that contains horizontal grid information. [hgrid_data_type] |