NCEPLIBS-ip  5.0.0
ipxwafs.F90 File Reference

Expand or contract wafs grids. More...

Go to the source code of this file.

Functions/Subroutines

subroutine ipxwafs (IDIR, NUMPTS_THIN, NUMPTS_FULL, KM, NUM_OPT, OPT_PTS, IGDTLEN, IGDTMPL_THIN, DATA_THIN, IGDTMPL_FULL, DATA_FULL, IRET)
 Expand or contract wafs grids. More...
 

Detailed Description

Expand or contract wafs grids.

Author
Iredell
Date
96-04-10

Definition in file ipxwafs.F90.

Function/Subroutine Documentation

◆ ipxwafs()

subroutine ipxwafs ( integer, intent(in)  IDIR,
integer, intent(in)  NUMPTS_THIN,
integer, intent(in)  NUMPTS_FULL,
integer, intent(in)  KM,
integer, intent(in)  NUM_OPT,
integer, dimension(num_opt), intent(inout)  OPT_PTS,
integer, intent(in)  IGDTLEN,
integer, dimension(igdtlen), intent(inout)  IGDTMPL_THIN,
real, dimension(numpts_thin,km), intent(inout)  DATA_THIN,
integer, dimension(igdtlen), intent(inout)  IGDTMPL_FULL,
real, dimension(numpts_full,km), intent(inout)  DATA_FULL,
integer, intent(out)  IRET 
)

Expand or contract wafs grids.

This subprogram transforms between the thinned wafs grids used for transmitting to the aviation community and their full expansion as used for general interpolation and graphics.

The thinned wafs grids are latitude-longitude grids where the number of points in each row decrease toward the pole.

This information is stored in the grib 2 grid definition template (section 3) starting at octet 73. The full grid counterparts have an equal number of points per row. The transform between the full and thinned wafs grid is done by linear interpolation and is not reversible.

This routine does not work for bitmapped data.

Program History Log

Date Programmer Comments
96-04-10 iredell initial version
2015-july gayno convert to grib 2
Parameters
[in]idirinteger transform option
  • (+1 to expand thinned fields to full fields)
  • (-1 to contract full fields to thinned fields)
[in]numpts_thininteger number of grid points - thinned grid. must be 3447.
[in]numpts_fullinteger number of grid points - full grid. must be 5329 (73^2).
[in]kminteger number of fields to transform
[in]num_optinteger number of values to describe the thinned grid. must be 73. dimension of array opt_pts.
[in,out]opt_ptsinteger (num_opt) number of grid points per row - thinned grid - if idir=+1
[in]igdtleninteger grid defintion template array length. must be 19 for lat/lon grids. corresponds to the gfldigdtlen component of the ncep g2 library gridmod data structure. same for thin and full grids which are both lat/lon.
[in,out]igdtmpl_thininteger (igdtlen) grid definition template array - thinned grid - if idir=+1. corresponds to the gfldigdtmpl component of the ncep g2 library gridmod data structure (section 3 info):
  • 1 shape of earth, octet 15
  • 2 scale factor of spherical earth radius, octet 16
  • 3 scaled value of radius of spherical earth, octets 17-20
  • 4 scale factor of major axis of elliptical earth, octet 21
  • 5 scaled value of major axis of elliptical earth, octets 22-25
  • 6 scale factor of minor axis of elliptical earth, octet 26
  • 7 scaled value of minor axis of elliptical earth, octets 27-30
  • 8 set to missing for thinned grid., octs 31-34
  • 9 number of points along a meridian, octs 35-38
  • 10 basic angle of initial production domain, octets 39-42.
  • 11 subdivisions of basic angle, octets 43-46
  • 12 latitude of first grid point, octets 47-50
  • 13 longitude of first grid point, octets 51-54
  • 14 resolution and component flags, octet 55
  • 15 latitude of last grid point, octets 56-59
  • 16 longitude of last grid point, octets 60-63
  • 17 set to missing for thinned grid, octets 64-67
  • 18 j-direction increment, octets 68-71
  • 19 scanning mode, octet 72
[in,out]data_thinreal (numpts_thin,km) thinned grid fields if idir=+1
[in,out]igdtmpl_fullinteger (igdtlen) grid definition template array - full grid - if idir=-1. corresponds to the gfldigdtmpl component of the ncep g2 library gridmod data structure. same as igdtmpl_thin except:
  • 8 number of points along a parallel, octs 31-34
  • 17 i-direction increment, octets 64-67
[in,out]data_fullreal (numpts_full,km) full grid fields if idir=-1
[out]iretinteger return code
  • 0 successful transformation
  • 1 improper grid specification
Author
Iredell
Date
96-04-10

Definition at line 81 of file ipxwafs.F90.