sfc_climo_gen  1.13.0
model_grid Module Reference

This module defines the model grid. More...

Functions/Subroutines

subroutine, public define_model_grid (localpet, npets)
 Define model grid. More...
 
subroutine get_model_info (orog_file, mask, land_frac, lat2d, lon2d, idim, jdim)
 Get model information. More...
 
subroutine, public model_grid_cleanup
 Model grid cleanup. More...
 

Variables

type(esmf_field), public data_field_mdl
 ESMF field object that holds the data interpolated to model grid. More...
 
type(esmf_grid), public grid_mdl
 ESMF grid object for the model grid. More...
 
character(len=5), dimension(:), allocatable, public grid_tiles
 Array of model grid tile names. More...
 
integer, public i_mdl
 i dimension of model tile. More...
 
integer, public ij_mdl
 Total number of points on a model tile. More...
 
integer, public j_mdl
 j dimension of model tile. More...
 
type(esmf_field), public land_frac_field_mdl
 ESMF field object that holds the model land fraction. More...
 
type(esmf_field), public latitude_field_mdl
 ESMF field object that holds the model grid latitude. More...
 
type(esmf_field), public longitude_field_mdl
 ESMF field object that holds the model grid longitude. More...
 
type(esmf_field), public mask_field_mdl
 ESMF field object that holds the model land mask. More...
 
real(kind=4), public missing = -999.
 Value assigned to undefined points (i.e., ocean points for a land field). More...
 
integer, public num_tiles
 Total number of model grid tiles. More...
 
type(esmf_field), public vegt_field_mdl
 ESMF field object that holds the vegetation type on the model grid. More...
 

Detailed Description

This module defines the model grid.

Variables named with '_mdl' refer to the model grid.

Author
George Gayno
Date
2018

Function/Subroutine Documentation

◆ define_model_grid()

subroutine, public model_grid::define_model_grid ( integer, intent(in)  localpet,
integer, intent(in)  npets 
)

Define model grid.

Define the model grid from the mosaic and orography files. Create the ESMF grid object for the model grid.

Parameters
[in]localpetthis mpi task
[in]npetstotal number of mpi tasks
Author
George Gayno
Date
2018

Definition at line 62 of file model_grid.F90.

References data_field_mdl, utils::error_handler(), program_setup::fract_vegsoil_type, get_model_info(), grid_mdl, grid_tiles, i_mdl, ij_mdl, j_mdl, land_frac_field_mdl, latitude_field_mdl, longitude_field_mdl, mask_field_mdl, program_setup::mosaic_file_mdl, utils::netcdf_err(), num_tiles, program_setup::orog_dir_mdl, program_setup::orog_files_mdl, and vegt_field_mdl.

Referenced by driver().

◆ get_model_info()

subroutine model_grid::get_model_info ( character(len=*), intent(in)  orog_file,
integer(esmf_kind_i4), dimension(idim,jdim), intent(out)  mask,
real(esmf_kind_r4), dimension(idim,jdim), intent(out)  land_frac,
real(esmf_kind_r4), dimension(idim,jdim), intent(out)  lat2d,
real(esmf_kind_r4), dimension(idim,jdim), intent(out)  lon2d,
integer, intent(in)  idim,
integer, intent(in)  jdim 
)

Get model information.

Read model land/sea mask, land fraction and lat/lon from the orography file.

Parameters
[in]orog_filethe orography file
[out]maskland/sea mask 0-all non-land; 1-some land.
[out]land_fracland fraction between 0 and 1.
[out]lat2dlatitude
[out]lon2dlongitude
[in]idimi dimension of the model tile
[in]jdimj dimension of the model tile
Author
George Gayno
Date
2018

Definition at line 312 of file model_grid.F90.

References utils::error_handler(), and utils::netcdf_err().

Referenced by define_model_grid().

◆ model_grid_cleanup()

subroutine, public model_grid::model_grid_cleanup ( )

Model grid cleanup.

Free up memory associated with this module.

Author
George Gayno
Date
2018

Definition at line 424 of file model_grid.F90.

References data_field_mdl, grid_mdl, land_frac_field_mdl, latitude_field_mdl, longitude_field_mdl, mask_field_mdl, and vegt_field_mdl.

Referenced by driver().

Variable Documentation

◆ data_field_mdl

type(esmf_field), public model_grid::data_field_mdl

ESMF field object that holds the data interpolated to model grid.

Definition at line 29 of file model_grid.F90.

Referenced by define_model_grid(), interp(), and model_grid_cleanup().

◆ grid_mdl

type(esmf_grid), public model_grid::grid_mdl

ESMF grid object for the model grid.

Definition at line 28 of file model_grid.F90.

Referenced by define_model_grid(), interp_frac_cats(), and model_grid_cleanup().

◆ grid_tiles

character(len=5), dimension(:), allocatable, public model_grid::grid_tiles

Array of model grid tile names.

Definition at line 18 of file model_grid.F90.

Referenced by define_model_grid(), output(), and output_frac_cats::output_driver().

◆ i_mdl

integer, public model_grid::i_mdl

i dimension of model tile.

Definition at line 20 of file model_grid.F90.

Referenced by define_model_grid(), interp(), and interp_frac_cats().

◆ ij_mdl

integer, public model_grid::ij_mdl

Total number of points on a model tile.

Definition at line 22 of file model_grid.F90.

Referenced by define_model_grid().

◆ j_mdl

integer, public model_grid::j_mdl

j dimension of model tile.

Definition at line 21 of file model_grid.F90.

Referenced by define_model_grid(), interp(), and interp_frac_cats().

◆ land_frac_field_mdl

type(esmf_field), public model_grid::land_frac_field_mdl

ESMF field object that holds the model land fraction.

When running with fractional grids, will be between zero and one. For non- fractional grids, will contain a fill value.

Definition at line 31 of file model_grid.F90.

Referenced by define_model_grid(), interp_frac_cats(), and model_grid_cleanup().

◆ latitude_field_mdl

type(esmf_field), public model_grid::latitude_field_mdl

ESMF field object that holds the model grid latitude.

Definition at line 41 of file model_grid.F90.

Referenced by define_model_grid(), interp(), interp_frac_cats(), and model_grid_cleanup().

◆ longitude_field_mdl

type(esmf_field), public model_grid::longitude_field_mdl

ESMF field object that holds the model grid longitude.

Definition at line 43 of file model_grid.F90.

Referenced by define_model_grid(), interp(), interp_frac_cats(), and model_grid_cleanup().

◆ mask_field_mdl

type(esmf_field), public model_grid::mask_field_mdl

ESMF field object that holds the model land mask.

Equal to '1' if point is partial or all land. Equal to zero is point is all non-land.

Definition at line 37 of file model_grid.F90.

Referenced by define_model_grid(), interp(), interp_frac_cats(), and model_grid_cleanup().

◆ missing

real(kind=4), public model_grid::missing = -999.

Value assigned to undefined points (i.e., ocean points for a land field).

Definition at line 25 of file model_grid.F90.

Referenced by interp(), and output().

◆ num_tiles

integer, public model_grid::num_tiles

Total number of model grid tiles.

Definition at line 23 of file model_grid.F90.

Referenced by define_model_grid(), interp(), and interp_frac_cats().

◆ vegt_field_mdl

type(esmf_field), public model_grid::vegt_field_mdl

ESMF field object that holds the vegetation type on the model grid.

Definition at line 45 of file model_grid.F90.

Referenced by define_model_grid(), interp(), and model_grid_cleanup().