NCEPLIBS-g2 4.0.0
|
Pack/unpack a data field that was packed with AEC compression. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | aecpack (fld, width, height, idrstmpl, cpack, lcpack) |
Pack a data field into a AEC code stream as defined in Data Representation Template 5.42. | |
subroutine | aecunpack (cpack, len, idrstmpl, ndpts, fld) |
Unpack a data field from a AEC code stream as defined in Data Representation Template 5.42. | |
Pack/unpack a data field that was packed with AEC compression.
Definition in file g2aec.F90.
subroutine aecpack | ( | real, dimension(width*height), intent(in) | fld, |
integer, intent(in) | width, | ||
integer, intent(in) | height, | ||
integer, dimension(*), intent(inout) | idrstmpl, | ||
character(len=1), dimension(*), intent(out) | cpack, | ||
integer, intent(inout) | lcpack | ||
) |
Pack a data field into a AEC code stream as defined in Data Representation Template 5.42.
After the data are scaled, and the reference value is subtracted out, the data are passed to the AEC encoder.
This function also fills in GRIB2 Data Representation Template 5.42 with the appropriate values.
[in] | fld | The data values to pack. |
[in] | width | number of points in the x direction |
[in] | height | number of points in the y direction |
[in,out] | idrstmpl | Contains the array of values for Data Representation Template Table 5.42.
|
[out] | cpack | The packed data field (character*1 array). |
[in,out] | lcpack | When function is called, contains the length of buffer cpack. After functions returns, contains the length of the packed data in bytes. |
Definition at line 36 of file g2aec.F90.
Referenced by addfield().
subroutine aecunpack | ( | 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 from a AEC code stream as defined in Data Representation Template 5.42.
[in] | cpack | The packed data field (character*1 array). |
[in] | len | length of packed field cpack(). |
[in] | idrstmpl | Array of values for Data Representation Template 5.42. |
[in] | ndpts | The number of data values to unpack. |
[out] | fld | Contains the unpacked data values. |
Definition at line 94 of file g2aec.F90.
Referenced by getfield(), and gf_unpack7().