NCEPLIBS-g2  3.4.5
gdt2gds.f File Reference

This routine converts grid information from a GRIB2 grid to GRIB1 GDS info. More...

Go to the source code of this file.

Functions/Subroutines

subroutine gdt2gds (igds, igdstmpl, idefnum, ideflist, kgds, igrid, iret)
 This routine converts grid information from a GRIB2 Grid Description Section as well as its Grid Definition Template to GRIB1 GDS info. More...
 

Detailed Description

This routine converts grid information from a GRIB2 grid to GRIB1 GDS info.

Author
Stephen Gilbert
Date
2003-06-17

Definition in file gdt2gds.f.

Function/Subroutine Documentation

◆ gdt2gds()

subroutine gdt2gds ( integer, dimension(*), intent(in)  igds,
integer, dimension(*), intent(in)  igdstmpl,
integer, intent(in)  idefnum,
integer, dimension(*), intent(in)  ideflist,
integer, dimension(*), intent(out)  kgds,
integer, intent(out)  igrid,
integer, intent(out)  iret 
)

This routine converts grid information from a GRIB2 Grid Description Section as well as its Grid Definition Template to GRIB1 GDS info.

In addition, a check is made to determine if the grid is a NCEP predefined grid.

PROGRAM HISTORY LOG:

  • 2003-06-17 Stephen Gilbert
  • 2004-04-27 Stephen Gilbert Added support for gaussian grids.
  • 2007-04-16 Boi Vuong Added Curvilinear Orthogonal grids.
  • 2007-05-29 Boi Vuong Added Rotate Lat/Lon E-grid (203).
Parameters
[in]igdsContains information read from the appropriate GRIB Grid Definition Section 3 for the field being returned. Must be dimensioned >= 5.
  • igds(1) Source of grid definition (see Code Table 3.0)
  • igds(2) Number of grid points in the defined grid.
  • igds(3) Number of octets needed for each additional grid points definition. Used to define number of points in each row (or column) for non-regular grids. = 0, if using regular grid.
  • igds(4) Interpretation of list for optional point definition. Code Table 3.11)
  • igds(5) Grid Definition Template Number (Code Table 3.1)
[in]igdstmplGrid Definition Template values for GDT 3.igds(5)
[in]idefnumThe number of entries in array ideflist. i.e. number of rows (or columns) for which optional grid points are defined.
[in]ideflistOptional integer array containing the number of grid points contained in each row (or column).
[out]kgdsGRIB1 GDS as described in w3fi63 format.
[out]igridNCEP predefined GRIB1 grid number set to 255, if not NCEP grid.
[out]iretError return value:
  • 0 Successful
  • 1 Unrecognized GRIB2 GDT number 3.igds(5)
Author
Stephen Gilbert
Date
2003-06-17

Definition at line 44 of file gdt2gds.f.