NCEPLIBS-ip
5.0.0
|
Rotated equidistant cylindrical GRIB decoder and grid coordinate transformations for Arakawa grid E. More...
Data Types | |
type | ip_rot_equid_cylind_egrid |
Functions/Subroutines | |
subroutine | gdswzd_rot_equid_cylind_egrid (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 rotated equidistant cylindrical grids. More... | |
subroutine | init_grib1 (self, g1_desc) |
Initializes a rotated equidistant cylindrical grid given a grib1_descriptor object. More... | |
subroutine | init_grib2 (self, g2_desc) |
Initializes a rotated equidistant cylindrical grid given a grib2_descriptor object. More... | |
subroutine | rot_equid_cylind_egrid_error (IOPT, FILL, RLAT, RLON, XPTS, YPTS, NPTS) |
Error handler. More... | |
subroutine | rot_equid_cylind_egrid_grid_area (FILL, AREA) |
Computes the grid box area for a rotated equidistant cylindrical grid. More... | |
subroutine | rot_equid_cylind_egrid_map_jacob (FILL, RLON, XLON, XLAT, YLON, YLAT) |
Computes the map jacobians for a rotated equidistant cylindrical grid. More... | |
subroutine | rot_equid_cylind_egrid_vect_rot (RLON, CROT, SROT) |
Computes the vector rotation sines and cosines for a rotated equidistant cylindrical grid. More... | |
Variables | |
real(kind=kd) | clat |
Cosine of the latitude. More... | |
real(kind=kd) | clat0 |
Local copy of clat0. More... | |
real(kind=kd) | clatr |
Cosine of the rotated latitude. More... | |
real(kind=kd) | clon |
Cosine of the difference between rlon and rlon0. More... | |
real(kind=kd) | dlats |
Local copy of dlats. More... | |
real(kind=kd) | dlons |
Local copy of dlons. More... | |
integer | irot |
Local copy of irot. More... | |
integer, parameter | kd = real64 |
Kind of reals. More... | |
real(kind=kd) | rerth |
Radius of the Earth. More... | |
real(kind=kd) | rlon0 |
Local copy of rlon0. More... | |
real(kind=kd) | slat |
Sine of the latitude. More... | |
real(kind=kd) | slat0 |
Local copy of slat0. More... | |
real(kind=kd) | slatr |
Sine of the rotated latitude. More... | |
Rotated equidistant cylindrical GRIB decoder and grid coordinate transformations for Arakawa grid E.
(To handle the A through D grids, see ip_rot_equid_cylind_grid_mod).
The E stagger is a bit odd because the 'wind' points shift by half a grid box in each row. That makes the logic tricky. So the routine does its computations by rotating the grid by 45 degrees.
See more info about Awakawa grids.
Octet numbers refer to GRIB2 - GRID DEFINITION TEMPLATE 3.1 Rotate Latitude/Longitude.
|
private |
Calculates Earth coordinates (iopt = 1) or grid coorindates (iopt = -1) for rotated equidistant cylindrical grids.
Works for e-staggered rotated equidistant cylindrical projections. The scan mode determines whether this is an "h" or "v" grid.
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, the map jacobians and the grid box areas 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.
[in] | self | The grid object gdswzd was called on. |
[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 | Grid x point coordinates if iopt>0. |
[in,out] | ypts | Grid y point coordinates if iopt>0. |
[in,out] | rlon | Earth longitudes in degrees e if iopt<0 (Acceptable range: -360. to 360.) |
[in,out] | rlat | Earth latitudes in degrees n if iopt<0 (Acceptable range: -90. to 90.) |
[out] | nret | Number of valid points computed. |
[out] | crot | Optional clockwise vector rotation cosines. |
[out] | srot | Optional clockwise vector rotation sines. |
[out] | xlon | Optional dx/dlon in 1/degrees. |
[out] | xlat | Optional dx/dlat in 1/degrees. |
[out] | ylon | Optional dy/dlon in 1/degrees. |
[out] | ylat | Optional dy/dlat in 1/degrees. |
[out] | area | Optional area weights in m**2. |
Definition at line 267 of file ip_rot_equid_cylind_egrid_mod.F90.
References clat, clat0, clatr, clon, dlats, dlons, irot, rerth, rlon0, rot_equid_cylind_egrid_error(), rot_equid_cylind_egrid_grid_area(), rot_equid_cylind_egrid_map_jacob(), rot_equid_cylind_egrid_vect_rot(), slat, slat0, and slatr.
|
private |
Initializes a rotated equidistant cylindrical grid given a grib1_descriptor object.
[in,out] | self | The grid to initialize |
[in] | g1_desc | A grib1_descriptor |
Definition at line 86 of file ip_rot_equid_cylind_egrid_mod.F90.
References ip_constants_mod::dpr.
|
private |
Initializes a rotated equidistant cylindrical grid given a grib2_descriptor object.
[in,out] | self | The grid to initialize |
[in] | g2_desc | A grib2_descriptor |
Definition at line 163 of file ip_rot_equid_cylind_egrid_mod.F90.
|
private |
Error handler.
UPON AN ERROR, THIS SUBPROGRAM ASSIGNS A "FILL" VALUE TO THE OUTPUT FIELDS.
Date | Programmer | Comments |
---|---|---|
2015-07-13 | GAYNO | Initial version |
2015-09-17 | GAYNO | Rename as "rot_equid_cylind_egrid_error" |
[in] | iopt | option flag
|
[in] | fill | fill value to set invalid output data (must be impossible value; suggested value: -9999.) |
[out] | rlat | (npts) earth latitudes in degrees n if iopt<0 |
[out] | rlon | (npts) earth longitudes in degrees e if iopt<0 |
[out] | xpts | (npts) grid x point coordinates if iopt>0 |
[out] | ypts | (npts) grid y point coordinates if iopt>0 |
[in] | npts | maximum number of coordinates |
Definition at line 482 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid().
|
private |
Computes the grid box area for a rotated equidistant cylindrical grid.
[in] | fill | Fill value for undefined points. |
[out] | area | Area weights in m^2. |
Definition at line 587 of file ip_rot_equid_cylind_egrid_mod.F90.
References clatr, dlats, dlons, and rerth.
Referenced by gdswzd_rot_equid_cylind_egrid().
|
private |
Computes the map jacobians for a rotated equidistant cylindrical grid.
[in] | fill | Fill value for undefined points. |
[in] | rlon | Longitude in degrees. |
[out] | xlon | dx/dlon in 1/degrees. |
[out] | xlat | dx/dlat in 1/degrees. |
[out] | ylon | dy/dlon in 1/degrees. |
[out] | ylat | dy/dlat in 1/degrees. |
Definition at line 549 of file ip_rot_equid_cylind_egrid_mod.F90.
References clat, clat0, clatr, clon, dlats, dlons, rlon0, slat, and slat0.
Referenced by gdswzd_rot_equid_cylind_egrid().
|
private |
Computes the vector rotation sines and cosines for a rotated equidistant cylindrical grid.
[in] | rlon | Longitude in degrees. |
[out] | crot | Clockwise vector rotation cosines. |
[out] | srot | Clockwise vector rotation sines. |
Definition at line 514 of file ip_rot_equid_cylind_egrid_mod.F90.
References clat, clat0, clatr, clon, irot, rlon0, slat, slat0, and slatr.
Referenced by gdswzd_rot_equid_cylind_egrid().
|
private |
Cosine of the latitude.
Definition at line 64 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Local copy of clat0.
Definition at line 65 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Cosine of the rotated latitude.
Definition at line 66 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_grid_area(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Cosine of the difference between rlon and rlon0.
Definition at line 67 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Local copy of dlats.
Definition at line 68 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_grid_area(), and rot_equid_cylind_egrid_map_jacob().
|
private |
Local copy of dlons.
Definition at line 69 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_grid_area(), and rot_equid_cylind_egrid_map_jacob().
|
private |
Local copy of irot.
Definition at line 62 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Kind of reals.
Definition at line 35 of file ip_rot_equid_cylind_egrid_mod.F90.
|
private |
Radius of the Earth.
Definition at line 70 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), and rot_equid_cylind_egrid_grid_area().
|
private |
Local copy of rlon0.
Definition at line 71 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Sine of the latitude.
Definition at line 72 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Local copy of slat0.
Definition at line 73 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), rot_equid_cylind_egrid_map_jacob(), and rot_equid_cylind_egrid_vect_rot().
|
private |
Sine of the rotated latitude.
Definition at line 74 of file ip_rot_equid_cylind_egrid_mod.F90.
Referenced by gdswzd_rot_equid_cylind_egrid(), and rot_equid_cylind_egrid_vect_rot().