NCEPLIBS-g2
3.5.0
|
Pack/unpack a data field into a JPEG2000 code stream as defined in Data Representation Template 5.40. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | jpcpack (fld, width, height, idrstmpl, cpack, lcpack) |
Pack a data field into a JPEG2000 code stream as defined in Data Representation Template 5.40. More... | |
subroutine | jpcunpack (cpack, len, idrstmpl, ndpts, fld) |
Unpack a data field from a JPEG2000 code stream as defined in Data Representation Template 5.40. More... | |
Pack/unpack a data field into a JPEG2000 code stream as defined in Data Representation Template 5.40.
Definition in file g2jpc.F90.
subroutine jpcpack | ( | 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 JPEG2000 code stream as defined in Data Representation Template 5.40.
After the data field is scaled, and the reference value is subtracted out, it is treated as a grayscale image and passed to a JPEG2000 encoder. This subroutine also fills in the DRT 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 5.2 or 5.3
|
[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 34 of file g2jpc.F90.
References enc_jpeg2000(), g2_sbytesc(), and mkieee().
Referenced by addfield().
subroutine jpcunpack | ( | 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 JPEG2000 code stream as defined in Data Representation Template 5.40.
This subroutine unpacks a data field that was packed into a JPEG2000 code stream using info from the GRIB2 Data Representation Template 5.40 or 5.40000.
[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.40 or 5.40000. |
[in] | ndpts | The number of data values to unpack. |
[out] | fld | Contains the unpacked data values. |
Definition at line 176 of file g2jpc.F90.
References dec_jpeg2000(), and rdieee().
Referenced by getfield(), and gf_unpack7().