orog_mask_tools
1.8.0
|
Terrain maker for global spectral model. More...
Go to the source code of this file.
Functions/Subroutines | |
program | __mtnlm7_oclsm.f__ |
This program creates 7 terrain-related files computed from the navy 10-minute terrain dataset. More... | |
subroutine | get_index (IMN, JMN, npts, lonO, latO, DELXN, jst, jen, ilist, numx) |
Determine the location of a cubed-sphere point within the high-resolution orography data. More... | |
real function | get_lat_angle (dy, DEGRAD) |
Convert the 'y' direction distance of a cubed-sphere grid point to the corresponding distance in latitude. More... | |
real function | get_lon_angle (dx, lat, DEGRAD) |
Convert the 'x' direction distance of a cubed-sphere grid point to the corresponding distance in longitude. More... | |
subroutine | get_mismatch_index (im_in, jm_in, geolon_in, geolat_in, bitmap_in, num_out, lon_out, lat_out, iindx, jindx) |
For unmapped land points, find the nearest land point on the input data and pass back its i/j index. More... | |
real function | get_xnsum (lon1, lat1, lon2, lat2, IMN, JMN, glat, zavg, zslm, delxn) |
Count the number of high-resolution orography points that are higher than the model grid box average orography height. More... | |
subroutine | get_xnsum2 (lon1, lat1, lon2, lat2, IMN, JMN, glat, zavg, zslm, delxn, xnsum1, xnsum2, HC) |
Count the number of high-resolution orography points that are higher than a critical value inside a model grid box (or a portion of a model grid box). More... | |
subroutine | get_xnsum3 (lon1, lat1, lon2, lat2, IMN, JMN, glat, zavg, zslm, delxn, xnsum1, xnsum2, HC) |
Count the number of high-resolution orography points that are higher than a critical value inside a model grid box (or a portion of a model grid box). More... | |
subroutine | gg2rg (im, jm, numi, a) |
Convert from a full grid to a reduced grid. More... | |
logical function | inside_a_polygon (lon1, lat1, npts, lon2, lat2) |
Check if a point is inside a polygon. More... | |
subroutine | interpolate_mismatch (im_in, jm_in, data_in, num_out, data_out, iindx, jindx) |
Replace unmapped model land points with the nearest land point on the input grid. More... | |
subroutine | latlon2xyz (siz, lon, lat, x, y, z) |
Convert from latitude and longitude to x,y,z coordinates. More... | |
subroutine | MAKEMT (ZAVG, ZSLM, ORO, SLM, VAR, VAR4, GLAT, IST, IEN, JST, JEN, IM, JM, IMN, JMN, XLAT, numi) |
Create the orography, land-mask, standard deviation of orography and the convexity on a model gaussian grid. More... | |
subroutine | MAKEMT2 (ZAVG, ZSLM, ORO, SLM, land_frac, VAR, VAR4, GLAT, IM, JM, IMN, JMN, lon_c, lat_c) |
Create the orography, land-mask, land fraction, standard deviation of orography and the convexity on a model cubed-sphere tile. More... | |
subroutine | MAKEOA (ZAVG, VAR, GLAT, OA4, OL, IOA4, ELVMAX, ORO, oro1, XNSUM, XNSUM1, XNSUM2, XNSUM3, XNSUM4, IST, IEN, JST, JEN, IM, JM, IMN, JMN, XLAT, numi) |
Create orographic asymmetry and orographic length scale on the model grid. More... | |
subroutine | MAKEOA2 (ZAVG, zslm, VAR, GLAT, OA4, OL, IOA4, ELVMAX, ORO, oro1, XNSUM, XNSUM1, XNSUM2, XNSUM3, XNSUM4, 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 | MAKEOA3 (ZAVG, zslm, VAR, GLAT, OA4, OL, IOA4, ELVMAX, ORO, SLM, oro1, XNSUM, XNSUM1, XNSUM2, XNSUM3, XNSUM4, IM, JM, IMN, JMN, lon_c, lat_c, lon_t, lat_t, is_south_pole, is_north_pole, IMI, JMI, OA_IN, OL_IN, slm_in, lon_in, lat_in) |
Create orographic asymmetry and orographic length scale on the model grid. More... | |
subroutine | MAKEPC (ZAVG, ZSLM, THETA, GAMMA, SIGMA, GLAT, IST, IEN, JST, JEN, IM, JM, IMN, JMN, XLAT, numi) |
Make the principle coordinates - slope of orography, anisotropy, angle of mountain range with respect to east. More... | |
subroutine | MAKEPC2 (ZAVG, ZSLM, THETA, GAMMA, SIGMA, GLAT, IM, JM, IMN, JMN, lon_c, lat_c) |
Make the principle coordinates - slope of orography, anisotropy, angle of mountain range with respect to east. More... | |
subroutine | maxmin (ia, len, tile) |
Print the maximum, mininum, mean and standard deviation of an array. More... | |
subroutine | minmaxj (IM, JM, A, title) |
Print out the maximum and minimum values of an array and their i/j location. More... | |
subroutine | minmxj (IM, JM, A, title) |
Print out the maximum and minimum values of an array. More... | |
subroutine | mnmxja (IM, JM, A, imax, jmax, title) |
Print out the maximum and minimum values of an array. More... | |
subroutine | nanc (a, l, c) |
Report NaNS and NaNQ within an address range for 8-byte real words. More... | |
subroutine | read_g (glob, ITOPO) |
Read input global 30-arc second orography data. More... | |
subroutine | REVERS (IM, JM, numi, F, WRK) |
Reverse the east-west and north-south axes in a two-dimensional array. More... | |
subroutine | rg2gg (im, jm, numi, a) |
Convert from a reduced grid to a full grid. More... | |
subroutine | SPFFT1 (IMAX, INCW, INCG, KMAX, W, G, IDIR) |
Perform multiple fast fourier transforms. More... | |
real function | spherical_angle (v1, v2, v3) |
Compute spherical angle. More... | |
real function | spherical_distance (theta1, phi1, theta2, phi2) |
Compute a great circle distance between two points. More... | |
subroutine | TERSUB (IMN, JMN, IM, JM, NM, NR, NF0, NF1, NW, EFAC, BLAT, OUTGRID, INPUTOROG) |
Driver routine to compute terrain. More... | |
real function | timef () |
Get the date/time for the system clock. More... | |
program __mtnlm7_oclsm.f__ | ( | ) |
This program creates 7 terrain-related files computed from the navy 10-minute terrain dataset.
The model physics grid parameters and spectral truncation and filter parameters are read by this program as input.
The 7 files produced are:
The orography is only filtered for wavenumbers greater than nf0. For wavenumbers n between nf0 and nf1, the orography is filtered by the factor 1-((n-nf0)/(nf1-nf0))**2. The filtered orography will not have information beyond wavenumber nf1.
PROGRAM HISTORY LOG:
07-08-07 replace 8' with 30" incl GICE, conintue w/ S-Y. lake slm - 08-08-07 All input 30", UMD option, and filter as described below Quadratic filter applied by default. NF0 is normally set to an even value beyond the previous truncation, for example, for jcap=382, NF0=254+2 NF1 is set as jcap+2 (and/or nearest even), eg., for t382, NF1=382+2=384 if no filter is desired then NF1=NF0=0 and ORF=ORO but if no filter but spectral to grid (with gibbs) then NF1=jcap+2, and NF1=jcap+1
INPUT FILES:
UNIT57 - GRIB GRIDDED OROGRAPHY (IM,JM)
SUBPROGRAMS CALLED:
Definition at line 78 of file mtnlm7_oclsm.f.
References netcdf_err().
subroutine get_index | ( | integer, intent(in) | IMN, |
integer, intent(in) | JMN, | ||
integer | npts, | ||
real, dimension(npts), intent(in) | lonO, | ||
real, dimension(npts), intent(in) | latO, | ||
real, intent(in) | DELXN, | ||
integer, intent(out) | jst, | ||
integer, intent(out) | jen, | ||
integer, dimension(imn), intent(out) | ilist, | ||
integer, intent(out) | numx | ||
) |
Determine the location of a cubed-sphere point within the high-resolution orography data.
The location is described by the range of i/j indices on the high-res grid.
[in] | imn | 'i' dimension of the high-resolution orography data set. |
[in] | jmn | 'j' dimension of the high-resolution orography data set. |
[in] | npts | Number of vertices to describe the cubed-sphere point. |
[in] | lonO | The longitudes of the cubed-sphere vertices. |
[in] | latO | The latitudes of the cubed-sphere vertices. |
[in] | delxn | Resolution of the high-resolution orography data set. |
[out] | jst | Starting 'j' index on the high-resolution grid. |
[out] | jen | Ending 'j' index on the high-resolution grid. |
[out] | ilist | List of 'i' indices on the high-resolution grid. |
[out] | numx | The number of 'i' indices on the high-resolution grid. |
Definition at line 1790 of file mtnlm7_oclsm.f.
Referenced by MAKEMT2(), MAKEOA2(), MAKEOA3(), and MAKEPC2().
real function get_lat_angle | ( | real | dy, |
real | DEGRAD | ||
) |
Convert the 'y' direction distance of a cubed-sphere grid point to the corresponding distance in latitude.
[in] | dy | Distance along the 'y' direction of a cubed-sphere point. |
[in] | degrad | Conversion from radians to degrees. |
Definition at line 2938 of file mtnlm7_oclsm.f.
real function get_lon_angle | ( | real | dx, |
real | lat, | ||
real | DEGRAD | ||
) |
Convert the 'x' direction distance of a cubed-sphere grid point to the corresponding distance in longitude.
[in] | dx | Distance along the 'x' direction of a cubed-sphere grid point. |
[in] | lat | Latitude of the cubed-sphere point. |
[in] | degrad | Conversion from radians to degrees. |
Definition at line 2919 of file mtnlm7_oclsm.f.
subroutine get_mismatch_index | ( | integer, intent(in) | im_in, |
integer, intent(in) | jm_in, | ||
real, dimension(im_in,jm_in), intent(in) | geolon_in, | ||
real, dimension(im_in,jm_in), intent(in) | geolat_in, | ||
logical*1, dimension(im_in,jm_in), intent(in) | bitmap_in, | ||
integer, intent(in) | num_out, | ||
real, dimension(num_out), intent(in) | lon_out, | ||
real, dimension(num_out), intent(in) | lat_out, | ||
integer, dimension(num_out), intent(out) | iindx, | ||
integer, dimension(num_out), intent(out) | jindx | ||
) |
For unmapped land points, find the nearest land point on the input data and pass back its i/j index.
[in] | im_in | 'i' dimension of input data. |
[in] | jm_in | 'j' dimension of input data. |
[in] | geolon_in | Longitude of input data. |
[in] | geolat_in | Latitude of input data. |
[in] | bitmap_in | Bitmap (mask) of input data. |
[in] | num_out | Number of unmapped points. |
[in] | lon_out | Longitude of unmapped points. |
[in] | lat_out | Latitude of unmapped points. |
[out] | iindx | 'i' indices of nearest land points on the input data. |
[out] | jindx | 'j' indices of nearest land points on the input data. |
Definition at line 3415 of file mtnlm7_oclsm.f.
References spherical_distance().
Referenced by MAKEOA3().
real function get_xnsum | ( | real | lon1, |
real | lat1, | ||
real | lon2, | ||
real | lat2, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(jmn) | glat, | ||
integer, dimension(imn,jmn) | zavg, | ||
integer, dimension(imn,jmn) | zslm, | ||
real | delxn | ||
) |
Count the number of high-resolution orography points that are higher than the model grid box average orography height.
[in] | lon1 | Longitude of corner point 1 of the model grid box. |
[in] | lat1 | Latitude of corner point 1 of the model grid box. |
[in] | lon2 | Longitude of corner point 2 of the model grid box. |
[in] | lat2 | Latitude of corner point 2 of the model grid box. |
[in] | imn | 'i' dimension of the high-resolution orography data. |
[in] | jmn | 'j' dimension of the high-resolution orography data. |
[in] | glat | Latitude of each row of the high-resolution orography data. |
[in] | zavg | The high-resolution orography. |
[in] | zslm | The high-resolution land mask. |
[in] | delxn | Resolution of the high-res orography data. |
Definition at line 4512 of file mtnlm7_oclsm.f.
subroutine get_xnsum2 | ( | real | lon1, |
real | lat1, | ||
real | lon2, | ||
real | lat2, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(jmn) | glat, | ||
integer, dimension(imn,jmn) | zavg, | ||
integer, dimension(imn,jmn) | zslm, | ||
real | delxn, | ||
real, intent(out) | xnsum1, | ||
real, intent(out) | xnsum2, | ||
real, intent(out) | HC | ||
) |
Count the number of high-resolution orography points that are higher than a critical value inside a model grid box (or a portion of a model grid box).
The critical value is a function of the standard deviation of orography.
[in] | lon1 | Longitude of corner point 1 of the model grid box. |
[in] | lat1 | Latitude of corner point 1 of the model grid box. |
[in] | lon2 | Longitude of corner point 2 of the model grid box. |
[in] | lat2 | Latitude of corner point 2 of the model grid box. |
[in] | imn | 'i' dimension of the high-resolution orography data. |
[in] | jmn | 'j' dimension of the high-resolution orography data. |
[in] | glat | Latitude of each row of the high-resolution orography data. |
[in] | zavg | The high-resolution orography. |
[in] | zslm | The high-resolution land mask. |
[in] | delxn | Resolution of the high-res orography data. |
[out] | xnsum1 | The number of high-resolution orography above the critical value inside a model grid box. |
[out] | xnsum2 | The number of high-resolution orography points inside a model grid box. |
[out] | hc | Critical height. |
Definition at line 4619 of file mtnlm7_oclsm.f.
Referenced by MAKEOA2().
subroutine get_xnsum3 | ( | real | lon1, |
real | lat1, | ||
real | lon2, | ||
real | lat2, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(jmn) | glat, | ||
integer, dimension(imn,jmn) | zavg, | ||
integer, dimension(imn,jmn) | zslm, | ||
real | delxn, | ||
real, intent(out) | xnsum1, | ||
real, intent(out) | xnsum2, | ||
real | HC | ||
) |
Count the number of high-resolution orography points that are higher than a critical value inside a model grid box (or a portion of a model grid box).
Unlike routine get_xnsum2(), this routine does not compute the critical value. Rather, it is passed in.
[in] | lon1 | Longitude of corner point 1 of the model grid box. |
[in] | lat1 | Latitude of corner point 1 of the model grid box. |
[in] | lon2 | Longitude of corner point 2 of the model grid box. |
[in] | lat2 | Latitude of corner point 2 of the model grid box. |
[in] | imn | 'i' dimension of the high-resolution orography data. |
[in] | jmn | 'j' dimension of the high-resolution orography data. |
[in] | glat | Latitude of each row of the high-resolution orography data. |
[in] | zavg | The high-resolution orography. |
[in] | zslm | The high-resolution land mask. |
[in] | delxn | Resolution of the high-res orography data. |
[out] | xnsum1 | The number of high-resolution orography above the critical value inside a model grid box. |
[out] | xnsum2 | The number of high-resolution orography points inside a model grid box. |
[in] | hc | Critical height. |
Definition at line 4715 of file mtnlm7_oclsm.f.
Referenced by MAKEOA2().
subroutine gg2rg | ( | integer, intent(in) | im, |
integer, intent(in) | jm, | ||
integer, dimension(jm), intent(in) | numi, | ||
real, dimension(im,jm), intent(inout) | a | ||
) |
Convert from a full grid to a reduced grid.
[in] | im | 'i' dimension of the full grid. |
[in] | jm | 'j' dimension of the full grid. |
[in] | numi | Number of 'i' points for each row of the reduced grid. |
[in,out] | a | The data to be converted. |
Definition at line 4010 of file mtnlm7_oclsm.f.
logical function inside_a_polygon | ( | real | lon1, |
real | lat1, | ||
integer | npts, | ||
real, dimension(npts) | lon2, | ||
real, dimension(npts) | lat2 | ||
) |
Check if a point is inside a polygon.
[in] | lon1 | Longitude of the point to check. |
[in] | lat1 | Latitude of the point to check. |
[in] | npts | Number of polygon vertices. |
[in] | lon2 | Longitude of the polygon vertices. |
[in] | lat2 | Latitude of the polygon vertices. |
Definition at line 4416 of file mtnlm7_oclsm.f.
References latlon2xyz(), and spherical_angle().
subroutine interpolate_mismatch | ( | integer, intent(in) | im_in, |
integer, intent(in) | jm_in, | ||
real, dimension(im_in,jm_in), intent(in) | data_in, | ||
integer, intent(in) | num_out, | ||
real, dimension(num_out), intent(out) | data_out, | ||
integer, dimension(num_out), intent(in) | iindx, | ||
integer, dimension(num_out), intent(in) | jindx | ||
) |
Replace unmapped model land points with the nearest land point on the input grid.
[in] | im_in | 'i' dimension of input grid. |
[in] | jm_in | 'j' dimension of input grid. |
[in] | data_in | Input grid data. |
[in] | num_out | Number of unmapped model points. |
[out] | data_out | Data on the model tile. |
[in] | iindx | 'i' indices of the nearest land points on the input grid. |
[in] | jindx | 'j' indices of the nearest land points on the input grid. |
Definition at line 3496 of file mtnlm7_oclsm.f.
Referenced by MAKEOA3().
subroutine latlon2xyz | ( | integer, intent(in) | siz, |
real, dimension(siz), intent(in) | lon, | ||
real, dimension(siz), intent(in) | lat, | ||
real, dimension(siz), intent(out) | x, | ||
real, dimension(siz), intent(out) | y, | ||
real, dimension(siz), intent(out) | z | ||
) |
Convert from latitude and longitude to x,y,z coordinates.
[in] | siz | Number of points to convert. |
[in] | lon | Longitude of points to convert. |
[in] | lat | Latitude of points to convert. |
[out] | x | 'x' coordinate of the converted points. |
[out] | y | 'y' coordinate of the converted points. |
[out] | z | 'z' coordinate of the converted points. |
Definition at line 4344 of file mtnlm7_oclsm.f.
Referenced by inside_a_polygon().
subroutine MAKEMT | ( | integer, dimension(imn,jmn) | ZAVG, |
integer, dimension(imn,jmn) | ZSLM, | ||
dimension(im,jm) | ORO, | ||
dimension(im,jm) | SLM, | ||
dimension(im,jm) | VAR, | ||
dimension(im,jm) | VAR4, | ||
dimension(jmn) | GLAT, | ||
dimension(im,jm) | IST, | ||
dimension(im,jm) | IEN, | ||
dimension(jm) | JST, | ||
dimension(jm) | JEN, | ||
IM, | |||
JM, | |||
IMN, | |||
JMN, | |||
dimension(jm) | XLAT, | ||
dimension(jm) | numi | ||
) |
Create the orography, land-mask, standard deviation of orography and the convexity on a model gaussian grid.
This routine was used for the spectral GFS model.
[in] | zavg | The high-resolution input orography dataset. |
[in] | zslm | The high-resolution input land-mask dataset. |
[out] | oro | Orography on the model grid. |
[out] | slm | Land-mask on the model grid. |
[out] | var | Standard deviation of orography on the model grid. |
[out] | var4 | Convexity on the model grid. |
[out] | glat | Latitude of each row of the high-resolution orography and land-mask datasets. |
[out] | ist | This is the 'i' index of high-resolution data set at the east edge of the model grid cell. the high-resolution dataset with respect to the 'east' edge |
[out] | ien | This is the 'i' index of high-resolution data set at the west edge of the model grid cell. |
[out] | jst | This is the 'j' index of high-resolution data set at the south edge of the model grid cell. |
[out] | jen | This is the 'j' index of high-resolution data set at the north edge of the model grid cell. |
[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 dataset. |
[in] | jmn | "j" dimension of the hi-res input orog/mask dataset. |
[in] | xlat | The latitude of each row of the model grid. |
[in] | numi | For reduced gaussian grids, the number of 'i' points for each 'j' row. |
Definition at line 1624 of file mtnlm7_oclsm.f.
subroutine MAKEMT2 | ( | integer, dimension(imn,jmn) | ZAVG, |
integer, dimension(imn,jmn) | ZSLM, | ||
real, dimension(im,jm) | ORO, | ||
real, dimension(im,jm) | SLM, | ||
real, dimension(im,jm) | land_frac, | ||
real, dimension(im,jm) | VAR, | ||
real, dimension(im,jm) | VAR4, | ||
real, dimension(jmn) | GLAT, | ||
integer | IM, | ||
integer | JM, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(im+1,jm+1) | lon_c, | ||
real, dimension(im+1,jm+1) | lat_c | ||
) |
Create the orography, land-mask, land fraction, standard deviation of orography and the convexity on a model cubed-sphere tile.
This routine is used for the FV3GFS model.
[in] | zavg | The high-resolution input orography dataset. |
[in] | zslm | The high-resolution input land-mask dataset. |
[out] | oro | Orography on the model tile. |
[out] | slm | Land-mask on the model tile. |
[out] | land_frac | Land fraction on the model tile. |
[out] | var | Standard deviation of orography on the model tile. |
[out] | var4 | Convexity on the model tile. |
[out] | glat | Latitude of each row of the high-resolution orography and land-mask datasets. |
[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 1884 of file mtnlm7_oclsm.f.
References get_index().
subroutine MAKEOA | ( | integer, dimension(imn,jmn) | ZAVG, |
dimension(im,jm) | VAR, | ||
dimension(jmn) | GLAT, | ||
dimension(im,jm,4) | OA4, | ||
dimension(im,jm,4) | OL, | ||
dimension(im,jm,4) | IOA4, | ||
dimension(im,jm) | ELVMAX, | ||
dimension(im,jm) | ORO, | ||
dimension(im,jm) | oro1, | ||
dimension(im,jm) | XNSUM, | ||
dimension(im,jm) | XNSUM1, | ||
dimension(im,jm) | XNSUM2, | ||
dimension(im,jm) | XNSUM3, | ||
dimension(im,jm) | XNSUM4, | ||
dimension(im,jm) | IST, | ||
dimension(im,jm) | IEN, | ||
dimension(jm) | JST, | ||
dimension(jm) | JEN, | ||
IM, | |||
JM, | |||
IMN, | |||
JMN, | |||
dimension(jm) | XLAT, | ||
dimension(jm) | numi | ||
) |
Create orographic asymmetry and orographic length scale on the model grid.
This routine is used for the spectral GFS gaussian grid.
[in] | zavg | The high-resolution input orography dataset. |
[in] | var | Standard deviation of orography on the model grid. |
[out] | glat | Latitude of each row of input terrain dataset. |
[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] | ioa4 | Count of oa4 values between certain thresholds. |
[out] | elvmax | Maximum elevation on the model grid. |
[in] | oro | Orography on the model grid. |
[out] | oro1 | Save array for model grid orography. |
[out] | xnsum | Number of high-resolution orography points higher than the model grid box average. |
[out] | xnsum1 | Number of high-resolution orography points higher than the critical height. |
[out] | xnsum2 | Total number of high-resolution orography points within a model grid box. |
[out] | xnsum3 | Same as xnsum1, except shifted by half a model grid box. |
[out] | xnsum4 | Same as xnsum2, except shifted by half a model grid box. |
[out] | ist | This is the 'i' index of high-resolution data set at the east edge of the model grid cell. |
[out] | ien | This is the 'i' index of high-resolution data set at the west edge of the model grid cell. |
[out] | jst | This is the 'j' index of high-resolution data set at the south edge of the model grid cell. |
[out] | jen | This is the 'j' index of high-resolution data set at the north edge of the model grid cell. |
[in] | im | "i" dimension of the model grid. |
[in] | jm | "j" dimension of the model grid. |
[in] | imn | "i" dimension of the input terrain dataset. |
[in] | jmn | "j" dimension of the input terrain dataset. |
[in] | xlat | The latitude of each row of the model grid. |
[in] | numi | For reduced gaussian grids, the number of 'i' points for each 'j' row. |
Definition at line 2593 of file mtnlm7_oclsm.f.
subroutine MAKEOA2 | ( | integer, dimension(imn,jmn) | ZAVG, |
integer, dimension(imn,jmn) | zslm, | ||
real, dimension(im,jm) | VAR, | ||
real, dimension(jmn) | GLAT, | ||
real, dimension(im,jm,4) | OA4, | ||
real, dimension(im,jm,4) | OL, | ||
integer, dimension(im,jm,4) | IOA4, | ||
real, dimension(im,jm) | ELVMAX, | ||
real, dimension(im,jm) | ORO, | ||
real, dimension(im,jm) | oro1, | ||
real, dimension(im,jm) | XNSUM, | ||
real, dimension(im,jm) | XNSUM1, | ||
real, dimension(im,jm) | XNSUM2, | ||
real, dimension(im,jm) | XNSUM3, | ||
real, dimension(im,jm) | XNSUM4, | ||
integer | IM, | ||
integer | JM, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(im+1,jm+1) | lon_c, | ||
real, dimension(im+1,jm+1) | lat_c, | ||
real, dimension(im,jm) | lon_t, | ||
real, dimension(im,jm) | lat_t, | ||
real, dimension(im,jm) | dx, | ||
real, dimension(im,jm) | dy, | ||
logical, dimension(im,jm) | is_south_pole, | ||
logical, dimension(im,jm) | 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] | glat | Latitude of each row of input terrain dataset. |
[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] | ioa4 | Count of oa4 values between certain thresholds. |
[out] | elvmax | Maximum elevation within a model grid box. |
[in] | oro | Orography on the model grid. |
[out] | oro1 | Save array for model grid orography. |
[out] | xnsum | Not used. |
[out] | xnsum1 | Not used. |
[out] | xnsum2 | Not used. |
[out] | xnsum3 | Not used. |
[out] | xnsum4 | Not used. |
[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 2988 of file mtnlm7_oclsm.f.
References get_index(), get_xnsum2(), and get_xnsum3().
subroutine MAKEOA3 | ( | integer, dimension(imn,jmn) | ZAVG, |
integer, dimension(imn,jmn) | zslm, | ||
real, dimension(im,jm) | VAR, | ||
real, dimension(jmn) | GLAT, | ||
real, dimension(im,jm,4) | OA4, | ||
real, dimension(im,jm,4) | OL, | ||
integer, dimension(im,jm,4) | IOA4, | ||
real, dimension(im,jm) | ELVMAX, | ||
real, dimension(im,jm) | ORO, | ||
real, dimension(im,jm) | SLM, | ||
real, dimension(im,jm) | oro1, | ||
real, dimension(im,jm) | XNSUM, | ||
real, dimension(im,jm) | XNSUM1, | ||
real, dimension(im,jm) | XNSUM2, | ||
real, dimension(im,jm) | XNSUM3, | ||
real, dimension(im,jm) | XNSUM4, | ||
integer | IM, | ||
integer | JM, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(im+1,jm+1) | lon_c, | ||
real, dimension(im+1,jm+1) | lat_c, | ||
real, dimension(im,jm) | lon_t, | ||
real, dimension(im,jm) | lat_t, | ||
logical, dimension(im,jm) | is_south_pole, | ||
logical, dimension(im,jm) | is_north_pole, | ||
integer | IMI, | ||
integer | JMI, | ||
real, dimension(imi,jmi,4) | OA_IN, | ||
real, dimension(imi,jmi,4) | OL_IN, | ||
real, dimension(imi,jmi) | slm_in, | ||
real, dimension(imi,jmi) | lon_in, | ||
real, dimension(imi,jmi) | lat_in | ||
) |
Create orographic asymmetry and orographic length scale on the model grid.
This routine is used for the cubed-sphere grid. The asymmetry and length scales are interpolated from an existing gfs orography file. The maximum elevation is computed from the high-resolution orography data.
[in] | zavg | High-resolution orography data. |
[in] | zslm | High-resolution land-mask data. Not used. |
[in] | var | Standard deviation of orography on the model grid. |
[out] | glat | Latitude of each row of input terrain dataset. |
[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] | ioa4 | Count of oa4 values between certain thresholds. |
[out] | elvmax | Maximum elevation within a model grid box. |
[in] | slm | Land-mask on model grid. |
[in] | oro | Orography on the model grid. |
[out] | oro1 | Save array for model grid orography. |
[in] | xnsum | Not used. |
[in] | xnsum1 | Not used. |
[in] | xnsum2 | Not used. |
[in] | xnsum3 | Not used. |
[in] | xnsum4 | Not used. |
[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] | is_south_pole | Not used. |
[in] | is_north_pole | Not used. |
[in] | imi | 'i' dimension of input gfs orography data. |
[in] | jmi | 'j' dimension of input gfs orography data. |
[in] | oa_in | Asymmetry on the input gfs orography data. |
[in] | ol_in | Length scales on the input gfs orography data. |
[in] | slm_in | Land-sea mask on the input gfs orography data. |
[in] | lon_in | Longitude on the input gfs orography data. |
[in] | lat_in | Latitude on the input gfs orography data. |
Definition at line 3556 of file mtnlm7_oclsm.f.
References get_index(), get_mismatch_index(), and interpolate_mismatch().
subroutine MAKEPC | ( | integer, dimension(imn,jmn) | ZAVG, |
integer, dimension(imn,jmn) | ZSLM, | ||
dimension(im,jm) | THETA, | ||
dimension(im,jm) | GAMMA, | ||
dimension(im,jm) | SIGMA, | ||
dimension(jmn) | GLAT, | ||
dimension(im,jm) | IST, | ||
dimension(im,jm) | IEN, | ||
dimension(jm) | JST, | ||
dimension(jm) | JEN, | ||
IM, | |||
JM, | |||
IMN, | |||
JMN, | |||
dimension(jm) | XLAT, | ||
dimension(jm) | numi | ||
) |
Make the principle coordinates - slope of orography, anisotropy, angle of mountain range with respect to east.
This routine is used for spectral GFS gaussian grids.
[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. |
[out] | glat | Latitude of each row of the high-resolution orography and land-mask datasets. |
[out] | ist | This is the 'i' index of high-resolution data set at the east edge of the model grid cell. |
[out] | ien | This is the 'i' index of high-resolution data set at the west edge of the model grid cell. |
[out] | jst | This is the 'j' index of high-resolution data set at the south edge of the model grid cell. |
[out] | jen | This is the 'j' index of high-resolution data set at the north edge of the model grid cell. |
[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] | xlat | The latitude of each row of the model grid. |
[in] | numi | For reduced gaussian grids, the number of 'i' points for each 'j' row. |
Definition at line 2044 of file mtnlm7_oclsm.f.
subroutine MAKEPC2 | ( | integer, dimension(imn,jmn) | ZAVG, |
integer, dimension(imn,jmn) | ZSLM, | ||
real, dimension(im,jm) | THETA, | ||
real, dimension(im,jm) | GAMMA, | ||
real, dimension(im,jm) | SIGMA, | ||
real, dimension(jmn) | GLAT, | ||
integer | IM, | ||
integer | JM, | ||
integer | IMN, | ||
integer | JMN, | ||
real, dimension(im+1,jm+1) | lon_c, | ||
real, dimension(im+1,jm+1) | lat_c | ||
) |
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. |
[out] | glat | Latitude of each row of the high-resolution orography and land-mask datasets. |
[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. |
Definition at line 2318 of file mtnlm7_oclsm.f.
References get_index().
subroutine maxmin | ( | integer*2, dimension(len) | ia, |
integer | len, | ||
character*7 | tile | ||
) |
Print the maximum, mininum, mean and standard deviation of an array.
[in] | ia | The array to be checked. |
[in] | len | The number of points to be checked. |
[in] | tile | A name associated with the array. |
Definition at line 4234 of file mtnlm7_oclsm.f.
Referenced by read_g().
subroutine minmaxj | ( | integer | IM, |
integer | JM, | ||
real(kind=4), dimension(im,jm) | A, | ||
character*8 | title | ||
) |
Print out the maximum and minimum values of an array and their i/j location.
Also print out the number of undefined points.
[in] | im | The 'i' dimension of the array. |
[in] | jm | The 'i' dimension of the array. |
[in] | a | The array to check. |
[in] | title | Name of the data to be checked. |
Definition at line 4292 of file mtnlm7_oclsm.f.
subroutine minmxj | ( | integer | IM, |
integer | JM, | ||
real, dimension(im,jm) | A, | ||
character*8 | title | ||
) |
Print out the maximum and minimum values of an array.
[in] | im | The 'i' dimension of the array. |
[in] | jm | The 'i' dimension of the array. |
[in] | a | The array to check. |
[in] | title | Name of the data to be checked. |
Definition at line 4036 of file mtnlm7_oclsm.f.
Referenced by TERSUB().
subroutine mnmxja | ( | integer | IM, |
integer | JM, | ||
real, dimension(im,jm) | A, | ||
integer | imax, | ||
integer | jmax, | ||
character*8 | title | ||
) |
Print out the maximum and minimum values of an array.
Pass back the i/j location of the maximum value.
[in] | im | The 'i' dimension of the array. |
[in] | jm | The 'i' dimension of the array. |
[in] | a | The array to check. |
[out] | imax | 'i' location of maximum |
[out] | jmax | 'j' location of maximum |
[in] | title | Name of the data to be checked. |
Definition at line 4071 of file mtnlm7_oclsm.f.
Referenced by TERSUB().
subroutine nanc | ( | a, | |
l, | |||
character*(*) | c | ||
) |
Report NaNS and NaNQ within an address range for 8-byte real words.
This routine prints a single line for each call and prints a message and returns to the caller on detection of the FIRST NaN in the range. If no NaN values are found it returns silently.
[in] | A | Real*8 variable or array |
[in] | L | Number of words to scan (length of array) |
[in] | C | Distinctive message set in caller to indicate where the routine was called. |
Definition at line 4778 of file mtnlm7_oclsm.f.
subroutine read_g | ( | integer*2, dimension(360*120,180*120) | glob, |
integer | ITOPO | ||
) |
Read input global 30-arc second orography data.
[out] | glob | The orography data. |
[in] | itopo | Not used. |
Definition at line 4183 of file mtnlm7_oclsm.f.
References maxmin().
Referenced by TERSUB().
subroutine REVERS | ( | IM, | |
JM, | |||
integer, dimension(jm) | numi, | ||
real, dimension(im,jm) | F, | ||
real, dimension(im,jm) | WRK | ||
) |
Reverse the east-west and north-south axes in a two-dimensional array.
[in] | im | 'i' dimension of the 2-d array. |
[in] | jm | 'j' dimension of the 2-d array. |
[in] | numi | Not used. |
[in,out] | f | The two-dimensional array to be processed. |
[out] | wrk | Two-dimensional work array. |
Definition at line 3947 of file mtnlm7_oclsm.f.
subroutine rg2gg | ( | integer, intent(in) | im, |
integer, intent(in) | jm, | ||
integer, dimension(jm), intent(in) | numi, | ||
real, dimension(im,jm), intent(inout) | a | ||
) |
Convert from a reduced grid to a full grid.
[in] | im | 'i' dimension of the full grid. |
[in] | jm | 'j' dimension of the full grid. |
[in] | numi | Number of 'i' points for each row of the reduced grid. |
[in,out] | a | The data to be converted. |
Definition at line 3984 of file mtnlm7_oclsm.f.
Referenced by TERSUB().
subroutine SPFFT1 | ( | integer, intent(in) | IMAX, |
integer, intent(in) | INCW, | ||
integer, intent(in) | INCG, | ||
integer, intent(in) | KMAX, | ||
complex, dimension(incw,kmax), intent(inout) | W, | ||
real, dimension(incg,kmax), intent(inout) | G, | ||
integer, intent(in) | IDIR | ||
) |
Perform multiple fast fourier transforms.
This subprogram performs multiple fast fourier transforms between complex amplitudes in fourier space and real values in cyclic physical space.
Subprograms called (NCEPLIB SP Library):
Program history log: 1998-12-18 Mark Iredell
[in] | imax | Integer number of values in the cyclic physical space. See limitations on imax in remarks below. |
[in] | incw | Integer first dimension of the complex amplitude array. (incw >= imax/2+1). |
[in] | incg | Integer first dimension of the real value array. (incg >= imax). |
[in] | kmax | Integer number of transforms to perform. |
[in] | w | Complex amplitudes on input if idir>0, and on output if idir<0. |
[in] | g | Real values on input if idir<0, and on output if idir>0. |
[in] | idir | Integer direction flag. idir>0 to transform from fourier to physical space. idir<0 to transform from physical to fourier space. |
Definition at line 4133 of file mtnlm7_oclsm.f.
real function spherical_angle | ( | real, dimension(3) | v1, |
real, dimension(3) | v2, | ||
real, dimension(3) | v3 | ||
) |
Compute spherical angle.
[in] | v1 | Vector 1. |
[in] | v2 | Vector 2. |
[in] | v3 | Vector 3. |
Definition at line 4366 of file mtnlm7_oclsm.f.
Referenced by inside_a_polygon().
real function spherical_distance | ( | real, intent(in) | theta1, |
real, intent(in) | phi1, | ||
real, intent(in) | theta2, | ||
real, intent(in) | phi2 | ||
) |
Compute a great circle distance between two points.
[in] | theta1 | Longitude of point 1. |
[in] | phi1 | Latitude of point 1. |
[in] | theta2 | Longitude of point 2. |
[in] | phi2 | Latitude of point2. |
Definition at line 3379 of file mtnlm7_oclsm.f.
Referenced by get_mismatch_index().
subroutine TERSUB | ( | integer | IMN, |
integer | JMN, | ||
integer | IM, | ||
integer | JM, | ||
integer | NM, | ||
integer | NR, | ||
integer | NF0, | ||
integer | NF1, | ||
integer | NW, | ||
integer | EFAC, | ||
integer | BLAT, | ||
character(len=*), intent(in) | OUTGRID, | ||
character(len=*), intent(in) | INPUTOROG | ||
) |
Driver routine to compute terrain.
[in] | IMN | "i" dimension of the input terrain dataset. |
[in] | JMN | "j" dimension of the input terrain dataset. |
[in] | IM | "i" dimension of the model grid tile. |
[in] | JM | "j" dimension of the model grid tile. |
[in] | NM | Spectral truncation. |
[in] | NR | Rhomboidal flag. |
[in] | NF0 | First order spectral filter parameters. |
[in] | NF1 | Second order spectral filter parameters. |
[in] | NW | Number of waves. |
[in] | EFAC | Factor to adjust orography by its variance. |
[in] | BLAT | When less than zero, reverse latitude/ longitude for output. |
[in] | OUTGRID | The 'grid' file for the model tile. |
[in] | INPUTOROG | Input orography/GWD file on gaussian grid. When specified, will be interpolated to model tile. When not specified, program will create fields from raw high-resolution topography data. |
Definition at line 184 of file mtnlm7_oclsm.f.
References minmxj(), mnmxja(), netcdf_err(), read_g(), rg2gg(), timef(), and write_netcdf().
real function timef | ( | ) |
Get the date/time for the system clock.
Definition at line 4827 of file mtnlm7_oclsm.f.
Referenced by TERSUB().