NCEPLIBS-g2
3.5.0
|
Pack/unpack a data field using simple packing algorithm. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | simpack (fld, ndpts, idrstmpl, cpack, lcpack) |
Pack a data field using a simple packing algorithm. More... | |
subroutine | simunpack (cpack, len, idrstmpl, ndpts, fld) |
Unpack a data field that was packed using a simple packing, [Data Representation Template 5.0](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp5-0.shtml). More... | |
Pack/unpack a data field using simple packing algorithm.
Definition in file g2sim.F90.
subroutine simpack | ( | real, dimension(ndpts), intent(in) | fld, |
integer, intent(in) | ndpts, | ||
integer, dimension(*), intent(inout) | idrstmpl, | ||
character(len=1), dimension(*), intent(out) | cpack, | ||
integer, intent(out) | lcpack | ||
) |
Pack a data field using a simple packing algorithm.
This subroutine also fills in GRIB2 Data Representation Template 5.0 with the appropriate values.
[in] | fld | Contains the data values to pack. |
[in] | ndpts | The number of data values in array fld. |
[in,out] | idrstmpl | Contains the array of values for Data Representation Template 5.2 or 5.3.
|
[out] | cpack | The packed data field (character*1 array). |
[out] | lcpack | length of packed field cpack. |
Definition at line 26 of file g2sim.F90.
References g2_sbytec(), g2_sbytesc(), and mkieee().
Referenced by addfield(), and specpack().
subroutine simunpack | ( | character(len=1), dimension(len), intent(in) | cpack, |
integer, intent(in) | len, | ||
integer, dimension(*), intent(in) | idrstmpl, | ||
integer, intent(in) | ndpts, | ||
real, dimension(ndpts), intent(out) | fld | ||
) |
Unpack a data field that was packed using a simple packing, [Data Representation Template 5.0](https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_temp5-0.shtml).
[in] | cpack | The packed data field (character*1 array). |
[in] | len | length of packed field cpack. |
[in] | idrstmpl | Contains the array of values for Data Representation Template 5.0. |
[in] | ndpts | The number of data values to unpack. |
[out] | fld | Contains the unpacked data values. |
Definition at line 168 of file g2sim.F90.
References g2_gbytesc(), and rdieee().
Referenced by getfield(), and gf_unpack7().