chgres_cube
1.12.0
|
Sets up the ESMF grid objects for the input data grid and target FV3 grid. More...
Public Member Functions | |
subroutine, public | cleanup_input_target_grid_data |
Deallocate all esmf grid objects. More... | |
subroutine, public | define_input_grid (localpet, npets) |
Driver routine to setup the esmf grid object for the input grid. More... | |
subroutine | define_input_grid_gaussian (npets) |
Define grid object for input data on global gaussian grids. More... | |
subroutine | define_input_grid_grib2 (npets) |
Define input grid object for grib2 input data. More... | |
subroutine | define_input_grid_mosaic (localpet, npets) |
Define input grid for tiled data using the 'mosaic', 'grid' and orography files. More... | |
subroutine, public | define_target_grid (localpet, npets) |
Setup the esmf grid object for the target grid. More... | |
subroutine | get_model_latlons (mosaic_file, orog_dir, num_tiles, tile, i_tile, j_tile, ip1_tile, jp1_tile, latitude, latitude_s, latitude_w, longitude, longitude_s, longitude_w) |
Read model lat/lons for a single tile from the "grid" specificaton file. More... | |
subroutine | get_model_mask_terrain (orog_file, idim, jdim, mask, terrain) |
Read the model land mask and terrain for a single tile from the orography file. More... | |
Data Fields | |
integer, public | i_input |
i-dimension of input grid (or of each global tile) More... | |
integer, public | i_target |
i dimension of each global tile, or of a nest, target grid. More... | |
type(esmf_grid), public | input_grid |
input grid esmf grid object More... | |
character(len=50), public | input_grid_type = "latlon" |
map projection of input grid More... | |
integer, public | ip1_input |
i_input plus 1 More... | |
integer, public | ip1_target |
ip1_target plus 1 More... | |
integer, public | j_input |
j-dimension of input grid (or of each global tile) More... | |
integer, public | j_target |
j dimension of each global tile, or of a nest, target grid. More... | |
integer, public | jp1_input |
j_input plus 1 More... | |
integer, public | jp1_target |
jp1_target plus 1 More... | |
type(esmf_field), public | landmask_target_grid |
land mask target grid - '1' land; '0' non-land More... | |
type(esmf_field), public | latitude_input_grid |
latitude of grid center, input grid More... | |
type(esmf_field), public | latitude_s_input_grid |
latitude of 'south' edge of grid box, input grid More... | |
type(esmf_field), public | latitude_s_target_grid |
latitude of 'south' edge of grid box, target grid More... | |
type(esmf_field), public | latitude_target_grid |
latitude of grid center, target grid More... | |
type(esmf_field), public | latitude_w_input_grid |
latitude of 'west' edge of grid box, input grid More... | |
type(esmf_field), public | latitude_w_target_grid |
latitude of 'west' edge of grid box, target grid More... | |
type(esmf_field), public | longitude_input_grid |
longitude of grid center, input grid More... | |
type(esmf_field), public | longitude_s_input_grid |
longitude of 'south' edge of grid box, input grid More... | |
type(esmf_field), public | longitude_s_target_grid |
longitude of 'south' edge of grid box, target grid More... | |
type(esmf_field), public | longitude_target_grid |
longitude of grid center, target grid More... | |
type(esmf_field), public | longitude_w_input_grid |
longitude of 'west' edge of grid box, input grid More... | |
type(esmf_field), public | longitude_w_target_grid |
longitude of 'west' edge of grid box, target grid More... | |
integer, public | lsoil_target = 4 |
Number of soil layers, target grid. More... | |
integer, public | num_tiles_input_grid |
Number of tiles, input grid. More... | |
integer, public | num_tiles_target_grid |
Number of tiles, target grid. More... | |
type(esmf_field), public | seamask_target_grid |
sea mask target grid - '1' non-land; '0' land More... | |
type(esmf_grid), public | target_grid |
target grid esmf grid object. More... | |
type(esmf_field), public | terrain_target_grid |
terrain height target grid More... | |
character(len=5), dimension(:), allocatable, public | tiles_target_grid |
Tile names of target grid. More... | |
Private Member Functions | |
subroutine | gdt_to_gds (igdtnum, igdstmpl, igdtlen, kgds, ni, nj, res) |
Convert the GRIB2 grid description template to to the GRIB1 grid description section. More... | |
Sets up the ESMF grid objects for the input data grid and target FV3 grid.
Definition at line 9 of file model_grid.F90.
subroutine, public model_grid::cleanup_input_target_grid_data | ( | ) |
Deallocate all esmf grid objects.
Definition at line 1393 of file model_grid.F90.
Referenced by chgres().
subroutine, public model_grid::define_input_grid | ( | integer, intent(in) | localpet, |
integer, intent(in) | npets | ||
) |
Driver routine to setup the esmf grid object for the input grid.
If the input source is tiled fv3 restart or history data, the grid is created by reading the mosaic and grid files. If the input source is fv3 global gaussian nemsio, spectral gfs global gaussian nemsio, or spectral gfs global gaussian sigio/sfcio, the grid is setup by computing lat/lons using the sp library.
[in] | localpet | ESMF local persistent execution thread |
[in] | npets | Number of persistent execution threads |
Definition at line 116 of file model_grid.F90.
References define_input_grid_gaussian(), define_input_grid_grib2(), and define_input_grid_mosaic().
Referenced by chgres().
subroutine model_grid::define_input_grid_gaussian | ( | integer, intent(in) | npets | ) |
Define grid object for input data on global gaussian grids.
Recognized file formats:
[in] | npets | Number of persistent execution threads. |
Definition at line 147 of file model_grid.F90.
References utilities::error_handler(), and utilities::netcdf_err().
Referenced by define_input_grid().
subroutine model_grid::define_input_grid_grib2 | ( | integer, intent(in) | npets | ) |
Define input grid object for grib2 input data.
[in] | npets | Number of persistent execution threads |
Definition at line 614 of file model_grid.F90.
References utilities::error_handler(), and gdt_to_gds().
Referenced by define_input_grid().
subroutine model_grid::define_input_grid_mosaic | ( | integer, intent(in) | localpet, |
integer, intent(in) | npets | ||
) |
Define input grid for tiled data using the 'mosaic', 'grid' and orography files.
localpet | ESMF local persistent execution thread |
npets | Total number of persistent execution threads |
Definition at line 401 of file model_grid.F90.
References utilities::error_handler(), get_model_latlons(), and utilities::netcdf_err().
Referenced by define_input_grid().
subroutine, public model_grid::define_target_grid | ( | integer, intent(in) | localpet, |
integer, intent(in) | npets | ||
) |
Setup the esmf grid object for the target grid.
[in] | localpet | ESMF local persistent execution thread |
[in] | npets | Number of persistent execution threads |
Definition at line 887 of file model_grid.F90.
References utilities::error_handler(), get_model_latlons(), get_model_mask_terrain(), and utilities::netcdf_err().
Referenced by chgres().
|
private |
Convert the GRIB2 grid description template to to the GRIB1 grid description section.
[in] | igdtnum | GRIB2 grid description template number. |
[in] | igdstmpl | Length of grib2 grid description template. |
[in] | igdtlen | Array of GRIB2 grid description template octets. |
[out] | kgds | Array of GRIB1 grid description octets. |
[out] | ni | I-dimension of grid. |
[out] | nj | J-dimension of grid. |
[out] | res | Resolution of grid in km. |
Definition at line 1448 of file model_grid.F90.
References utilities::error_handler().
Referenced by define_input_grid_grib2().
subroutine model_grid::get_model_latlons | ( | character(len=*), intent(in) | mosaic_file, |
character(len=*), intent(in) | orog_dir, | ||
integer, intent(in) | num_tiles, | ||
integer, intent(in) | tile, | ||
integer, intent(in) | i_tile, | ||
integer, intent(in) | j_tile, | ||
integer, intent(in) | ip1_tile, | ||
integer, intent(in) | jp1_tile, | ||
real(esmf_kind_r8), dimension(i_tile, j_tile), intent(out) | latitude, | ||
real(esmf_kind_r8), dimension(i_tile, jp1_tile), intent(out) | latitude_s, | ||
real(esmf_kind_r8), dimension(ip1_tile, j_tile), intent(out) | latitude_w, | ||
real(esmf_kind_r8), dimension(i_tile, j_tile), intent(out) | longitude, | ||
real(esmf_kind_r8), dimension(i_tile, jp1_tile), intent(out) | longitude_s, | ||
real(esmf_kind_r8), dimension(ip1_tile, j_tile), intent(out) | longitude_w | ||
) |
Read model lat/lons for a single tile from the "grid" specificaton file.
[in] | mosaic_file | The mosaic file associated with the 'grid' files. |
[in] | orog_dir | Directory containing the 'grid' and orography files. |
[in] | num_tiles | Total number of tiles |
[in] | tile | Tile number to be read |
[in] | i_tile | "i" dimension of the tile |
[in] | j_tile | "j" dimension of the tile |
[in] | ip1_tile | "i" dimension of the tile plus 1 |
[in] | jp1_tile | "j" dimension of the tile plus 1 |
[out] | latitude | grid box center latitude |
[out] | latitude_s | latitude of 'south' edge of grid box |
[out] | latitude_w | latitude of 'west' edge of grid box |
[out] | longitude | grid box center longitude |
[out] | longitude_s | longitude of 'south' edge of grid box |
[out] | longitude_w | longitude of 'west' edge of grid box |
Definition at line 1175 of file model_grid.F90.
References utilities::error_handler(), and utilities::netcdf_err().
Referenced by define_input_grid_mosaic(), and define_target_grid().
subroutine model_grid::get_model_mask_terrain | ( | character(len=*), intent(in) | orog_file, |
integer, intent(in) | idim, | ||
integer, intent(in) | jdim, | ||
integer(esmf_kind_i8), dimension(idim,jdim), intent(out) | mask, | ||
real(esmf_kind_i8), dimension(idim,jdim), intent(out) | terrain | ||
) |
Read the model land mask and terrain for a single tile from the orography file.
[in] | orog_file | Path/name of orography file |
[in] | idim | "i" dimension of tile |
[in] | jdim | "j" dimension of tile |
[out] | mask | land mask of tile |
[out] | terrain | terrain height of tile |
Definition at line 1326 of file model_grid.F90.
References utilities::error_handler(), and utilities::netcdf_err().
Referenced by define_target_grid().
integer, public model_grid::i_input |
i-dimension of input grid (or of each global tile)
Definition at line 27 of file model_grid.F90.
integer, public model_grid::i_target |
i dimension of each global tile, or of a nest, target grid.
Definition at line 37 of file model_grid.F90.
type(esmf_grid), public model_grid::input_grid |
input grid esmf grid object
Definition at line 52 of file model_grid.F90.
character(len=50), public model_grid::input_grid_type = "latlon" |
map projection of input grid
Definition at line 21 of file model_grid.F90.
integer, public model_grid::ip1_input |
i_input plus 1
Definition at line 33 of file model_grid.F90.
integer, public model_grid::ip1_target |
ip1_target plus 1
Definition at line 43 of file model_grid.F90.
integer, public model_grid::j_input |
j-dimension of input grid (or of each global tile)
Definition at line 30 of file model_grid.F90.
integer, public model_grid::j_target |
j dimension of each global tile, or of a nest, target grid.
Definition at line 40 of file model_grid.F90.
integer, public model_grid::jp1_input |
j_input plus 1
Definition at line 35 of file model_grid.F90.
integer, public model_grid::jp1_target |
jp1_target plus 1
Definition at line 45 of file model_grid.F90.
type(esmf_field), public model_grid::landmask_target_grid |
land mask target grid - '1' land; '0' non-land
Definition at line 74 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_input_grid |
latitude of grid center, input grid
Definition at line 57 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_s_input_grid |
latitude of 'south' edge of grid box, input grid
Definition at line 61 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_s_target_grid |
latitude of 'south' edge of grid box, target grid
Definition at line 79 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_target_grid |
latitude of grid center, target grid
Definition at line 77 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_w_input_grid |
latitude of 'west' edge of grid box, input grid
Definition at line 67 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_w_target_grid |
latitude of 'west' edge of grid box, target grid
Definition at line 82 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_input_grid |
longitude of grid center, input grid
Definition at line 59 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_s_input_grid |
longitude of 'south' edge of grid box, input grid
Definition at line 64 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_s_target_grid |
longitude of 'south' edge of grid box, target grid
Definition at line 87 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_target_grid |
longitude of grid center, target grid
Definition at line 85 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_w_input_grid |
longitude of 'west' edge of grid box, input grid
Definition at line 70 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_w_target_grid |
longitude of 'west' edge of grid box, target grid
Definition at line 90 of file model_grid.F90.
integer, public model_grid::lsoil_target = 4 |
Number of soil layers, target grid.
Definition at line 25 of file model_grid.F90.
integer, public model_grid::num_tiles_input_grid |
Number of tiles, input grid.
Definition at line 47 of file model_grid.F90.
integer, public model_grid::num_tiles_target_grid |
Number of tiles, target grid.
Definition at line 49 of file model_grid.F90.
type(esmf_field), public model_grid::seamask_target_grid |
sea mask target grid - '1' non-land; '0' land
Definition at line 93 of file model_grid.F90.
type(esmf_grid), public model_grid::target_grid |
target grid esmf grid object.
Definition at line 54 of file model_grid.F90.
type(esmf_field), public model_grid::terrain_target_grid |
terrain height target grid
Definition at line 96 of file model_grid.F90.
character(len=5), dimension(:), allocatable, public model_grid::tiles_target_grid |
Tile names of target grid.
Definition at line 19 of file model_grid.F90.