NCEPLIBS-ip 5.2.0
Loading...
Searching...
No Matches
ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid Type Reference
Inheritance diagram for ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid:
ip_grid_mod::ip_grid

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 Rotated equidistant cylindrical grid given a grib1_descriptor object.
 
procedure init_grib2 (self, g2_desc)
 Initializes a Rotated equidistant cylindrical given a grib2_descriptor object.
 

Data Fields

real(kdclat0
 Cosine of the latitude of the southern pole of projection.
 
class(ip_grid_descriptor), allocatable descriptor
 Descriptor.
 
real(kddlats
 'J'-direction grid increment.
 
real(kddlons
 'I'-direction grid increment.
 
real eccen_squared
 Eccentricity of the Earth squared (e^2).
 
integer im
 Number of x points.
 
integer irot
 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 rerth
 Radius of the Earth.
 
real(kdrlon0
 Longitude of southern pole of projection.
 
real(kdsbd
 Latitude of the southern boundary of the grid before rotation.
 
real(kdslat0
 Sine of the latitude of the southern pole of projection.
 
real(kdwbd
 Longitude of the western boundary of the grid before rotation.
 

Detailed Description

Definition at line 32 of file ip_rot_equid_cylind_grid_mod.F90.

Member Function/Subroutine Documentation

◆ field_pos()

procedure ip_grid_mod::ip_grid::field_pos ( class(ip_grid), intent(in)  self,
integer, intent(in)  i,
integer, intent(in)  j 
)
inherited

Field position for a given grid point.

Returns
Integer position in grib field to locate grid point.

Returns the field position for a given grid point.

Parameters
[in]self
[in]i
[in]j
Returns
Integer position in grib field to locate grid point.
Author
Mark Iredell, George Gayno, Kyle Gerheiser
Date
April 1996

Definition at line 91 of file ip_grid_mod.F90.

◆ gdswzd()

procedure ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::gdswzd ( class(ip_rot_equid_cylind_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.

Returns
N/A GDS wizard for rotated equidistant cylindrical.

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:

  • (iopt=+1) earth coordinates of selected grid coordinates
  • (iopt=-1) grid coordinates of selected earth coordinates

Works for non-"e" staggered rotated equidistant cylindrical projections. the scan mode (section 3, octet 72, bits 5-6) determine 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.

Program History Log

Date Programmer Comments
2010-jan-15 gayno based on routines gdswzdcb and gdswzdca
2015-jan-21 gayno merger of gdswizcd and gdswzdcd. 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-jul-13 gayno convert to grib 2. replace grib 1 kgds array with grib 2 grid definition template array. rename as "gdswzd_rot_equid_cylind."
2018-07-20 wesley add threads.
Parameters
[in]selfModule reference.
[in]ioptinteger option flag
  • 1 to compute earth coords of selected grid coords
  • -1 to compute grid coords of selected earth coords
[in]nptsinteger maximum number of coordinates
[in]fillreal fill value to set invalid output data (must be impossible value; suggested value: -9999.)
[in,out]xptsreal (npts) grid x point coordinates if iopt>0
[in,out]yptsreal (npts) grid y point coordinates if iopt>0
[in,out]rlonreal (npts) earth longitudes in degrees e if iopt<0 (acceptable range: -360. to 360.)
[in,out]rlatreal (npts) earth latitudes in degrees n if iopt<0 (acceptable range: -90. to 90.)
[out]nretinteger number of valid points computed
[out]crotreal, optional (npts) clockwise vector rotation cosines
[out]srotreal, optional (npts) clockwise vector rotation sines (ugrid=crot*uearth-srot*vearth; vgrid=srot*uearth+crot*vearth)
[out]xlonreal, optional (npts) dx/dlon in 1/degrees
[out]xlatreal, optional (npts) dx/dlat in 1/degrees
[out]ylonreal, optional (npts) dy/dlon in 1/degrees
[out]ylatreal, optional (npts) dy/dlat in 1/degrees
[out]areareal, optional (npts) area weights in m**2
Author
Gayno
Date
2007-NOV-15

Definition at line 56 of file ip_rot_equid_cylind_grid_mod.F90.

◆ init() [1/2]

generic ip_grid_mod::ip_grid::init
inherited

Init subprogram.

Returns
N/A

Definition at line 93 of file ip_grid_mod.F90.

◆ init() [2/2]

generic ip_grid_mod::ip_grid::init
inherited

Init subprogram.

Returns
N/A

Definition at line 93 of file ip_grid_mod.F90.

◆ init_grib1()

procedure ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::init_grib1 ( class(ip_rot_equid_cylind_grid), intent(inout)  self,
type(grib1_descriptor), intent(in)  g1_desc 
)

Initializes a Rotated equidistant cylindrical grid given a grib1_descriptor object.

Returns
N/A Initializes a Rotated equidistant cylindrical grid given a grib1_descriptor object.
Parameters
[in,out]selfThe grid to initialize
[in]g1_descA grib1_descriptor
Author
Gayno
Date
2007-NOV-15

Definition at line 48 of file ip_rot_equid_cylind_grid_mod.F90.

◆ init_grib2()

procedure ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::init_grib2 ( class(ip_rot_equid_cylind_grid), intent(inout)  self,
type(grib2_descriptor), intent(in)  g2_desc 
)

Initializes a Rotated equidistant cylindrical given a grib2_descriptor object.

Returns
N/A Initializes a Rotated equidistant cylindrical grid given a grib2_descriptor object.

Call 'use_ncep_post_arakawa()' before using this subroutine to use ncep_post-compatible grid definition.

Parameters
[in,out]selfThe grid to initialize
[in]g2_descA grib2_descriptor
Author
Alex Richert
Date
2024-MAY-20

Definition at line 52 of file ip_rot_equid_cylind_grid_mod.F90.

Field Documentation

◆ clat0

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::clat0

Cosine of the latitude of the southern pole of projection.

Definition at line 33 of file ip_rot_equid_cylind_grid_mod.F90.

◆ descriptor

class(ip_grid_descriptor), allocatable ip_grid_mod::ip_grid::descriptor
inherited

Descriptor.

Definition at line 59 of file ip_grid_mod.F90.

◆ dlats

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::dlats

'J'-direction grid increment.

Definition at line 34 of file ip_rot_equid_cylind_grid_mod.F90.

◆ dlons

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::dlons

'I'-direction grid increment.

Definition at line 35 of file ip_rot_equid_cylind_grid_mod.F90.

◆ eccen_squared

real ip_grid_mod::ip_grid::eccen_squared
inherited

Eccentricity of the Earth squared (e^2).

Definition at line 78 of file ip_grid_mod.F90.

◆ im

integer ip_grid_mod::ip_grid::im
inherited

Number of x points.

Definition at line 61 of file ip_grid_mod.F90.

◆ irot

integer ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::irot

Rotation flag.

When '0' the u/v vector components are relative to north/east. When '1' the u/v vector components are grid relative.

Definition at line 43 of file ip_rot_equid_cylind_grid_mod.F90.

◆ iwrap

integer ip_grid_mod::ip_grid::iwrap
inherited

x wraparound increment (0 if no wraparound).

Definition at line 74 of file ip_grid_mod.F90.

◆ jm

integer ip_grid_mod::ip_grid::jm
inherited

Number of y points.

Definition at line 62 of file ip_grid_mod.F90.

◆ jwrap1

integer ip_grid_mod::ip_grid::jwrap1
inherited

y wraparound lower pivot point (0 if no wraparound).

Definition at line 75 of file ip_grid_mod.F90.

◆ jwrap2

integer ip_grid_mod::ip_grid::jwrap2
inherited

y wraparound upper pivot point (0 if no wraparound).

Definition at line 76 of file ip_grid_mod.F90.

◆ kscan

integer ip_grid_mod::ip_grid::kscan
inherited

Mass/wind flag for staggered diagonal (0 if mass; 1 if wind).

Definition at line 70 of file ip_grid_mod.F90.

◆ nm

integer ip_grid_mod::ip_grid::nm
inherited

Total number of points.

Definition at line 63 of file ip_grid_mod.F90.

◆ nscan

integer ip_grid_mod::ip_grid::nscan
inherited
Parameters
Scanningmode.
  • 0 if x first then y;
  • 1 if y first then x;
  • 3 if staggered diagonal like projection 203.

Definition at line 69 of file ip_grid_mod.F90.

◆ nscan_field_pos

integer ip_grid_mod::ip_grid::nscan_field_pos
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.

◆ rerth

real ip_grid_mod::ip_grid::rerth
inherited

Radius of the Earth.

Definition at line 77 of file ip_grid_mod.F90.

◆ rlon0

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::rlon0

Longitude of southern pole of projection.

Definition at line 36 of file ip_rot_equid_cylind_grid_mod.F90.

◆ sbd

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::sbd

Latitude of the southern boundary of the grid before rotation.

Definition at line 39 of file ip_rot_equid_cylind_grid_mod.F90.

◆ slat0

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::slat0

Sine of the latitude of the southern pole of projection.

Definition at line 37 of file ip_rot_equid_cylind_grid_mod.F90.

◆ wbd

real(kd) ip_rot_equid_cylind_grid_mod::ip_rot_equid_cylind_grid::wbd

Longitude of the western boundary of the grid before rotation.

Definition at line 38 of file ip_rot_equid_cylind_grid_mod.F90.


The documentation for this type was generated from the following file: