orog_mask_tools
1.13.0
|
Terrain maker for the ufs weather model. More...
Go to the source code of this file.
Functions/Subroutines | |
program | __mtnlm7_oclsm.f90__ |
This program creates landmask, land fraction, terrain and and fields required for the model's gravity wave drag (GWD) scheme. More... | |
subroutine | make_mask (zslm, slm, land_frac, im, jm, imn, jmn, lon_c, lat_c) |
Create the land-mask, land fraction. More... | |
subroutine | makemt2 (ZAVG, ZSLM, ORO, SLM, VAR, VAR4, IM, JM, IMN, JMN, lon_c, lat_c, lake_frac, land_frac) |
Create the orography, standard deviation of orography and the convexity on a model tile. More... | |
subroutine | makeoa2 (ZAVG, zslm, VAR, OA4, OL, ELVMAX, ORO, IM, JM, IMN, JMN, lon_c, lat_c, lon_t, lat_t, dx, dy, is_south_pole, is_north_pole) |
Create orographic asymmetry and orographic length scale on the model grid. More... | |
subroutine | makepc2 (ZAVG, ZSLM, THETA, GAMMA, SIGMA, IM, JM, IMN, JMN, lon_c, lat_c, SLM) |
Make the principle coordinates - slope of orography, anisotropy, angle of mountain range with respect to east. More... | |
subroutine | tersub (IM, JM, EFAC, OUTGRID, MASK_ONLY, EXTERNAL_MASK_FILE) |
Driver routine to compute terrain. More... | |
program __mtnlm7_oclsm.f90__ | ( | ) |
This program creates landmask, land fraction, terrain and and fields required for the model's gravity wave drag (GWD) scheme.
Specifically:
This program operates on a single cubed-sphere tile.
Optionally, the program can compute and output only the land mask and land fraction. Or, it can read in the mask and fraction from an external file, then compute the terrain and GWD fields using that mask. These options are used to support coupled (atm/oceann) runs of the UFS. The process is:
PROGRAM HISTORY LOG:
24-08-15 Remove old code used by spectral GFS.
INPUT FILES:
NCID - MERGE FILE. CONTAINS LAND MASK, FRACTION AND LAKE FRACTION THAT HAS BEEN MERGED WITH AN OCEAN GRID. (NetCDF)
OUTPUT FILES (ALL ON A SINGLE CUBED-SPHERE TILE) :
Definition at line 72 of file mtnlm7_oclsm.F90.
References io_utils::read_mdl_dims(), and tersub().
subroutine make_mask | ( | integer, dimension(imn,jmn), intent(in) | zslm, |
real, dimension(im,jm), intent(out) | slm, | ||
real, dimension(im,jm), intent(out) | land_frac, | ||
integer, intent(in) | im, | ||
integer, intent(in) | jm, | ||
integer, intent(in) | imn, | ||
integer, intent(in) | jmn, | ||
real, dimension(im+1,jm+1), intent(in) | lon_c, | ||
real, dimension(im+1,jm+1), intent(in) | lat_c | ||
) |
Create the land-mask, land fraction.
This routine is used for the FV3GFS model.
[in] | zslm | The high-resolution input land-mask dataset. |
[out] | slm | Land-mask on the model tile. |
[out] | land_frac | Land fraction on the model tile. |
[in] | im | "i" dimension of the model grid. |
[in] | jm | "j" dimension of the model grid. |
[in] | imn | "i" dimension of the hi-res input orog/mask datasets. |
[in] | jmn | "j" dimension of the hi-res input orog/mask datasets. |
[in] | lon_c | Longitude of the model grid corner points. |
[in] | lat_c | Latitude on the model grid corner points. |
Definition at line 409 of file mtnlm7_oclsm.F90.
References orog_utils::get_index(), and orog_utils::inside_a_polygon().
Referenced by tersub().
subroutine makemt2 | ( | integer, dimension(imn,jmn), intent(in) | ZAVG, |
integer, dimension(imn,jmn), intent(in) | ZSLM, | ||
real, dimension(im,jm), intent(out) | ORO, | ||
real, dimension(im,jm), intent(in) | SLM, | ||
real, dimension(im,jm), intent(out) | VAR, | ||
real, dimension(im,jm), intent(out) | VAR4, | ||
integer, intent(in) | IM, | ||
integer, intent(in) | JM, | ||
integer, intent(in) | IMN, | ||
integer, intent(in) | JMN, | ||
real, dimension(im+1,jm+1), intent(in) | lon_c, | ||
real, dimension(im+1,jm+1), intent(in) | lat_c, | ||
real, dimension(im,jm), intent(in) | lake_frac, | ||
real, dimension(im,jm), intent(in) | land_frac | ||
) |
Create the orography, standard deviation of orography and the convexity on a model tile.
[in] | zavg | The high-resolution input orography dataset. |
[in] | zslm | The high-resolution input land-mask dataset. |
[out] | oro | Orography on the model tile. |
[in] | slm | Land-mask on the model tile. |
[out] | var | Standard deviation of orography on the model tile. |
[out] | var4 | Convexity on the model tile. |
[in] | im | "i" dimension of the model grid. |
[in] | jm | "j" dimension of the model grid. |
[in] | imn | "i" dimension of the hi-res input orog/mask datasets. |
[in] | jmn | "j" dimension of the hi-res input orog/mask datasets. |
[in] | lon_c | Longitude of the model grid corner points. |
[in] | lat_c | Latitude on the model grid corner points. |
[in] | lake_frac | Fractional lake within the grid |
[in] | land_frac | Fractional land within the grid |
Definition at line 531 of file mtnlm7_oclsm.F90.
References orog_utils::get_index(), and orog_utils::inside_a_polygon().
Referenced by tersub().
subroutine makeoa2 | ( | integer, dimension(imn,jmn), intent(in) | ZAVG, |
integer, dimension(imn,jmn), intent(in) | zslm, | ||
real, dimension(im,jm), intent(in) | VAR, | ||
real, dimension(im,jm,4), intent(out) | OA4, | ||
real, dimension(im,jm,4), intent(out) | OL, | ||
real, dimension(im,jm), intent(out) | ELVMAX, | ||
real, dimension(im,jm), intent(in) | ORO, | ||
integer, intent(in) | IM, | ||
integer, intent(in) | JM, | ||
integer, intent(in) | IMN, | ||
integer, intent(in) | JMN, | ||
real, dimension(im+1,jm+1), intent(in) | lon_c, | ||
real, dimension(im+1,jm+1), intent(in) | lat_c, | ||
real, dimension(im,jm), intent(in) | lon_t, | ||
real, dimension(im,jm), intent(in) | lat_t, | ||
real, dimension(im,jm), intent(in) | dx, | ||
real, dimension(im,jm), intent(in) | dy, | ||
logical, dimension(im,jm), intent(in) | is_south_pole, | ||
logical, dimension(im,jm), intent(in) | is_north_pole | ||
) |
Create orographic asymmetry and orographic length scale on the model grid.
This routine is used for the cubed-sphere grid.
[in] | zavg | High-resolution orography data. |
[in] | zslm | High-resolution land-mask data. |
[in] | var | Standard deviation of orography on the model grid. |
[out] | oa4 | Orographic asymmetry on the model grid. Four directional components - W/S/SW/NW |
[out] | ol | Orographic length scale on the model grid. Four directional components - W/S/SW/NW |
[out] | elvmax | Maximum elevation within a model grid box. |
[in] | oro | Orography on the model grid. |
[in] | im | "i" dimension of the model grid tile. |
[in] | jm | "j" dimension of the model grid tile. |
[in] | imn | "i" dimension of the high-resolution orography and mask data. |
[in] | jmn | "j" dimension of the high-resolution orography and mask data. |
[in] | lon_c | Corner point longitudes of the model grid points. |
[in] | lat_c | Corner point latitudes of the model grid points. |
[in] | lon_t | Center point longitudes of the model grid points. |
[in] | lat_t | Center point latitudes of the model grid points. |
[in] | dx | Length of model grid points in the 'x' direction. |
[in] | dy | Length of model grid points in the 'y' direction. |
[in] | is_south_pole | Is the model point at the south pole? |
[in] | is_north_pole | is the model point at the north pole? |
Definition at line 1026 of file mtnlm7_oclsm.F90.
References orog_utils::get_index(), orog_utils::get_lat_angle(), orog_utils::get_lon_angle(), orog_utils::get_xnsum(), orog_utils::get_xnsum2(), orog_utils::get_xnsum3(), and orog_utils::inside_a_polygon().
Referenced by tersub().
subroutine makepc2 | ( | integer, dimension(imn,jmn), intent(in) | ZAVG, |
integer, dimension(imn,jmn), intent(in) | ZSLM, | ||
real, dimension(im,jm), intent(out) | THETA, | ||
real, dimension(im,jm), intent(out) | GAMMA, | ||
real, dimension(im,jm), intent(out) | SIGMA, | ||
integer, intent(in) | IM, | ||
integer, intent(in) | JM, | ||
integer, intent(in) | IMN, | ||
integer, intent(in) | JMN, | ||
real, dimension(im+1,jm+1), intent(in) | lon_c, | ||
real, dimension(im+1,jm+1), intent(in) | lat_c, | ||
real, dimension(im,jm), intent(in) | SLM | ||
) |
Make the principle coordinates - slope of orography, anisotropy, angle of mountain range with respect to east.
This routine is used for the FV3GFS cubed-sphere grid.
[in] | zavg | The high-resolution input orography dataset. |
[in] | zslm | The high-resolution input land-mask dataset. |
[out] | theta | Angle of mountain range with respect to east for each model point. |
[out] | gamma | Anisotropy for each model point. |
[out] | sigma | Slope of orography for each model point. |
[in] | im | "i" dimension of the model grid tile. |
[in] | jm | "j" dimension of the model grid tile. |
[in] | imn | "i" dimension of the hi-res input orog/mask datasets. |
[in] | jmn | "j" dimension of the hi-res input orog/mask datasets. |
[in] | lon_c | Longitude of model grid corner points. |
[in] | lat_c | Latitude of the model grid corner points. |
[in] | SLM | mask |
Definition at line 770 of file mtnlm7_oclsm.F90.
References orog_utils::get_index(), and orog_utils::inside_a_polygon().
Referenced by tersub().
subroutine tersub | ( | integer, intent(in) | IM, |
integer, intent(in) | JM, | ||
integer, intent(in) | EFAC, | ||
character(len=*), intent(in) | OUTGRID, | ||
logical, intent(in) | MASK_ONLY, | ||
character(len=*), intent(in) | EXTERNAL_MASK_FILE | ||
) |
Driver routine to compute terrain.
[in] | IM | "i" dimension of the model grid tile. |
[in] | JM | "j" dimension of the model grid tile. |
[in] | EFAC | Factor to adjust orography by its variance. |
[in] | OUTGRID | The 'grid' file for the model tile. grid. When specified, will be interpolated to model tile. When not specified, program will create fields from raw high-resolution topography data. |
[in] | MASK_ONLY | Flag to generate the Land Mask only |
[in] | EXTERNAL_MASK_FILE | File containing an externally generated land mask/fraction. |
Definition at line 119 of file mtnlm7_oclsm.F90.
References make_mask(), makemt2(), makeoa2(), makepc2(), orog_utils::minmax(), io_utils::qc_orog_by_ramp(), io_utils::read_global_mask(), io_utils::read_global_orog(), io_utils::read_mask(), io_utils::read_mdl_grid_file(), orog_utils::remove_isolated_pts(), orog_utils::timef(), io_utils::write_mask_netcdf(), and io_utils::write_netcdf().
Referenced by __mtnlm7_oclsm.f90__().