NCEPLIBS-g2
3.5.0
|
Extract or store arbitrary size values between packed bit string and integer or real scalars, or integer arrays. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | g2_gbytec (in, iout, iskip, nbits) |
Extract one arbitrary size big-endian value (up to 32 bits) from a packed bit string into one element of an integer array. More... | |
subroutine | g2_gbytec1 (in, siout, iskip, nbits) |
Extract one arbitrary size big-endian integer value (up to 32 bits) from a packed bit string into a scalar integer. More... | |
subroutine | g2_gbytec8 (in, iout, iskip, nbits) |
Extract one arbitrary sized (up to 64-bits) values from a packed bit string, right justifying each value in the unpacked array. More... | |
subroutine | g2_gbytec81 (in, siout, iskip, nbits) |
Extract one arbitrary size big-endian integer value (up to 64 bits) from a packed bit string into a scalar integer. More... | |
subroutine | g2_gbytesc (in, iout, iskip, nbits, nskip, n) |
Extract arbitrary size big-endian integer values (up to 32 bits each) from a packed bit string. More... | |
subroutine | g2_gbytesc8 (in, iout, iskip, nbits, nskip, n) |
Extract arbitrary sized (up to 64-bits) values from a packed bit string, right justifying each value in the unpacked array. More... | |
subroutine | g2_gbytescr (in, rout, iskip, nbits, nskip, n) |
Extract big-endian floating-point values (32 bits each) from a packed bit string. More... | |
subroutine | g2_sbytec (out, in, iskip, nbits) |
Put one arbitrary sized (up to 32 bits) value from an integer array, into a packed bit string, in big-endian format. More... | |
subroutine | g2_sbytec1 (out, in, iskip, nbits) |
Put one arbitrary sized (up to 32 bits) values from an integer scalar into a packed bit string, in big-endian format. More... | |
subroutine | g2_sbytec8 (out, in, iskip, nbits) |
Put one arbitrary sized (up to 64 bits) values into a packed bit string, taking the low order bits from each value in the unpacked array. More... | |
subroutine | g2_sbytec81 (out, sin, iskip, nbits) |
Put one arbitrary sized (up to 64 bits) scalar into a packed bit string, taking the low order bits from each value in the unpacked array. More... | |
subroutine | g2_sbytesc (out, in, iskip, nbits, nskip, n) |
Put arbitrary size (up to 32 bits each) integer values into a packed bit string in big-endian order. More... | |
subroutine | g2_sbytesc8 (out, in, iskip, nbits, nskip, n) |
Put arbitrary sized (up to 64 bits each) values into a packed bit string, taking the low order bits from each value in the unpacked array. More... | |
subroutine | g2_sbytescr (out, rin, iskip, nbits, nskip, n) |
Put real values into a packed bit string in big-endian order. More... | |
subroutine | mkieee (a, rieee, num) |
Copy an array of real to an array of 32-bit IEEE floating points. More... | |
subroutine | rdieee (rieee, a, num) |
Copy array of 32-bit IEEE floating point values to local floating point representation. More... | |
subroutine | rdieeec (cieee, a, num) |
Copy array of 32-bit IEEE floating point values stored in char array to local floating point representation. More... | |
Extract or store arbitrary size values between packed bit string and integer or real scalars, or integer arrays.
Definition in file g2bytes.F90.
subroutine g2_gbytec | ( | character*1, dimension(*), intent(in) | in, |
integer, dimension(*), intent(inout) | iout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Extract one arbitrary size big-endian value (up to 32 bits) from a packed bit string into one element of an integer array.
This should be used converting one integer*4 value into an array element. If more values need to be converted, use g2_sbytesc(). To convert into a scalar integer, use g2_gbytec1().
[in] | in | Array input. |
[in,out] | iout | Unpacked array output. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer in IN to take. Must be 32 or less. |
Definition at line 20 of file g2bytes.F90.
References g2_gbytesc().
Referenced by comunpack(), gb_info(), getfield(), getlocal(), gf_getfld(), gf_unpack1(), gf_unpack2(), gf_unpack3(), gf_unpack4(), gf_unpack5(), gf_unpack6(), gf_unpack7(), gribinfo(), and skgb8().
subroutine g2_gbytec1 | ( | character*1, dimension(*), intent(in) | in, |
integer, intent(inout) | siout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Extract one arbitrary size big-endian integer value (up to 32 bits) from a packed bit string into a scalar integer.
This should be used converting one integer*4 value. If more values need to be converted, use g2_sbytesc().
[in] | in | Character array input. |
[in,out] | siout | Unpacked scalar integer output. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer to take. Must be 32 or less. |
Definition at line 51 of file g2bytes.F90.
References g2_gbytesc().
Referenced by addfield(), addgrid(), addlocal(), gb_info(), getfield(), getgb2l2(), getgb2r2(), getgb2rp2(), getgb2s2(), getlocal(), gettemplates(), gribend(), gribinfo(), ix2gb2(), unpack3(), unpack4(), unpack5(), and unpack6().
subroutine g2_gbytec8 | ( | character*1, dimension(*), intent(in) | in, |
integer (kind = 8), dimension(*), intent(inout) | iout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Extract one arbitrary sized (up to 64-bits) values from a packed bit string, right justifying each value in the unpacked array.
This should be used when input array in has only one element. If in has more elements, use g2_sbytesc().
[in] | in | Array input. |
[in,out] | iout | Unpacked array output. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer in IN to take. Must be 64 or less. |
Definition at line 177 of file g2bytes.F90.
References g2_gbytesc8().
Referenced by getgb2rp2().
subroutine g2_gbytec81 | ( | character*1, dimension(*), intent(in) | in, |
integer (kind = 8), intent(inout) | siout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Extract one arbitrary size big-endian integer value (up to 64 bits) from a packed bit string into a scalar integer.
This should be used converting one integer*4 value. If more values need to be converted, use g2_sbytesc().
[in] | in | Character array input. |
[in,out] | siout | Unpacked scalar integer output. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer to take. Must be 32 or less. |
Definition at line 208 of file g2bytes.F90.
References g2_gbytesc8().
Referenced by gb_info(), getfield(), getgb2l2(), getgb2r2(), getgb2rp2(), and gribinfo().
subroutine g2_gbytesc | ( | character*1, dimension(*), intent(in) | in, |
integer, dimension(*), intent(out) | iout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits, | ||
integer, intent(in) | nskip, | ||
integer, intent(in) | n | ||
) |
Extract arbitrary size big-endian integer values (up to 32 bits each) from a packed bit string.
[in] | in | array input |
[out] | iout | unpacked array output |
[in] | iskip | initial number of bits to skip |
[in] | nbits | Number of bits of each integer in IN to take. Must be 32 or less. |
[in] | nskip | Additional number of bits to skip on each iteration. |
[in] | n | Number of integers to extract. |
Definition at line 119 of file g2bytes.F90.
Referenced by comunpack(), g2_gbytec(), g2_gbytec1(), g2_gbytescr(), gf_unpack3(), gf_unpack6(), pngunpack(), simunpack(), specunpack(), unpack3(), and unpack6().
subroutine g2_gbytesc8 | ( | character*1, dimension(*), intent(in) | in, |
integer (kind = 8), dimension(*), intent(out) | iout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits, | ||
integer, intent(in) | nskip, | ||
integer, intent(in) | n | ||
) |
Extract arbitrary sized (up to 64-bits) values from a packed bit string, right justifying each value in the unpacked array.
[in] | in | array input |
[out] | iout | unpacked array output |
[in] | iskip | initial number of bits to skip |
[in] | nbits | Number of bits of each integer in IN to take. Must be 64 or less. |
[in] | nskip | Additional number of bits to skip on each iteration. |
[in] | n | Number of integers to extract. |
Definition at line 240 of file g2bytes.F90.
Referenced by g2_gbytec8(), and g2_gbytec81().
subroutine g2_gbytescr | ( | character*1, dimension(*), intent(in) | in, |
real (kind = 4), dimension(*), intent(out) | rout, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits, | ||
integer, intent(in) | nskip, | ||
integer, intent(in) | n | ||
) |
Extract big-endian floating-point values (32 bits each) from a packed bit string.
[in] | in | array input |
[out] | rout | unpacked array output |
[in] | iskip | initial number of bits to skip |
[in] | nbits | Number of bits of each real in IN to take. Must be 32. |
[in] | nskip | Additional number of bits to skip on each |
[in] | n | Number of floats to extract. |
Definition at line 85 of file g2bytes.F90.
References g2_gbytesc().
Referenced by gf_unpack4(), and unpack4().
subroutine g2_sbytec | ( | character*1, dimension(*), intent(inout) | out, |
integer, dimension(*), intent(in) | in, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Put one arbitrary sized (up to 32 bits) value from an integer array, into a packed bit string, in big-endian format.
This should be used when input is an array and one value is to be packed. If more values are to be packed, use g2_sbytesc(). If packing a scalar integer, use g2_sytec1().
[in,out] | out | packed array output |
[in] | in | unpacked array input |
[in] | iskip | initial number of bits to skip |
[in] | nbits | Number of bits of each integer in OUT to fill. |
Definition at line 305 of file g2bytes.F90.
References g2_sbytesc().
Referenced by addfield(), addgrid(), compack(), gribcreate(), misspack(), and simpack().
subroutine g2_sbytec1 | ( | character*1, dimension(*), intent(inout) | out, |
integer, intent(in) | in, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Put one arbitrary sized (up to 32 bits) values from an integer scalar into a packed bit string, in big-endian format.
This should be used when input array in is a scalar. If an array element is to be packed, use g1_sbytec(). If more than one integer is to be packed, use g2_sbytesc().
[in,out] | out | packed characeter array output. |
[in] | in | unpacked scalar integer input. |
[in] | iskip | initial number of bits to skip. |
[in] | nbits | Number of bits of each integer in OUT to fill. |
Definition at line 336 of file g2bytes.F90.
References g2_sbytesc().
Referenced by addfield(), addgrid(), addlocal(), gribcreate(), gribend(), and ix2gb2().
subroutine g2_sbytec8 | ( | character*1, dimension(*), intent(inout) | out, |
integer (kind = 8), dimension(*), intent(in) | in, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Put one arbitrary sized (up to 64 bits) values into a packed bit string, taking the low order bits from each value in the unpacked array.
This should be used when input array IN has only one element. If IN has more elements, use g2_sbytesc8().
[in,out] | out | packed array output |
[in] | in | unpacked array input |
[in] | iskip | initial number of bits to skip |
[in] | nbits | Number of bits of each integer in OUT to fill. Must be 64 or less. |
Definition at line 472 of file g2bytes.F90.
References g2_sbytesc8().
subroutine g2_sbytec81 | ( | character*1, dimension(*), intent(inout) | out, |
integer (kind = 8), intent(in) | sin, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits | ||
) |
Put one arbitrary sized (up to 64 bits) scalar into a packed bit string, taking the low order bits from each value in the unpacked array.
This should be used when input is a scalar. If the input is an array, use sbytec8() or g2_sbytesc8().
[in,out] | out | packed array output |
[in] | sin | unpacked scalar input |
[in] | iskip | initial number of bits to skip |
[in] | nbits | Number of bits of each integer in OUT to fill. Must be 64 or less. |
Definition at line 504 of file g2bytes.F90.
References g2_sbytesc8().
Referenced by getgb2rp2(), and ix2gb2().
subroutine g2_sbytesc | ( | character*1, dimension(*), intent(out) | out, |
integer, dimension(n), intent(in) | in, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits, | ||
integer, intent(in) | nskip, | ||
integer, intent(in) | n | ||
) |
Put arbitrary size (up to 32 bits each) integer values into a packed bit string in big-endian order.
[out] | out | Packed character array output. |
[in] | in | Integer array input. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer in OUT to fill. Must be 32 or less. |
[in] | nskip | Additional number of bits to skip on each iteration. |
[in] | n | Number of iterations. |
Definition at line 401 of file g2bytes.F90.
Referenced by addfield(), addgrid(), compack(), g2_sbytec(), g2_sbytec1(), g2_sbytescr(), jpcpack(), misspack(), pngpack(), and simpack().
subroutine g2_sbytesc8 | ( | character*1, dimension(*), intent(out) | out, |
integer (kind = 8), dimension(n), intent(in) | in, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits, | ||
integer, intent(in) | nskip, | ||
integer, intent(in) | n | ||
) |
Put arbitrary sized (up to 64 bits each) values into a packed bit string, taking the low order bits from each value in the unpacked array.
[out] | out | Packed array output. |
[in] | in | Unpacked array input. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer in OUT to fill. Must be 64 or less. |
[in] | nskip | Additional number of bits to skip on each iteration. |
[in] | n | Number of iterations. |
Definition at line 538 of file g2bytes.F90.
Referenced by g2_sbytec8(), and g2_sbytec81().
subroutine g2_sbytescr | ( | character*1, dimension(*), intent(out) | out, |
real, dimension(n), intent(in) | rin, | ||
integer, intent(in) | iskip, | ||
integer, intent(in) | nbits, | ||
integer, intent(in) | nskip, | ||
integer, intent(in) | n | ||
) |
Put real values into a packed bit string in big-endian order.
[out] | out | Packed character array output. |
[in] | rin | real array input. |
[in] | iskip | Initial number of bits to skip. |
[in] | nbits | Number of bits of each integer in OUT to fill. Must be 32. |
[in] | nskip | Additional number of bits to skip on each iteration. |
[in] | n | Number of iterations. |
Definition at line 367 of file g2bytes.F90.
References g2_sbytesc().
Referenced by addfield().
subroutine mkieee | ( | real(4), dimension(num), intent(in) | a, |
real(4), dimension(num), intent(out) | rieee, | ||
integer, intent(in) | num | ||
) |
Copy an array of real to an array of 32-bit IEEE floating points.
[in] | a | Input array of floating point values. |
[out] | rieee | Output array of floating point values in 32-bit IEEE format. Note that this array is always 32-bit floats, even when compiled with -d. |
[in] | num | Number of floating point values to convert. |
Definition at line 684 of file g2bytes.F90.
Referenced by addfield(), compack(), jpcpack(), misspack(), pngpack(), simpack(), and specpack().
subroutine rdieee | ( | real(4), dimension(num), intent(in) | rieee, |
real, dimension(num), intent(out) | a, | ||
integer, intent(in) | num | ||
) |
Copy array of 32-bit IEEE floating point values to local floating point representation.
[in] | rieee | Input array of floating point values in 32-bit IEEE format. Note that this array is always 32-bit floats, even when compiled with -d. |
[out] | a | Output array of real values. |
[in] | num | Number of floating point values to convert. |
Definition at line 636 of file g2bytes.F90.
Referenced by comunpack(), getfield(), gf_unpack4(), gf_unpack7(), jpcunpack(), misspack(), pngunpack(), rdieeec(), simunpack(), specunpack(), and unpack4().
subroutine rdieeec | ( | character(len = 1), dimension(*), intent(in) | cieee, |
real, dimension(num), intent(out) | a, | ||
integer, intent(in) | num | ||
) |
Copy array of 32-bit IEEE floating point values stored in char array to local floating point representation.
[in] | cieee | Input char array containing floating point values in 32-bit IEEE format. |
[out] | a | Output array of real values. |
[in] | num | Number of floating point values to convert. |
Definition at line 606 of file g2bytes.F90.
References rdieee().
Referenced by specunpack().