NCEPLIBS-g2
3.5.0
|
Unpack Sections of GRIB2 messages. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | gf_unpack1 (cgrib, lcgrib, iofst, ids, idslen, ierr) |
Unpack Section 1 (Identification Section) of a GRIB2 message, starting at octet 6 of that Section. More... | |
subroutine | gf_unpack2 (cgrib, lcgrib, iofst, lencsec2, csec2, ierr) |
Unpack Section 2 (Local Use Section) of a GRIB2 message. More... | |
subroutine | gf_unpack3 (cgrib, lcgrib, iofst, igds, igdstmpl, mapgridlen, ideflist, idefnum, ierr) |
Unpack Section 3 (Grid Definition Section) of a GRIB2 message, starting at octet 6 of that Section. More... | |
subroutine | gf_unpack4 (cgrib, lcgrib, iofst, ipdsnum, ipdstmpl, mappdslen, coordlist, numcoord, ierr) |
Unpack Section 4 (Product Definition Section) of a GRIB2 message, starting at octet 6 of that Section. More... | |
subroutine | gf_unpack5 (cgrib, lcgrib, iofst, ndpts, idrsnum, idrstmpl, mapdrslen, ierr) |
Unpack Section 5 (Data Representation Section) of a GRIB2 message, starting at octet 6 of that Section. More... | |
subroutine | gf_unpack6 (cgrib, lcgrib, iofst, ngpts, ibmap, bmap, ierr) |
Unpack Section 6 (Bit-Map Section) of a GRIB2 message, starting at octet 6 of that Section. More... | |
subroutine | gf_unpack7 (cgrib, lcgrib, iofst, igdsnum, igdstmpl, idrsnum, idrstmpl, ndpts, fld, ierr) |
Unpack Section 7 (Data Section) of a GRIB2 message. More... | |
subroutine gf_unpack1 | ( | character(len=1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, dimension(:), pointer | ids, | ||
integer, intent(out) | idslen, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 1 (Identification Section) of a GRIB2 message, starting at octet 6 of that Section.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end(returned) of Section 1. |
[out] | ids | Pointer to integer array containing information read from Section 1, the Identification section.
|
[out] | idslen | Number of elements in ids. |
[out] | ierr | Error return code.
|
Definition at line 41 of file g2unpack.F90.
References g2_gbytec().
Referenced by getgb2s2(), and gf_getfld().
subroutine gf_unpack2 | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, intent(out) | lencsec2, | ||
character(len = 1), dimension(:), pointer | csec2, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 2 (Local Use Section) of a GRIB2 message.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end (returned) of Section 2. |
[out] | lencsec2 | Length (in octets) of Local Use data. |
[out] | csec2 | Pointer to a character*1 array containing local use data. Caller should pass in an unassociated pointer, and must free memory allocated by this subroutine by calling deallocate on this pointer. |
[out] | ierr | Error return code.
|
Definition at line 99 of file g2unpack.F90.
References g2_gbytec().
Referenced by getgb2l2(), and gf_getfld().
subroutine gf_unpack3 | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, dimension(5), intent(out) | igds, | ||
integer, dimension(:), pointer | igdstmpl, | ||
integer, intent(out) | mapgridlen, | ||
integer, dimension(:), pointer | ideflist, | ||
integer, intent(out) | idefnum, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 3 (Grid Definition Section) of a GRIB2 message, starting at octet 6 of that Section.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end(returned) of Section 3. |
[out] | igds | Contains information read from the appropriate GRIB Grid Definition Section 3 for the field being returned. Must be dimensioned >= 5.
|
[out] | igdstmpl | Contains the data values for the specified Grid Definition Template (NN=igds(5)). Each element of this integer array contains an entry (in the order specified) of Grid Defintion Template 3.NN. A safe dimension for this array can be obtained in advance from maxvals(2), which is returned from subroutine gribinfo(). |
[out] | mapgridlen | Number of elements in igdstmpl. i.e. number of entries in Grid Defintion Template 3.NN (NN=igds(5)). |
[out] | ideflist | (Used if igds(3) .ne. 0) This array contains the number of grid points contained in each row (or column). (part of Section 3) A safe dimension for this array can be obtained in advance from maxvals(3), which is returned from subroutine gribinfo(). |
[out] | idefnum | (Used if igds(3) .ne. 0) The number of entries in array ideflist. i.e. number of rows (or columns) for which optional grid points are defined. |
[out] | ierr | Error return code.
|
Definition at line 182 of file g2unpack.F90.
References gridtemplates::extgridtemplate(), g2_gbytec(), g2_gbytesc(), and gridtemplates::getgridtemplate().
Referenced by getdim(), getgb2s2(), getpoly(), and gf_getfld().
subroutine gf_unpack4 | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, intent(out) | ipdsnum, | ||
integer, dimension(:), pointer | ipdstmpl, | ||
integer | mappdslen, | ||
real, dimension(:), pointer | coordlist, | ||
integer, intent(out) | numcoord, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 4 (Product Definition Section) of a GRIB2 message, starting at octet 6 of that Section.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end(returned) of Section 4. |
[out] | ipdsnum | Product Definition Template Number (Code Table 4.0). |
[out] | ipdstmpl | Contains the data values for the Product Definition Template specified by ipdsnum. A safe dimension for this array can be obtained in advance from maxvals(4), which is returned from subroutine gribinfo. |
[out] | mappdslen | Number of elements in ipdstmpl. i.e. number of entries in Product Defintion Template specified by ipdsnum. |
[out] | coordlist | Pointer to real array containing floating point values intended to document the vertical discretisation associated to model data on hybrid coordinate vertical levels (part of Section 4). Must be deallocated by caller. |
[out] | numcoord | Number of values in array coordlist. |
[out] | ierr | Error return code.
|
Definition at line 332 of file g2unpack.F90.
References pdstemplates::extpdstemplate(), g2_gbytec(), g2_gbytescr(), pdstemplates::getpdstemplate(), and rdieee().
Referenced by getgb2s2(), and gf_getfld().
subroutine gf_unpack5 | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, intent(out) | ndpts, | ||
integer, intent(out) | idrsnum, | ||
integer, dimension(:), pointer | idrstmpl, | ||
integer | mapdrslen, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 5 (Data Representation Section) of a GRIB2 message, starting at octet 6 of that Section.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end(returned) of Section 5. |
[out] | ndpts | Number of data points unpacked and returned. |
[out] | idrsnum | Data Representation Template Number (Code Table 5.0). |
[out] | idrstmpl | Contains the data values for the specified Data Representation Template (N = idrsnum). Each element of this integer array contains an entry (in the order specified) of Product Defintion Template 5.N A safe dimension for this array can be obtained in advance from maxvals(6), which is returned from subroutine gribinfo. |
[out] | mapdrslen | Number of elements in idrstmpl. i.e. number of entries in Data Representation Template 5.N (N = idrsnum). |
[out] | ierr | Error return code.
|
Definition at line 465 of file g2unpack.F90.
References drstemplates::extdrstemplate(), g2_gbytec(), and drstemplates::getdrstemplate().
Referenced by getgb2s2(), and gf_getfld().
subroutine gf_unpack6 | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, intent(in) | ngpts, | ||
integer, intent(out) | ibmap, | ||
logical*1, dimension(:), pointer | bmap, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 6 (Bit-Map Section) of a GRIB2 message, starting at octet 6 of that Section.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end(returned) of Section 6. |
[in] | ngpts | Number of grid points specified in the bit-map. |
[out] | ibmap | Bitmap indicator (see Code Table 6.0)
|
[out] | bmap | Logical*1 array containing decoded bitmap. (if ibmap=0) The dimension of this array can be obtained in advance from maxvals(7), which is returned from subroutine gribinfo(). |
[out] | ierr | Error return code.
|
Definition at line 575 of file g2unpack.F90.
References g2_gbytec(), and g2_gbytesc().
Referenced by getgb2r2(), and gf_getfld().
subroutine gf_unpack7 | ( | character(len = 1), dimension(lcgrib), intent(in) | cgrib, |
integer, intent(in) | lcgrib, | ||
integer, intent(inout) | iofst, | ||
integer, intent(in) | igdsnum, | ||
integer, dimension(:), pointer | igdstmpl, | ||
integer, intent(in) | idrsnum, | ||
integer, dimension(:), pointer | idrstmpl, | ||
integer, intent(in) | ndpts, | ||
real, dimension(:), pointer | fld, | ||
integer, intent(out) | ierr | ||
) |
Unpack Section 7 (Data Section) of a GRIB2 message.
[in] | cgrib | Character array that contains the GRIB2 message. |
[in] | lcgrib | Length (in bytes) of GRIB message array cgrib. |
[in,out] | iofst | Bit offset of the beginning/end(returned) of Section 7. |
[in] | igdsnum | Grid Definition Template Number (Code Table 3.0) (Only required to unpack DRT 5.51). |
[in] | igdstmpl | Pointer to an integer array containing the data values for the specified Grid Definition. Template (N = igdsnum). Each element of this integer array contains an entry (in the order specified) of Grid Definition Template 3.N (Only required to unpack DRT 5.51). |
[in] | idrsnum | Data Representation Template Number (Code Table 5.0). |
[in] | idrstmpl | Pointer to an integer array containing the data values for the Data Representation Template specified by idrsnum. A safe dimension for this array can be obtained in advance from maxvals(6), which is returned from subroutine gribinfo. |
[in] | ndpts | Number of data points unpacked and returned. |
[out] | fld | Pointer to a real array containing the unpacked data field. |
[out] | ierr | Error return code.
|
Definition at line 648 of file g2unpack.F90.
References comunpack(), g2_gbytec(), jpcunpack(), pngunpack(), rdieee(), simunpack(), and specunpack().
Referenced by getgb2r2(), and gf_getfld().