chgres_cube
1.4.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 (localpet, npets) |
Define grid object for input data on global gaussian grids. More... | |
subroutine | define_input_grid_gfs_grib2 (localpet, npets) |
Define input grid object for GFS grib2 data. More... | |
subroutine | define_input_grid_grib2 (localpet, npets) |
Define input grid object for non-GFS grib2 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_cell_corners (latitude, longitude, latitude_sw, longitude_sw, dx, clb, cub) |
For grids with equal cell sizes (e.g., lambert conformal), get latitude and longitude of the grid cell corners. 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... | |
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... | |
character(len=10), public | inv_file = "chgres.inv" |
wgrib2 inventory file 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 | 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... | |
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 1696 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 117 of file model_grid.F90.
References define_input_grid_gaussian(), define_input_grid_gfs_grib2(), define_input_grid_grib2(), and define_input_grid_mosaic().
Referenced by chgres().
subroutine model_grid::define_input_grid_gaussian | ( | integer, intent(in) | localpet, |
integer, intent(in) | npets | ||
) |
Define grid object for input data on global gaussian grids.
Recognized file formats:
[in] | localpet | ESMF local persistent execution thread |
[in] | npets | Number of persistent execution threads. |
Definition at line 151 of file model_grid.F90.
References error_handler(), and netcdf_err().
Referenced by define_input_grid().
subroutine model_grid::define_input_grid_gfs_grib2 | ( | integer, intent(in) | localpet, |
integer, intent(in) | npets | ||
) |
Define input grid object for GFS grib2 data.
Only works for data on global lat/lon or gaussian grids.
[in] | localpet | ESMF local persistent execution thread |
[in] | npets | Number of persistent execution threads |
Definition at line 618 of file model_grid.F90.
References error_handler().
Referenced by define_input_grid().
subroutine model_grid::define_input_grid_grib2 | ( | integer, intent(in) | localpet, |
integer, intent(in) | npets | ||
) |
Define input grid object for non-GFS grib2 data.
[in] | localpet | ESMF local persistent execution thread |
[in] | npets | Number of persistent execution threads |
Definition at line 807 of file model_grid.F90.
References error_handler(), get_cell_corners(), and netcdf_err().
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 405 of file model_grid.F90.
References error_handler(), get_model_latlons(), and 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 1105 of file model_grid.F90.
References error_handler(), get_model_latlons(), get_model_mask_terrain(), and netcdf_err().
Referenced by chgres().
subroutine model_grid::get_cell_corners | ( | real(esmf_kind_r8), dimension(i_input,j_input), intent(in) | latitude, |
real(esmf_kind_r8), dimension(i_input, j_input), intent(in) | longitude, | ||
real(esmf_kind_r8), dimension(:,:), intent(inout), pointer | latitude_sw, | ||
real(esmf_kind_r8), dimension(:,:), intent(inout), pointer | longitude_sw, | ||
real(esmf_kind_r8), intent(in) | dx, | ||
integer, dimension(2), intent(in) | clb, | ||
integer, dimension(2), intent(in) | cub | ||
) |
For grids with equal cell sizes (e.g., lambert conformal), get latitude and longitude of the grid cell corners.
[in] | latitude | grid box center latitude |
[in] | longitude | grid box center longitude |
[in,out] | latitude_sw | latitude of the 'southwest' corner of grid box |
[in,out] | longitude_sw | longitude of the 'southwest' corner of grid box |
[in] | dx | grid cell side size in meters |
[in] | clb | lower bounds of indices processed by this mpi task |
[in] | cub | upper bounds of indices processed by this mpi task |
Definition at line 1547 of file model_grid.F90.
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 1393 of file model_grid.F90.
References error_handler(), and netcdf_err().
Referenced by define_input_grid_mosaic(), and define_target_grid().
|
private |
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 1629 of file model_grid.F90.
References error_handler(), and 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 28 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 38 of file model_grid.F90.
type(esmf_grid), public model_grid::input_grid |
input grid esmf grid object
Definition at line 53 of file model_grid.F90.
character(len=50), public model_grid::input_grid_type = "latlon" |
map projection of input grid
Definition at line 22 of file model_grid.F90.
character(len=10), public model_grid::inv_file = "chgres.inv" |
wgrib2 inventory file
Definition at line 20 of file model_grid.F90.
integer, public model_grid::ip1_input |
i_input plus 1
Definition at line 34 of file model_grid.F90.
integer, public model_grid::ip1_target |
ip1_target plus 1
Definition at line 44 of file model_grid.F90.
integer, public model_grid::j_input |
j-dimension of input grid (or of each global tile)
Definition at line 31 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 41 of file model_grid.F90.
integer, public model_grid::jp1_input |
j_input plus 1
Definition at line 36 of file model_grid.F90.
integer, public model_grid::jp1_target |
jp1_target plus 1
Definition at line 46 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 75 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_input_grid |
latitude of grid center, input grid
Definition at line 58 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 62 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 80 of file model_grid.F90.
type(esmf_field), public model_grid::latitude_target_grid |
latitude of grid center, target grid
Definition at line 78 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 68 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 83 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_input_grid |
longitude of grid center, input grid
Definition at line 60 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 65 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 88 of file model_grid.F90.
type(esmf_field), public model_grid::longitude_target_grid |
longitude of grid center, target grid
Definition at line 86 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 71 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 91 of file model_grid.F90.
integer, public model_grid::lsoil_target = 4 |
Number of soil layers, target grid.
Definition at line 26 of file model_grid.F90.
integer, public model_grid::num_tiles_input_grid |
Number of tiles, input grid.
Definition at line 48 of file model_grid.F90.
integer, public model_grid::num_tiles_target_grid |
Number of tiles, target grid.
Definition at line 50 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 94 of file model_grid.F90.
type(esmf_grid), public model_grid::target_grid |
target grid esmf grid object.
Definition at line 55 of file model_grid.F90.
type(esmf_field), public model_grid::terrain_target_grid |
terrain height target grid
Definition at line 97 of file model_grid.F90.
character(len=5), dimension(:), allocatable, public model_grid::tiles_target_grid |
Tile names of target grid.
Definition at line 18 of file model_grid.F90.