NCEPLIBS-ip 5.2.0
|
Public Member Functions | |
procedure | field_pos (self, i, j) |
Field position for a given grid point. | |
procedure | gdswzd (self, iopt, npts, fill, xpts, ypts, rlon, rlat, nret, crot, srot, xlon, xlat, ylon, ylat, area) |
Calculates Earth coordinates (iopt = 1) or grid coorindates (iopt = -1) for Gaussian grids. | |
generic | init init_grib1 |
Init subprogram. | |
generic | init init_grib2 |
Init subprogram. | |
procedure | init_grib1 (self, g1_desc) |
Initializes a gaussian grid given a grib1_descriptor object. | |
procedure | init_grib2 (self, g2_desc) |
Initializes a gaussian grid given a grib2_descriptor object. | |
Data Fields | |
class(ip_grid_descriptor), allocatable | descriptor |
Descriptor. | |
real | dxs |
x-direction grid length adjusted for scan mode. | |
real | dys |
y-direction grid length adjusted for scan model. | |
real | eccen_squared |
Eccentricity of the Earth squared (e^2). | |
real | h |
Hemisphere flag. | |
integer | im |
Number of x points. | |
integer | irot |
vector rotation flag. | |
integer | iwrap |
x wraparound increment (0 if no wraparound). | |
integer | jm |
Number of y points. | |
integer | jwrap1 |
y wraparound lower pivot point (0 if no wraparound). | |
integer | jwrap2 |
y wraparound upper pivot point (0 if no wraparound). | |
integer | kscan |
Mass/wind flag for staggered diagonal (0 if mass; 1 if wind). | |
integer | nm |
Total number of points. | |
integer | nscan |
integer | nscan_field_pos |
nscan for field_pos routine. | |
real | orient |
Longitude of meridian parallel to y-axis along which latitude increases at the latitude increases. | |
real | rerth |
Radius of the Earth. | |
real | rlat1 |
La1― latitude of first grid point. | |
real | rlati1 |
First latitude from the pole at which the secant cone cuts the sphere. | |
real | rlati2 |
Second latitude from the pole at which the scant cone cuts the sphere. | |
real | rlon1 |
Lo1― longitude of first grid point. | |
Definition at line 24 of file ip_lambert_conf_grid_mod.F90.
|
inherited |
Field position for a given grid point.
Returns the field position for a given grid point.
[in] | self | |
[in] | i | |
[in] | j |
Definition at line 91 of file ip_grid_mod.F90.
procedure ip_lambert_conf_grid_mod::ip_lambert_conf_grid::gdswzd | ( | class(ip_lambert_conf_grid), intent(in) | self, |
integer, intent(in) | iopt, | ||
integer, intent(in) | npts, | ||
real, intent(in) | fill, | ||
real, dimension(npts), intent(inout) | xpts, | ||
real, dimension(npts), intent(inout) | ypts, | ||
real, dimension(npts), intent(inout) | rlon, | ||
real, dimension(npts), intent(inout) | rlat, | ||
integer, intent(out) | nret, | ||
real, dimension(npts), intent(out), optional | crot, | ||
real, dimension(npts), intent(out), optional | srot, | ||
real, dimension(npts), intent(out), optional | xlon, | ||
real, dimension(npts), intent(out), optional | xlat, | ||
real, dimension(npts), intent(out), optional | ylon, | ||
real, dimension(npts), intent(out), optional | ylat, | ||
real, dimension(npts), intent(out), optional | area | ||
) |
Calculates Earth coordinates (iopt = 1) or grid coorindates (iopt = -1) for Gaussian grids.
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 lambert conformal conical 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 for this grid may be returned as well.
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. |
96-10-01 | iredell | protected against unresolvable points |
97-10-20 | iredell | include map options |
1999-04-27 | gilbert | corrected minor error calculating variable an for the secant projection case (rlati1.ne.rlati2). |
2012-08-14 | gayno | fix problem with sh grids. Ensure grid box area always positive. |
2015-01-21 | gayno | merger of gdswiz03() and gdswzd03(). 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. |
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 threads. |
[in] | self | ip_lambert_conf_grid object. |
[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 44 of file ip_lambert_conf_grid_mod.F90.
|
inherited |
|
inherited |
procedure ip_lambert_conf_grid_mod::ip_lambert_conf_grid::init_grib1 | ( | class(ip_lambert_conf_grid), intent(inout) | self, |
type(grib1_descriptor), intent(in) | g1_desc | ||
) |
Initializes a gaussian grid given a grib1_descriptor object.
[in,out] | self | The grid to initialize |
[in] | g1_desc | A grib1_descriptor |
Definition at line 37 of file ip_lambert_conf_grid_mod.F90.
procedure ip_lambert_conf_grid_mod::ip_lambert_conf_grid::init_grib2 | ( | class(ip_lambert_conf_grid), intent(inout) | self, |
type(grib2_descriptor), intent(in) | g2_desc | ||
) |
Initializes a gaussian grid given a grib2_descriptor object.
[in,out] | self | The grid to initialize |
[in] | g2_desc | A grib2_descriptor |
Definition at line 40 of file ip_lambert_conf_grid_mod.F90.
|
inherited |
Descriptor.
Definition at line 59 of file ip_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::dxs |
x-direction grid length adjusted for scan mode.
GRIB2, Section 3, octets 56-59.
Definition at line 30 of file ip_lambert_conf_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::dys |
y-direction grid length adjusted for scan model.
GRIB2, Section 3, octets 60-63.
Definition at line 31 of file ip_lambert_conf_grid_mod.F90.
|
inherited |
Eccentricity of the Earth squared (e^2).
Definition at line 78 of file ip_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::h |
|
inherited |
Number of x points.
Definition at line 61 of file ip_grid_mod.F90.
integer ip_lambert_conf_grid_mod::ip_lambert_conf_grid::irot |
vector rotation flag.
When "1", vectors are grid relative. When "0", vectors are earth relative. GRIB2, Section 3, octet 55.
Definition at line 33 of file ip_lambert_conf_grid_mod.F90.
|
inherited |
x wraparound increment (0 if no wraparound).
Definition at line 74 of file ip_grid_mod.F90.
|
inherited |
Number of y points.
Definition at line 62 of file ip_grid_mod.F90.
|
inherited |
y wraparound lower pivot point (0 if no wraparound).
Definition at line 75 of file ip_grid_mod.F90.
|
inherited |
y wraparound upper pivot point (0 if no wraparound).
Definition at line 76 of file ip_grid_mod.F90.
|
inherited |
Mass/wind flag for staggered diagonal (0 if mass; 1 if wind).
Definition at line 70 of file ip_grid_mod.F90.
|
inherited |
Total number of points.
Definition at line 63 of file ip_grid_mod.F90.
|
inherited |
Scanning | mode.
|
Definition at line 69 of file ip_grid_mod.F90.
|
inherited |
nscan for field_pos routine.
Can be different than nscan due to differences in grib/grib2.
Definition at line 72 of file ip_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::orient |
Longitude of meridian parallel to y-axis along which latitude increases at the latitude increases.
GRIB2, Section 3, octets 52-55.
Definition at line 29 of file ip_lambert_conf_grid_mod.F90.
|
inherited |
Radius of the Earth.
Definition at line 77 of file ip_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::rlat1 |
La1― latitude of first grid point.
GRIB2, Section 3.30, octet 39-42.
Definition at line 25 of file ip_lambert_conf_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::rlati1 |
First latitude from the pole at which the secant cone cuts the sphere.
GRIB2, Section 3, octets 66-69.
Definition at line 27 of file ip_lambert_conf_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::rlati2 |
Second latitude from the pole at which the scant cone cuts the sphere.
GRIB2, Section 3, octets 70-73.
Definition at line 28 of file ip_lambert_conf_grid_mod.F90.
real ip_lambert_conf_grid_mod::ip_lambert_conf_grid::rlon1 |
Lo1― longitude of first grid point.
GRIB2, Section 3.30, octet 43-46.
Definition at line 26 of file ip_lambert_conf_grid_mod.F90.