NCEPLIBS-ip 4.0.0
ip_rot_equid_cylind_egrid_mod Module Reference

Rotated equidistant cylindrical grib decoder and grid coordinate transformations. 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)
 
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
 
real(kind=kd) clat0
 
real(kind=kd) clatr
 
real(kind=kd) clon
 
real(kind=kd) dlats
 
real(kind=kd) dlons
 
integer irot
 
integer, parameter kd = real64
 
real(kind=kd) rerth
 
real(kind=kd) rlon0
 
real(kind=kd) slat
 
real(kind=kd) slat0
 
real(kind=kd) slatr
 

Detailed Description

Rotated equidistant cylindrical grib decoder and grid coordinate transformations.

Author
George Gayno, Mark Iredell, Kyle Gerheiser
Date
July 2021

Function/Subroutine Documentation

◆ gdswzd_rot_equid_cylind_egrid()

subroutine ip_rot_equid_cylind_egrid_mod::gdswzd_rot_equid_cylind_egrid ( class(ip_rot_equid_cylind_egrid), 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 
)
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.

Parameters
[in]selfThe grid object gdswzd was called on.
[in]ioptoption flag
  • +1 to compute earth coords of selected grid coords.
  • -1 o compute grid coords of selected earth coords.
[in]nptsMaximum number of coordinates.
[in]fillFill value to set invalid output data. Must be impossible value; suggested value: -9999.
[in,out]xptsGrid x point coordinates if iopt>0.
[in,out]yptsGrid y point coordinates if iopt>0.
[in,out]rlonEarth longitudes in degrees e if iopt<0 (Acceptable range: -360. to 360.)
[in,out]rlatEarth latitudes in degrees n if iopt<0 (Acceptable range: -90. to 90.)
[out]nretNumber of valid points computed.
[out]crotOptional clockwise vector rotation cosines.
[out]srotOptional clockwise vector rotation sines.
[out]xlonOptional dx/dlon in 1/degrees.
[out]xlatOptional dx/dlat in 1/degrees.
[out]ylonOptional dy/dlon in 1/degrees.
[out]ylatOptional dy/dlat in 1/degrees.
[out]areaOptional area weights in m**2.
Author
Mark Iredell, George Gayno, Kyle Gerheiser
Date
Jan 2015

Definition at line 229 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ init_grib1()

subroutine ip_rot_equid_cylind_egrid_mod::init_grib1 ( class(ip_rot_equid_cylind_egrid), intent(inout)  self,
type(grib1_descriptor), intent(in)  g1_desc 
)
private

Initializes a rotated equidistant cylindrical grid given a grib1_descriptor object.

Parameters
[in,out]selfThe grid to initialize
[in]g1_descA grib1_descriptor
Author
Kyle Gerheiser
Date
July 2021

Definition at line 48 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ init_grib2()

subroutine ip_rot_equid_cylind_egrid_mod::init_grib2 ( class(ip_rot_equid_cylind_egrid), intent(inout)  self,
type(grib2_descriptor), intent(in)  g2_desc 
)
private

Initializes a rotated equidistant cylindrical grid given a grib2_descriptor object.

Parameters
[in,out]selfThe grid to initialize
[in]g2_descA grib2_descriptor
Author
Kyle Gerheiser
Date
July 2021

Definition at line 125 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ rot_equid_cylind_egrid_error()

subroutine ip_rot_equid_cylind_egrid_mod::rot_equid_cylind_egrid_error ( integer, intent(in)  IOPT,
real, intent(in)  FILL,
real, dimension(npts), intent(out)  RLAT,
real, dimension(npts), intent(out)  RLON,
real, dimension(npts), intent(out)  XPTS,
real, dimension(npts), intent(out)  YPTS,
integer, intent(in)  NPTS 
)
private

Definition at line 423 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ rot_equid_cylind_egrid_grid_area()

subroutine ip_rot_equid_cylind_egrid_mod::rot_equid_cylind_egrid_grid_area ( real, intent(in)  FILL,
real, intent(out)  AREA 
)
private

Computes the grid box area for a rotated equidistant cylindrical grid.

Parameters
[in]fillFill value for undefined points.
[out]areaArea weights in m^2.
Author
George Gayno
Date
Jan 2015

Definition at line 561 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ rot_equid_cylind_egrid_map_jacob()

subroutine ip_rot_equid_cylind_egrid_mod::rot_equid_cylind_egrid_map_jacob ( real, intent(in)  FILL,
real, intent(in)  RLON,
real, intent(out)  XLON,
real, intent(out)  XLAT,
real, intent(out)  YLON,
real, intent(out)  YLAT 
)
private

Computes the map jacobians for a rotated equidistant cylindrical grid.

Parameters
[in]fillFill value for undefined points.
[in]rlonLongitude in degrees.
[out]xlondx/dlon in 1/degrees.
[out]xlatdx/dlat in 1/degrees.
[out]ylondy/dlon in 1/degrees.
[out]ylatdy/dlat in 1/degrees.
Author
George Gayno
Date
Jan 2015

Definition at line 523 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ rot_equid_cylind_egrid_vect_rot()

subroutine ip_rot_equid_cylind_egrid_mod::rot_equid_cylind_egrid_vect_rot ( real, intent(in)  RLON,
real, intent(out)  CROT,
real, intent(out)  SROT 
)
private

Computes the vector rotation sines and cosines for a rotated equidistant cylindrical grid.

Parameters
[in]rlonLongitude in degrees.
[out]crotClockwise vector rotation cosines.
[out]srotClockwise vector rotation sines.
Note
ugrid=crot*uearth-srot*vearth; vgrid=srot*uearth+crot*vearth)
Author
George Gayno
Date
Jan 2015

Definition at line 488 of file ip_rot_equid_cylind_egrid_mod.f90.

Variable Documentation

◆ clat

real(kind=kd) ip_rot_equid_cylind_egrid_mod::clat
private

Definition at line 35 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ clat0

real(kind=kd) ip_rot_equid_cylind_egrid_mod::clat0
private

Definition at line 35 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ clatr

real(kind=kd) ip_rot_equid_cylind_egrid_mod::clatr
private

Definition at line 35 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ clon

real(kind=kd) ip_rot_equid_cylind_egrid_mod::clon
private

Definition at line 36 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ dlats

real(kind=kd) ip_rot_equid_cylind_egrid_mod::dlats
private

Definition at line 36 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ dlons

real(kind=kd) ip_rot_equid_cylind_egrid_mod::dlons
private

Definition at line 36 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ irot

integer ip_rot_equid_cylind_egrid_mod::irot
private

Definition at line 33 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ kd

integer, parameter ip_rot_equid_cylind_egrid_mod::kd = real64
private

Definition at line 21 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ rerth

real(kind=kd) ip_rot_equid_cylind_egrid_mod::rerth
private

Definition at line 36 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ rlon0

real(kind=kd) ip_rot_equid_cylind_egrid_mod::rlon0
private

Definition at line 37 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ slat

real(kind=kd) ip_rot_equid_cylind_egrid_mod::slat
private

Definition at line 37 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ slat0

real(kind=kd) ip_rot_equid_cylind_egrid_mod::slat0
private

Definition at line 37 of file ip_rot_equid_cylind_egrid_mod.f90.

◆ slatr

real(kind=kd) ip_rot_equid_cylind_egrid_mod::slatr
private

Definition at line 37 of file ip_rot_equid_cylind_egrid_mod.f90.