NCEPLIBS-ip
5.0.0
|
GDS wizard for polar stereographic azimuthal. More...
Data Types | |
type | ip_polar_stereo_grid |
Functions/Subroutines | |
subroutine | gdswzd_polar_stereo (self, IOPT, NPTS, FILL, XPTS, YPTS, RLON, RLAT, NRET, CROT, SROT, XLON, XLAT, YLON, YLAT, AREA) |
GDS wizard for polar stereographic azimuthal. More... | |
subroutine | init_grib1 (self, g1_desc) |
Initializes a polar stereographic grid given a grib1_descriptor object. More... | |
subroutine | init_grib2 (self, g2_desc) |
Initializes a polar stereographic grid given a grib2_descriptor object. More... | |
subroutine | polar_stereo_grid_area (RLAT, DR2, AREA) |
Grid box area for polar stereographic grids. More... | |
subroutine | polar_stereo_map_jacob (RLON, RLAT, DR2, XLON, XLAT, YLON, YLAT) |
Map jacobians for polar stereographic grids. More... | |
subroutine | polar_stereo_vect_rot (RLON, CROT, SROT) |
Vector rotation fields for polar stereographic grids. More... | |
Variables | |
real | de2 |
Square of DE. More... | |
real | dxs |
Local copy of dxs. More... | |
real | dys |
Local copy of dys. More... | |
real | e2 |
Eccentricity squared. More... | |
real | h |
Local copy of h. More... | |
integer | irot |
Local copy of irot. More... | |
real | orient |
Local copy of orient. More... | |
real | rerth |
Radius of the Earth. More... | |
GDS wizard for polar stereographic azimuthal.
Octet numbers refer to [GRIB2 - GRID DEFINITION TEMPLATE 3.20 Polar stereographic projection](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp3-20.shtml).
|
private |
GDS wizard for polar stereographic azimuthal.
This subprogram decodes the grib 2 grid definition template (passed in integer form as decoded by the ncep g2 library) and returns one of the following:
Works for polar stereographic azimuthal projections.
If the selected coordinates are more than one gridpoint beyond the the edges of the grid domain, then the relevant output elements are set to fill values.
The actual number of valid points computed is returned too.
Optionally, the vector rotations, map jacobians, and grid box areas may be returned as well. Routine works for both spherical and elliptical earths with the exception of the map jacobians and grid box areas, which are only computed for spherical earths.
To compute the vector rotations, the optional arguments 'srot' and 'crot' must be present. To compute the map jacobians, the optional arguments 'xlon', 'xlat', 'ylon', 'ylat' must be present. to compute the grid box areas, the optional argument 'area' must be present.
Date | Programmer | Comments |
---|---|---|
96-04-10 | iredell | Initial |
97-10-20 | iredell | include map options |
09-05-13 | gayno | ensure area always positive |
2015-01-21 | gayno | merger of gdswiz05 and gdswzd05. make crot,sort,xlon,xlat,ylon,ylat and area optional arguments. make part of a module. move vector rotation, map jacobian and grid box area computations to separate subroutines. include option for elliptical earths. |
2015-07-13 | gayno | convert to grib 2. replace grib 1 kgds array with grib 2 grid definition template array. rename routine. |
2018-07-20 | wesley | add threading. |
[in] | self | grid |
[in] | iopt | option flag
|
[in] | npts | maximum number of coordinates |
[in] | fill | fill value to set invalid output data (must be impossible value; suggested value: -9999.) |
[in,out] | xpts | (npts) grid x point coordinates if iopt>0 |
[in,out] | ypts | (npts) grid y point coordinates if iopt>0 |
[in,out] | rlon | (npts) earth longitudes in degrees e if iopt<0 (acceptable range: -360. to 360.) |
[in,out] | rlat | (npts) earth latitudes in degrees n if iopt<0 (acceptable range: -90. to 90.) |
[out] | nret | number of valid points computed |
[out] | crot | optional (npts) clockwise vector rotation cosines |
[out] | srot | optional (npts) clockwise vector rotation sines (ugrid=crot*uearth-srot*vearth; vgrid=srot*uearth+crot*vearth) |
[out] | xlon | optional (npts) dx/dlon in 1/degrees |
[out] | xlat | optional (npts) dx/dlat in 1/degrees |
[out] | ylon | optional (npts) dy/dlon in 1/degrees |
[out] | ylat | optional (npts) dy/dlat in 1/degrees |
[out] | area | optional (npts) area weights in m**2 (proportional to the square of the map factor) |
Definition at line 239 of file ip_polar_stereo_grid_mod.F90.
References de2, dxs, dys, e2, h, irot, orient, polar_stereo_grid_area(), polar_stereo_map_jacob(), polar_stereo_vect_rot(), and rerth.
|
private |
Initializes a polar stereographic grid given a grib1_descriptor object.
[in,out] | self | The grid to initialize |
[in] | g1_desc | A grib1_descriptor |
Definition at line 63 of file ip_polar_stereo_grid_mod.F90.
References ip_constants_mod::dpr, ip_constants_mod::e2_wgs84, and ip_constants_mod::rerth_wgs84.
|
private |
Initializes a polar stereographic grid given a grib2_descriptor object.
[in,out] | self | The grid to initialize |
[in] | g2_desc | A grib2_descriptor |
Definition at line 128 of file ip_polar_stereo_grid_mod.F90.
|
private |
Grid box area for polar stereographic grids.
This subprogram computes the grid box area for a polar stereographic azimuthal grid (spherical earth).
Date | Programmer | Comments |
---|---|---|
2015-01-21 | gayno | initial version |
2015-09-17 | gayno | rename as "polar_stereo_grid_area". |
2018-07-20 | wesley | pass in dr2 for threading. |
[in] | rlat | latitude of grid point in degrees (real) |
[in] | dr2 | squared distance from pole (real) |
[out] | area | area weights in m**2 (real) |
Definition at line 563 of file ip_polar_stereo_grid_mod.F90.
References de2, dxs, dys, and rerth.
Referenced by gdswzd_polar_stereo().
|
private |
Map jacobians for polar stereographic grids.
This subprogram computes the map jacobians for a polar stereographic azimuthal grid (spherical earth).
Date | Programmer | Comments |
---|---|---|
2015-01-21 | gayno | initial version |
2015-09-17 | gayno | rename as "polar_stereo_map_jacob" |
2018-07-20 | wesley | pass in dr2 for threading. |
[in] | rlon | longitude in degrees (real) |
[in] | rlat | latitude in degrees (real) |
[in] | dr2 | squared distance from pole (real) |
[out] | xlon | dx/dlon in 1/degrees (real) |
[out] | xlat | dx/dlat in 1/degrees (real) |
[out] | ylon | dy/dlon in 1/degrees (real) |
[out] | ylat | dy/dlat in 1/degrees (real) |
Definition at line 520 of file ip_polar_stereo_grid_mod.F90.
References de2, dxs, dys, h, and orient.
Referenced by gdswzd_polar_stereo().
|
private |
Vector rotation fields for polar stereographic grids.
This subprogram computes the vector rotation sines and cosines for a polar stereographic azimuthal grid.
Date | Programmer | Comments |
---|---|---|
2015-01-21 | gayno | initial version |
2015-09-17 | gayno | rename as "polar_stereo_vect_rot" |
[in] | rlon | grid point longitude in degrees (real) |
[in] | crot | clockwise vector rotation cosines (real) |
[in] | srot | clockwise vector rotation sines (real) (ugrid=crot*uearth-srot*vearth; vgrid=srot*uearth+crot*vearth) |
Definition at line 482 of file ip_polar_stereo_grid_mod.F90.
References h, irot, and orient.
Referenced by gdswzd_polar_stereo().
|
private |
Square of DE.
Definition at line 45 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), polar_stereo_grid_area(), and polar_stereo_map_jacob().
|
private |
Local copy of dxs.
Definition at line 46 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), polar_stereo_grid_area(), and polar_stereo_map_jacob().
|
private |
Local copy of dys.
Definition at line 47 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), polar_stereo_grid_area(), and polar_stereo_map_jacob().
|
private |
Eccentricity squared.
Definition at line 48 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo().
|
private |
Local copy of h.
Definition at line 50 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), polar_stereo_map_jacob(), and polar_stereo_vect_rot().
|
private |
Local copy of irot.
Definition at line 44 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), and polar_stereo_vect_rot().
|
private |
Local copy of orient.
Definition at line 51 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), polar_stereo_map_jacob(), and polar_stereo_vect_rot().
|
private |
Radius of the Earth.
Definition at line 49 of file ip_polar_stereo_grid_mod.F90.
Referenced by gdswzd_polar_stereo(), and polar_stereo_grid_area().