18 subroutine simunpack(cpack, len, idrstmpl, ndpts, fld)
21 character(len=1),
intent(in) :: cpack(len)
22 integer,
intent(in) :: ndpts, len
23 integer,
intent(in) :: idrstmpl(*)
24 real,
intent(out) :: fld(ndpts)
26 integer :: ifld(ndpts)
28 real :: ref, bscale, dscale
29 integer :: itype, j, nbits
33 bscale = 2.0**real(idrstmpl(2))
34 dscale = 10.0**real(-idrstmpl(3))
40 if (nbits .ne. 0)
then
41 call g2_gbytesc(cpack, ifld, 0, nbits, 0, ndpts)
43 fld(j) = ((real(ifld(j)) * bscale) + ref) * dscale
subroutine g2_gbytesc(in, iout, iskip, nbits, nskip, n)
Extract arbitrary size values from a packed bit string, right justifying each value in the unpacked a...
subroutine rdieee(rieee, a, num)
Copy array of 32-bit IEEE floating point values to local floating point representation.
subroutine simunpack(cpack, len, idrstmpl, ndpts, fld)
This subroutine unpacks a data field that was packed using a simple packing algorithm as defined in t...