NCEPLIBS-w3emc 2.12.0
Loading...
Searching...
No Matches
w3fi88.f File Reference

BUFR message decoder. More...

Go to the source code of this file.

Functions/Subroutines

subroutine fi8801 (iptr, ident, msga, istack, iwork, kdata, ivals, mstack, knr, index, maxr, maxd, kfxy1, aname1, aunit1, iscal1, irfvl1, iwide1, irf1sw, inewvl, kfxy2, aname2, aunit2, iscal2, irfvl2, iwide2, kfxy3, aname3, aunit3, iscal3, irfvl3, iwide3, iunitb, iunitd, itbld, itbld2, kptrb, kptrd)
 Data extraction.
 
subroutine fi8802 (iptr, ident, msga, kdata, kfxy1, ll, mstack, aunit1, iwide1, irfvl1, iscal1, jdesc, ivals, j, maxr, maxd, kptrb)
 Process element descriptor.
 
subroutine fi8803 (iptr, ident, msga, kdata, ivals, mstack, iwide1, irfvl1, iscal1, j, jdesc, maxr, maxd)
 Process compressed data.
 
subroutine fi8804 (iptr, msga, kdata, ivals, mstack, iwide1, irfvl1, iscal1, j, ll, jdesc, maxr, maxd)
 Process serial data.
 
subroutine fi8805 (iptr, ident, msga, iwork, lx, ly, kdata, ll, knr, mstack, maxr, maxd)
 Process a replication descriptor.
 
subroutine fi8806 (iptr, lx, ly, ident, msga, kdata, ivals, mstack, iwide1, irfvl1, iscal1, j, ll, kfxy1, iwork, jdesc, maxr, maxd, kptrb)
 Process operator descriptors.
 
subroutine fi8807 (iptr, iwork, itbld, itbld2, jdesc, kptrd)
 Process queue descriptor.
 
subroutine fi8808 (iptr, iwork, lf, lx, ly, jdesc)
 Program history log:
 
subroutine fi8809 (ident, mstack, kdata, iptr, maxr, maxd)
 Reformat profiler w hgt increments.
 
subroutine fi8810 (ident, mstack, kdata, iptr, maxr, maxd)
 Reformat profiler edition 2 data.
 
subroutine fi8811 (iptr, ident, mstack, kdata, knr, ldata, lstack, maxd, maxr)
 Expand data/descriptor replication.
 
subroutine fi8812 (iptr, iunitb, iunitd, istack, nrdesc, kptrb, kptrd, irf1sw, newref, itbld, itbld2, kfxy1, aname1, aunit1, iscal1, irfvl1, iwide1, kfxy2, aname2, aunit2, iscal2, irfvl2, iwide2)
 
subroutine fi8813 (iptr, maxr, maxd, mstack, kdata, ident, kptrd, kptrb, itbld, aname1, aunit1, kfxy1, iscal1, irfvl1, iwide1, iunitb)
 
subroutine fi8814 (ascchr, npos, newval, ierr, iptr)
 
subroutine fi8815 (iptr, ident, jdesc, kdata, kfxy3, maxr, maxd, aname3, aunit3, iscal3, irfvl3, iwide3, keyset, ibflag, ierr)
 
subroutine fi8818 (iptr, kfxy1, aname1, aunit1, iscal1, irfvl1, iwide1, kfxy2, aname2, aunit2, iscal2, irfvl2, iwide2, kptrb)
 
subroutine fi8819 (iptr, itbld, itbld2, kptrd)
 
subroutine fi8820 (itbld, iunitd, iptr, itbld2, kptrd)
 
subroutine w3fi88 (iptr, ident, msga, istack, mstack, kdata, knr, index, ldata, lstack, maxr, maxd, iunitb, iunitd)
 This set of routines will decode a bufr message and place information extracted from the bufr message into selected arrays for the user.
 

Detailed Description

BUFR message decoder.

Author
Bill Cavanaugh
Date
1988-08-31

Definition in file w3fi88.f.

Function/Subroutine Documentation

◆ fi8801()

subroutine fi8801 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(*)  istack,
integer, dimension(*)  iwork,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,maxd)  mstack,
integer, dimension(maxr)  knr,
integer  index,
integer  maxr,
integer  maxd,
integer, dimension(*)  kfxy1,
character*40, dimension(*)  aname1,
character*24, dimension(*)  aunit1,
integer, dimension(*)  iscal1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iwide1,
  irf1sw,
  inewvl,
integer, dimension(*)  kfxy2,
character*64, dimension(*)  aname2,
character*24, dimension(*)  aunit2,
integer, dimension(*)  iscal2,
integer, dimension(*)  irfvl2,
integer, dimension(*)  iwide2,
integer, dimension(200)  kfxy3,
character*64, dimension(200)  aname3,
character*24, dimension(200)  aunit3,
integer, dimension(200)  iscal3,
integer, dimension(200)  irfvl3,
integer, dimension(200)  iwide3,
  iunitb,
  iunitd,
integer, dimension(20,*)  itbld,
integer, dimension(20,*)  itbld2,
integer, dimension(*)  kptrb,
integer, dimension(*)  kptrd 
)

Data extraction.

Author
Bill Cavanaugh
Date
1988-09-01 Control the extraction of data from section 4 based on data descriptors.

Program history log:

  • Bill Cavanaugh 1988-09-01\
  • Bill Cavanaugh 1991-01-18 Corrections to properly handle non-compressed DATA.
  • Bill Cavanaugh 1991-09-23 Coding added to handle single subsets with DELAYED REPLICATION.
  • Bill Cavanaugh 1992-01-24 Modified to echo descriptors to mstack(1,n)
  • Dennis Keyser 1995-06-07 Corrected an error which required input argument "maxd" to be nearly twice as large as needed for decoding wind profiler reports (limit upper bound for "iwork" array was set to "maxd", now it is set to 15000)
Parameters
[in]IPTRSee w3fi88() routine docblock
[in]IDENTSee w3fi88() routine docblock
[in]MSGAArray containing bufr message
[in,out]ISTACKOriginal array of descriptors extracted from source bufr message.
[in]MSTACKWorking array of descriptors (expanded)and scaling factor
[in,out]KFXY1+KFXY2+KFXY3Image of current descriptor
[in]INDEX
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[in]IUNITBUnit number of data set holding table b
[in]IUNITDUnit number of data set holding table d
[out]IWORKWorking descriptor list
[out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)

arrays containing data from table b

Parameters
[out]AUNIT1+AUNIT2+AUNIT3Units for descriptor
[out]ANAME1+ANAME2+ANAME3Descriptor name
[out]ISCAL1+ISCAL2+ISCAL3Scale for value of descriptor
[out]IRFVL1+IRFVL2+IRFVL3Reference value for descriptor
[out]IWIDE1+IWIDE2+IWIDE3Bit width for value of descriptor
ITBLD+ITBLD2
KPTRB
KPTRD
KNR
IVALS
IRF1SW
INEWVL

Error return:

  • IPTR(1)
    • = 8 Error reading table b
    • = 9 Error reading table d
    • = 11 Error opening table b
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 967 of file w3fi88.f.

◆ fi8802()

subroutine fi8802 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  kfxy1,
  ll,
integer, dimension(2,maxd)  mstack,
character*24, dimension(*)  aunit1,
integer, dimension(*)  iwide1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iscal1,
integer  jdesc,
integer, dimension(*)  ivals,
integer  j,
  maxr,
  maxd,
integer, dimension(*)  kptrb 
)

Process element descriptor.

Author
Bill Cavanaugh
Date
1988-09-01 Process an element descriptor (f = 0) and store data in output array.

Program history log: 88-09-01 91-04-04 Changed to pass width of text fields in bytes

Parameters
[in]IPTRSee w3fi88 routine docblock
[in]IDENTSee w3fi88 routine docblock
[in]MSGAArray containing bufr message
[in,out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)
[in,out]KFXY1Image of current descriptor
[in]MSTACK
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice arrays containing data from table b
[out]AUNIT1Units for descriptor
[out]ISCAL1Scale for value of descriptor
[out]IRFVL1Reference value for descriptor
[out]IWIDE1Bit width for value of descriptor
LL
JDESC
IVALS
J
KPTRB

Error return: IPTR(1) = 3 - Message contains a descriptor with f=0 that does not exist in table b.

Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1307 of file w3fi88.f.

◆ fi8803()

subroutine fi8803 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,maxd)  mstack,
integer, dimension(*)  iwide1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iscal1,
integer  j,
integer  jdesc,
integer  maxr,
integer  maxd 
)

Process compressed data.

Author
Bill Cavanaugh
Date
1988-09-01 Process compressed data and place individual elements into output array.

Program history log:

  • Bill Cavanaugh 1988-09-01
  • Bill Cavanaugh 1991-04-04 Text handling portion of this routine modified to hanle width of fields in bytes.
  • Bill Cavanaugh 1991-04-17 Tests showed that the same data in compressed and uncompressed form gave different results. this has been corrected.
  • Bill Cavanaugh 1991-06-21 Processing of text data has been changed to provide exact reproduction of all characters.
  • Bill Cavanaugh 1994-04-11 Corrected processing of data when all values the same (nbinc = 0). corrected test of lowest value against proper bit mask.
  • Dennis Keyser 1995-06-07 Corrected an error which resulted in returned scale in "mstack(2, ..)" always being set to zero for compressed data. also, scale changes were not being recognized.
Parameters
[in]IPTRSee w3fi88 routine docblock
[in]IDENTSee w3fi88 routine docblock
[in]MSGAArray containing bufr message,mstack,
[in]IVALSArray of single parameter values
[in,out]J
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd) arrays containing data from table b
[out]ISCAL1Scale for value of descriptor
[out]IRFVL1Reference value for descriptor
[out]IWIDE1Bit width for value of descriptor
MSTACK
JDESC
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1412 of file w3fi88.f.

◆ fi8804()

subroutine fi8804 ( integer, dimension(*)  iptr,
integer, dimension(*)  msga,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,maxd)  mstack,
integer, dimension(*)  iwide1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iscal1,
integer  j,
integer  ll,
integer  jdesc,
integer  maxr,
integer  maxd 
)

Process serial data.

Author
Bill Cavanaugh
Date
1988-09-01 Process data that is not compressed

Program history log:

  • Bill cavanaugh 1988-09-01
  • Bill cavanaugh 1991-01-18 Modified to properly handle non-compressed data.
  • Bill cavanaugh 1991-04-04 Text handling portion of this routine modified to handle field width in bytes.
  • Bill cavanaugh 1991-04-17 ests showed that the same data in compressed and uncompressed form gave different results. this has been corrected.
Parameters
[in]IPTRSee w3fi88() routine docblock
[in]MSGAArray containing bufr message
[in,out]IVALSArray of single parameter values
[in,out]J
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd) Arrays containing data from table b
[out]ISCAL1Scale for value of descriptor
[out]IRFVL1Reference value for descriptor
[out]IWIDE1Bit width for value of descriptorE
MSTACK
LL
JDESC

Error return: IPTR(1) = 13 - Bit width on ascii chars not a multiple of 8

Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1731 of file w3fi88.f.

◆ fi8805()

subroutine fi8805 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(*)  iwork,
integer  lx,
integer  ly,
integer, dimension(maxr,maxd)  kdata,
integer  ll,
integer, dimension(maxr)  knr,
integer, dimension(2,maxd)  mstack,
  maxr,
  maxd 
)

Process a replication descriptor.

Author
Bill Cavanaugh
Date
1988-09-01 Process a replication descriptor, must extract number of replications of n descriptors from the data stream.

Program history log:

  • Bill Cavanaugh 1988-09-01
Parameters
[in]IWORKWorking descriptor list
[in]IPTRSee w3fi88 routine docblock
[in]IDENTSee w3fi88 routine docblock
[in,out]LXX portion of current descriptor
[in,out]LYY portion of current descriptor
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)
MSGA
LL
KNR
MSTACK

Error return:

  • IPTR(1)
    • = 12 Data descriptor qualifier does not follow delayed replication descriptor
    • = 20 Exceeded count for delayed replication pass
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1939 of file w3fi88.f.

◆ fi8806()

subroutine fi8806 ( integer, dimension(*)  iptr,
integer  lx,
integer  ly,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,maxd)  mstack,
integer, dimension(*)  iwide1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iscal1,
integer  j,
integer  ll,
integer, dimension(*)  kfxy1,
integer, dimension(*)  iwork,
integer  jdesc,
  maxr,
  maxd,
integer, dimension(*)  kptrb 
)

Process operator descriptors.

Author
Bill Cavanaugh
Date
1988-09-01 Extract and save indicated change values for use until changes are rescinded, or extract text strings indicated through 2 05 yyy.

Program history log:

  • Bill Cavanaugh 1988-09-01
  • Bill Cavanaugh 1991-04-04 Modified to handle descriptor 2 05 yyy
  • Bill Cavanaugh 1991-05-10 Coding has been added to process properly table c descriptor 2 06 yyy.
  • Bill Cavanaugh 1991-11-21 Coding has been added to properly process table c descriptor 2 03 yyy, the change to new reference value for selected descriptors.
Parameters
[in]IPTRSee w3fi88 routine docblock
[in]LXX portion of current descriptor
[in]LYY portion of current descriptor
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd) Arrays containing data from table b
[out]ISCAL1Scale for value of descriptor
[out]IRFVL1Reference value for descriptor
[out]IWIDE1Bit width for value of descriptor
IDENT
MSGA
IVALS
MSTACK
J
LL
KFXY1
IWORK
JDESC
KPTRB

Error return: IPTR(1) = 5 - Erroneous x value in data descriptor operator

Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 2147 of file w3fi88.f.

◆ fi8807()

subroutine fi8807 ( integer, dimension(*)  iptr,
integer, dimension(*)  iwork,
integer, dimension(20,*)  itbld,
integer, dimension(20,*)  itbld2,
integer  jdesc,
integer, dimension(*)  kptrd 
)

Process queue descriptor.

Author
Bill Cavanaugh
Date
1988-09-01 Substitute descriptor queue for queue descriptor.

Program history log:

  • Bill Cavanaugh 1988-09-01
  • Bill Cavanaugh 1991-04-17 Improved handling of nested queue descriptors
  • Bill Cavanaugh 1991-05-28 Improved handling of nested queue descriptors based on tests with live data.
Parameters
[in]IWORKWorking descriptor list
[in]IPTRSee w3fi88 routine docblock
[in]ITBLD+ITBLD2Array containing descriptor queues
[in]JDESCQueue descriptor to be expanded
KPTRD
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 2371 of file w3fi88.f.

◆ fi8808()

subroutine fi8808 ( integer, dimension(*)  iptr,
integer, dimension(*)  iwork,
integer  lf,
integer  lx,
integer  ly,
integer  jdesc 
)

Program history log:

Author
Bill Cavanaugh
Date
1988-09-01 - Bill Cavanaugh 1988-09-01
Parameters
[in,out]IPTRSee w3fi88 routine docblock
[in]IWORKWorking descriptor list
LF
LX
LY
JDESC
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 2458 of file w3fi88.f.

◆ fi8809()

subroutine fi8809 ( integer, dimension(*)  ident,
integer, dimension(2,maxd)  mstack,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  iptr,
  maxr,
  maxd 
)

Reformat profiler w hgt increments.

Author
Bill Cavanaugh
Date
1990-02-14 Reformat decoded profiler data to show heights instead of height increments.

Program history log:

  • Bill Cavanaugh 1990-02-14
Parameters
[in]IDENTArray contains message information extracted from BUFR message
  • IDENT(1) - Edition number (byte 4, section 1)
  • IDENT(2) - Originating center (bytes 5-6, section 1)
  • IDENT(3) - Update sequence (byte 7, section 1)
  • IDENT(4) - (byte 8, section 1)
  • IDENT(5) - Bufr message type (byte 9, section 1)
  • IDENT(6) - Bufr msg sub-type (byte 10, section 1)
  • IDENT(7) - (bytes 11-12, section 1)
  • IDENT(8) - Year of century (byte 13, section 1)
  • IDENT(9) - Month of year (byte 14, section 1)
  • IDENT(10) - Day of month (byte 15, section 1)
  • IDENT(11) - Hour of day (byte 16, section 1)
  • IDENT(12) - Minute of hour (byte 17, section 1)
  • IDENT(13) - Rsvd by adp centers (byte 18, section 1)
  • IDENT(14) - Nr of data subsets (byte 5-6, section 3)
  • IDENT(15) - Observed flag (byte 7, bit 1, section 3)
  • IDENT(16) - Compression flag (byte 7, bit 2, section 3)
[in]MSTACKWorking descriptor list and scaling factor
[in]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)
[in]IPTRSee w3fi88
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
Author
Bill Cavanaugh
Date
1990-02-14

Definition at line 2516 of file w3fi88.f.

◆ fi8810()

subroutine fi8810 ( integer, dimension(*)  ident,
integer, dimension(2,maxd)  mstack,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  iptr,
  maxr,
  maxd 
)

Reformat profiler edition 2 data.

Author
Bill Cavanaugh
Date
1993-01-27 Reformat profiler data in edition 2

Program history log:

  • Bill Cavanaugh 1993-01-27
  • Dennis Keyser 1995-06-07 A correction was made to prevent unnecessary looping when all requested descriptors are missing.
Parameters
[in]IDENT- ARRAY CONTAINS MESSAGE INFORMATION EXTRACTED FROM BUFR MESSAGE -
  • IDENT(1) - Edition number (byte 4, section 1)
  • IDENT(2) - Originating center (bytes 5-6, section 1)
  • IDENT(3) - Update sequence (byte 7, section 1)
  • IDENT(4) - (byte 8, section 1)
  • IDENT(5) - Bufr message type (byte 9, section 1)
  • IDENT(6) - Bufr msg sub-type (byte 10, section 1)
  • IDENT(7) - (bytes 11-12, section 1)
  • IDENT(8) - Year of century (byte 13, section 1)
  • IDENT(9) - Month of year (byte 14, section 1)
  • IDENT(10) - Day of month (byte 15, section 1)
  • IDENT(11) - Hour of day (byte 16, section 1)
  • IDENT(12) - Minute of hour (byte 17, section 1)
  • IDENT(13) - Rsvd by adp centers(byte 18, section 1)
  • IDENT(14) - Nr of data subsets (byte 5-6, section 3)
  • IDENT(15) - Observed flag (byte 7, bit 1, section 3)
  • IDENT(16) - Compression flag (byte 7, bit 2, section 3)
[in]MSTACKWorking descriptor list and scaling factor
[in]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)
[in]IPTRSee w3fi88
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
Author
Bill Cavanaugh
Date
1993-01-27

Definition at line 2910 of file w3fi88.f.

◆ fi8811()

subroutine fi8811 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(2,maxd)  mstack,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(maxr)  knr,
integer, dimension(maxd)  ldata,
integer, dimension(2,maxd)  lstack,
  maxd,
  maxr 
)

Expand data/descriptor replication.

Author
Bill Cavanaugh
Date
1993-05-12 Expand data and descriptor strings

Program history log:

  • Bill Cavanaugh 1993-05-12
Parameters
[in]IPTRSee w3fi88 routine docblock
[in]IDENTSee w3fi88 routine docblock
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[in,out]KDATAArray containing decoded reports from bufr message. kdata(report number,parameter number) (report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)
[in,out]MSTACKList of descriptors and scale values
KNR
LDATA
LSTACK

Error return:

  • IPTR(1)
Author
Bill Cavanaugh
Date
1993-05-12

Definition at line 3247 of file w3fi88.f.

◆ fi8812()

subroutine fi8812 ( integer, dimension(*)  iptr,
integer  iunitb,
integer  iunitd,
integer, dimension(*)  istack,
integer  nrdesc,
integer, dimension(*)  kptrb,
integer, dimension(*)  kptrd,
  irf1sw,
integer, dimension(*)  newref,
integer, dimension(20,*)  itbld,
integer, dimension(20,*)  itbld2,
integer, dimension(*)  kfxy1,
character*40, dimension(*)  aname1,
character*24, dimension(*)  aunit1,
integer, dimension(*)  iscal1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iwide1,
integer, dimension(*)  kfxy2,
character*64, dimension(*)  aname2,
character*24, dimension(*)  aunit2,
integer, dimension(*)  iscal2,
integer, dimension(*)  irfvl2,
integer, dimension(*)  iwide2 
)

Definition at line 3311 of file w3fi88.f.

◆ fi8813()

subroutine fi8813 ( integer, dimension(*)  iptr,
integer  maxr,
integer  maxd,
integer, dimension(2,maxd)  mstack,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  ident,
integer, dimension(*)  kptrd,
integer, dimension(*)  kptrb,
integer, dimension(20,*)  itbld,
character*40, dimension(*)  aname1,
character*24, dimension(*)  aunit1,
integer, dimension(*)  kfxy1,
integer, dimension(*)  iscal1,
integer, dimension(*)  irfvl1,
integer, dimension(*)  iwide1,
integer  iunitb 
)

Definition at line 3467 of file w3fi88.f.

◆ fi8814()

subroutine fi8814 ( character*64  ascchr,
  npos,
  newval,
integer  ierr,
integer, dimension(*)  iptr 
)

Definition at line 3993 of file w3fi88.f.

◆ fi8815()

subroutine fi8815 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer  jdesc,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(*)  kfxy3,
integer  maxr,
integer  maxd,
character*64, dimension(*)  aname3,
character*24, dimension(*)  aunit3,
integer, dimension(*)  iscal3,
integer, dimension(*)  irfvl3,
integer, dimension(*)  iwide3,
integer  keyset,
  ibflag,
  ierr 
)

Definition at line 4076 of file w3fi88.f.

◆ fi8818()

subroutine fi8818 ( integer, dimension(*)  iptr,
integer, dimension(*)  kfxy1,
character*40, dimension(*)  aname1,
character*24, dimension(*)  aunit1,
integer, dimension(*)  iscal1,
integer, dimension(3,*)  irfvl1,
integer, dimension(*)  iwide1,
integer, dimension(*)  kfxy2,
character*64, dimension(*)  aname2,
character*24, dimension(*)  aunit2,
integer, dimension(*)  iscal2,
integer, dimension(*)  irfvl2,
integer, dimension(*)  iwide2,
integer, dimension(*)  kptrb 
)

Definition at line 4286 of file w3fi88.f.

◆ fi8819()

subroutine fi8819 ( integer, dimension(*)  iptr,
integer, dimension(20,*)  itbld,
integer, dimension(20,*)  itbld2,
integer, dimension(*)  kptrd 
)

Definition at line 4423 of file w3fi88.f.

◆ fi8820()

subroutine fi8820 ( integer, dimension(20,*)  itbld,
  iunitd,
integer, dimension(*)  iptr,
integer, dimension(20,*)  itbld2,
integer, dimension(*)  kptrd 
)

Definition at line 4486 of file w3fi88.f.

◆ w3fi88()

subroutine w3fi88 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(*)  istack,
integer, dimension(2,maxd)  mstack,
integer, dimension(maxr,maxd)  kdata,
integer, dimension(maxr)  knr,
integer  index,
integer, dimension(maxd)  ldata,
integer, dimension(2,maxd)  lstack,
  maxr,
  maxd,
  iunitb,
  iunitd 
)

This set of routines will decode a bufr message and place information extracted from the bufr message into selected arrays for the user.

the array kdata can now be sized by the user by indicating the maximum number of subsets and the maximum number of descriptors that are expected in the course of decoding selected input data. this allows for realistic sizing of kdata and the mstack arrays. this version also allows for the inclusion of the unit numbers for tables b and d into the argument list. this routine does not include ifod processing.

Program history log:

  • Bill Cavanaugh 1988-08-31
  • Bill Cavanaugh 1990-12-07 Now Utilizing gbyte routines to gather and separate bit fields. this should improve (decrease) the time it takes to decode any bufr message. have entered coding that will permit processing bufr editions 1 and 2. improved and corrected the conversion into ifod format of decoded bufr messages.
  • Bill Cavanaugh 1991-01-18 Program/routines modified to properly handle serial profiler data.
  • Bill Cavanaugh 1991-04-04 Modified to handle text supplied thru descriptor 2 05 yyy.
  • Bill Cavanaugh 1991-04-17 Errors in extracting and scaling data corrected. improved handling of nested queue descriptors is added.
  • Bill Cavanaugh 1991-05-10 Array 'data' has been enlarged to real*8 to better contain very large numbers more accurately. the preious size real*4 could not contain sufficient significant digits. coding has been introduced to process new table c descriptor 2 06 yyy which permits in line processing of a local descriptor even if the descriptor is not contained in the users table b. a second routine to process ifod messages (ifod0) has been removed in favor of the improved processing of the one remaining (ifod1). new coding has been introduced to permit processing of bufr messages based on bufr edition up to and including edition 2. please note increased size requirements for arrays ident(20) and iptr(40).
  • Bill Cavanaugh 1991-07-26 Add Array mtime to calling sequence to permit inclusion of receipt/transfer times to ifod messages.
  • Bill Cavanaugh 1991-09-25 All processing of decoded bufr data into ifod (a local use reformat of bufr data) has been isolated from this set of routines. for those interested in the ifod form, see w3fl05 in the w3lib routines. processing of bufr messages containing delayed replication has been altered so that single subsets (reports) and and a matching descriptor list for that particular subset will be passed to the user will be passed to the user one at a time to assure that each subset can be fully defined with a minimum of reprocessing. processing of associated fields has been tested with messages containing non-compressed data. in order to facilitate user processing a matching list of scale factors are included with the expanded descriptor list (mstack).
  • Bill Cavanaugh 1991-11-21 Processing of descriptor 2 03 yyy has corrected to agree with fm94 standards.
  • Bill Cavanaugh 1991-12-19 Calls to fi8803 and fi8804 have been corrected to agree called program argument list. some additional entries have been included for communicating with data access routines. additional error exit provided for the case where table b is damaged.
  • Bill Cavanaugh 1992-01-24 Routines fi8801, fi8803 and fi8804 have been modified to handle associated fields all descriptors are set to echo to mstack(1,n)
  • Bill Cavanaugh 1992-05-21 Further expansion of information collected from within upper air soundings has produced the necessity to expand some of the processing and output arrays. (see remarks below) corrected descriptor denoting height of each wind level for profiler conversions.
  • Bill Cavanaugh 1992-07-23 Expansion of table b requires adjustment of arrays to contain table b values needed to assist in the decoding process. arrays containing data from table b
  • KFXY1 Descriptor
  • ANAME1 Descriptor name
  • AUNIT1 Units for descriptor
  • ISCAL1 Scale for value of descriptor
  • IRFVL1 Reference value for descriptor
  • IWIDE1 Bit width for value of descriptor
  • Bill Cavanaugh 1992-09-09 First encounter with operator descriptor 2 05 yyy showed error in decoding. that error is corrected with this implementation. further testing of upper air data has encountered the condition of large (many level) soundings arrays in the decoder have been expanded (again) to allow for this condition.
  • Bill Cavanaugh 1992-10-02 Modified routine to reformat profiler data (fi8809) to show descriptors, scale value and data in proper order. corrected an error that prevented user from assigning the second dimension of kdata(500,*).
  • Bill Cavanaugh 1992-10-20 Removed error that prevented full implementation of previous corrections and made corrections to table b to bring it up to date. changes include proper reformat of profiler data and user capability for assigning second dimension of kdata array.
  • Bill Cavanaugh 1992-12-09 Thanks to dennis keyser for the suggestions and coding, this implementation will allow the inclusion of unit numbers for tables b & d, and in addition allows for realistic sizing of kdata and mstack arrays by the user. as of this implementation, the upper size limit for a bufr message allows for a message size greater than 15000 bytes.
  • Bill Cavanaugh 1993-01-26 Routine fi8810 has been added to permit reformatting of profiler data in edition 2.
  • Bill Cavanaugh 1993-05-13 Routine fi8811 has been added to permit processing of run-line encoding. this provides for the handling of data for graphics products. please note the addition of two arguments in the calling sequence.
  • Bill Cavanaugh 1993-12-01 Routine fi8803 to correct handling of associated fields and arrays associated with table b entries enlarged to handle larger table b
  • Bill Cavanaugh 1994-05-25 Routines have been modified to construct a modified table b i.e., it is tailored to contain o those descriptors that will be used to decode data in current and subsequent bufr messages. table b and table d descriptors will be isolated and merged with the main tables for use with following bufr messages. the descriptors indicating the replication of descriptors and data are activated with this implementation.
  • Bill Cavanaugh 1994-08-30 Added statements that will allow use of these routines directly on the cray with no modification. handling od table d entries has been modified to prevent loss of ancillary entries. coding has been added to allow processing on either an 8 byte word or 4 byte word machine.

For those users of the bufr decoder that are processing sets of bufr messages that include type 11 messages, coding has been added to allow the recovery of the added or modified table b entries by writing them to a disk file available to the user. this is accomplished with no change to the calling sequence. table b entries will be designated as follows: IUNITB - Is the unit number for the master table b. IUNITB+1 - Will be the unit number for the table b entries that are to be used in the decoding of subsequent messages. this device will be formatted the same the disk file on iunitb.

  • Dennis Keyser 1995-06-07 Corrected an error which required input argument "maxd" to be nearly twice as large as needed for decoding wind profiler reports (limit upper bound for "iwork" array was set to "maxd", now it is set to 15000). also, a correction was made in the wind profiler processing to prevent unnecessary looping when all requested descriptors are missing. also corrected an error which resulted in returned scale in "mstack(2, ..)" always being set to zero for compressed data.
  • Bill Cavanaugh 1996-02-15 Modified identification of ascii/ebcdic machine. modified handling of table b to permit faster processing of multiple messages with changing data types and/or subtypes.
  • Bill Cavanaugh 1996-04-02 Deactivated extraneous write statement. enlarged arrays for table b entries to contain up to 1300 entries in preparation for new additions to table b.
  • Dennis Keyser 2001-02-01 The table b file will now be read whenever the input argument "iunitb" (table b unit number) changes from its value in the previous call to this routine (normally it is only read the first time this routine is called)
  • Boi Vuong 2002-10-15 Replaced function ichar with mova2i
Parameters
[in]MSGAArray containing supposed bufr message size is determined by user, can be greater than 15000 bytes.
[in]MAXRMaximum number of reports/subsets that may be contained in a bufr message
[in]MAXDMaximum number of descriptor combinations that may be processed; upper air data and some satellite data require a value for maxd of 1700, but for most other data a value for maxd of 500 will suffice
[in]IUNITBUnit number of data set holding table b, this is the number of a pair of data sets -IUNITB+Unit number for a dataset to contain table b entries from master table b and table b entries extracted from type 11 bufr messages that were used to decode current bufr messages.
[in]IUNITDUnit number of data set holding tab
[out]ISTACKOriginal array of descriptors extracted from source bufr message.
[out]MSTACK(A,B)-LEVEL B Descriptor number (limited to value of input argument maxd)
  • Level A:
    • = 1 Descriptor
    • = 2 10**N scaling to return to original value
[out]IPTRUtility array (should have at last 42 entries)
  • IPTR(1)- Error return
  • IPTR(2)- Byte count section 1
  • IPTR(3)- Pointer to start of section 1
  • IPTR(4)- Byte count section 2
  • IPTR(5)- Pointer to start of section 2
  • IPTR(6)- Byte count section 3
  • IPTR(7)- Pointer to start of section 3
  • IPTR(8)- Byte count section 4
  • IPTR(9)- Pointer to start of section 4
  • IPTR(10)- Start of requested subset, reserved for dar
  • IPTR(11)- Current descriptor ptr in iwork
  • IPTR(12)- Last descriptor pos in iwork
  • IPTR(13)- Last descriptor pos in istack
  • IPTR(14)- Number of master table b entries
  • IPTR(15)- Requested subset pointer, reserved for dar
  • IPTR(16)- Indicator for existance of section 2
  • IPTR(17)- Number of reports processed
  • IPTR(18)- Ascii/text event
  • IPTR(19)- Pointer to start of bufr message
  • IPTR(20)- Number of entries from table d
  • IPTR(21)- Nr table b entries
  • IPTR(22)- Nr table b entries from current message
  • IPTR(23)- Code/flag table switch
  • IPTR(24)- Aditional words added by text info
  • IPTR(25)- Current bit number
  • IPTR(26)- Data width change - add to table b width
  • IPTR(27)- Data scale change - modifies table b scale
  • IPTR(28)- Data reference value change - ?????????
  • IPTR(29)- Add data associated field
  • IPTR(30)- Signify characters
  • IPTR(31)- Number of expanded descriptors in mstack
  • IPTR(32)- Current descriptor segment f
  • IPTR(33)- Current descriptor segment x
  • IPTR(34)- Current descriptor segment y
  • IPTR(35)- Data/descriptor replication in progress
    • 0 = No
    • 1 = Yes
  • IPTR(36)- Next descriptor may be undecipherable
  • IPTR(37)- Machine text type flag
    • 0 = EBCIDIC
    • 1 = ASCII
  • IPTR(38)- Data/descriptor replication flag
    • 0 - Does not exist in current message
    • 1 - Exists in current message
  • IPTR(39)- Delayed replication flag
    • 0 - No delayed replication
    • 1 - Message contains delayed replication
  • IPTR(40)- Number of characters in text for curr descriptor
  • IPTR(41)- Number of ancillary table b entries
  • IPTR(42)- Number of ancillary table d entries
  • IPTR(43)- Number of added table b entries encountered while processing a bufr message. these entries only exist durng processing of current bufr message IPTR(44)- Bits per word IPTR(45)- Bytes per word
[out]IDENTArray contains message information extracted from BUFR message:
  • IDENT(1) - Edition number (byte 4, section 1)
  • IDENT(2) - Originating center (bytes 5-6, section 1)
  • IDENT(3) - Update sequence (byte 7, section 1)
  • IDENT(4) - Optional section (byte 8, section 1)
  • IDENT(5) - Bufr message type (byte 9, section 1)
    • 0 = Surface data (land)
    • 1 = Surface data (ship)
    • 2 = Vertical soundings (other than satellite)
    • 3 = Vertical soundings (satellite)
    • 4 = Single lvl upper-air data(other than satellite)
    • 5 = Single level upper-air data (satellite)
    • 6 = Radar data
    • 7 = Synoptic features
    • 8 = Physical/chemical constituents
    • 9 = Dispersal and transport
    • 10 = Radiological data
    • 11 = Bufr tables (complete, replacement or update)
    • 12 = Surface data (satellite)
    • 21 = Radiances (satellite measured)
    • 31 = Oceanographic data
  • IDENT(6) - Bufr msg sub-type (byte 10, section 1)
    TYPE SBTYP
    2 7 = PROFILER
  • IDENT(7) - (bytes 11-12, section 1)
  • IDENT(8) - Year of century (byte 13, section 1)
  • IDENT(9) - Month of year (byte 14, section 1)
  • IDENT(10) - Day of month (byte 15, section 1)
  • IDENT(11) - Hour of day (byte 16, section 1)
  • IDENT(12) - Minute of hour (byte 17, section 1)
  • IDENT(13) - Rsvd by adp centers(byte 18, section 1)
  • IDENT(14) - Nr of data subsets (byte 5-6, section 3)
  • IDENT(15) - Observed flag (byte 7, bit 1, section 3)
  • IDENT(16) - Compression flag (byte 7, bit 2, section 3)
  • IDENT(17) - Master table number(byte 4, section 1, ed 2 or gtr)
[out]KDATAArray containing decoded reports from bufr message. KDATA(Report number,parameter number) (Report number limited to value of input argument maxr and parameter number limited to value of input argument maxd)
[out]INDEXPointer to available subset
KNR
LDATA
LSTACK

Arrays containing data from table b new - base arrays containing data from table b

  • KFXY1 - Decimal descriptor value of f x y values
  • ANAME1 - Descriptor name
  • AUNIT1 - Units for descriptor
  • ISCAL1 - Scale for value of descriptor
  • IRFVL1 - Reference value for descriptor

- IWIDE1 - Bit width for value of descriptor

New - ancillary arrays containing data from table b containing table b entries extracted from type 11 bufr messages

  • KFXY2 - Decimal descriptor value of f x y values
  • ANAME2 - Descriptor name
  • AUNIT2 - Units for descriptor
  • ISCAL2 - Scale for value of descriptor
  • IRFVL2 - Reference value for descriptor

- IWIDE2 - Bit width for value of descriptor

New - added arrays containing data from table b containing table b entries extracted from non-type 11 bufr messages these exist for the life of current bufr message

  • KFXY3 - Decimal descriptor value of f x y values
  • ANAME3 - Descriptor name
  • AUNIT3 - Units for descriptor
  • ISCAL3 - Scale for value of descriptor
  • IRFVL3 - Reference value for descriptor

- IWIDE3 - Bit width for value of descriptor

Error returns: IPTR(1)

  • = 1 'BUFR' Not found in first 125 characters
  • = 2 '7777' Not found in location determined by by using counts found in each section. one or more sections have an erroneous byte count or characters '7777' are not in test message.
  • = 3 Message contains a descriptor with f=0 that does not exist in table b.
  • = 4 Message contains a descriptor with f=3 that does not exist in table d.
  • = 5 Message contains a descriptor with f=2 with the value of x outside the range 1-6.
  • = 6 Descriptor element indicated to have a flag value does not have an entry in the flag table. (to be activated)
  • = 7 Descriptor indicated to have a code value does not have an entry in the code table. (to be activated)
  • = 8 Error reading table d
  • = 9 Error reading table b
  • = 10 Error reading code/flag table
  • = 11 Descriptor 2 04 004 not followed by 0 31 021
  • = 12 Data descriptor operator qualifier does not follow delayed replication descriptor.
  • = 13 Bit width on ascii characters not a multiple of 8
  • = 14 Subsets = 0, no content bulletin
  • = 20 Exceeded count for delayed replication pass
  • = 21 Exceeded count for non-delayed replication pass
  • = 22 Exceeded combined bit width, bit width > 32
  • = 23 No element descriptors following 2 03 yyy
  • = 27 Non zero lowest on text data
  • = 28 Nbinc not nr of characters
  • = 29 Table b appears to be damaged
  • = 30 Table d entry with more than 18 in sequence being entered from type 11 message
  • = 99 No more subsets (reports) available in current bufr mesage
  • = 400 Number of subsets exceeds the value of input argument maxr; must increase maxr to value of ident(14) in calling program
  • = 401 Number of parameters (and associated fields) exceeds limits of this program.
  • = 500 Value for nbinc has been found that exceeds standard width plus any bit width change. check all bit widths up to point of error.
  • = 501 Corrected width for descriptor is 0 or less
  • = 888 Non-numeric character in conversion request
  • = 890 Class 0 element descriptor w/width of 0

On the initial call to w3fi88 with a bufr message the argument index must be set to zero (index = 0). on the return from w3fi88 'index' will be set to the next available subset/report. when there are no more subsets available a 99 err return will occur.

If the original bufr message does not contain delayed replication the bufr message will be completely decoded and 'index' will point to the first decoded subset. the users will then have the option of indexing through the subsets on their own or by recalling this routine (without resetting 'index') to have the routine do the indexing.

If the original bufr message does contain delayed replication one subset/report will be decoded at a time and passed back to the user. this is not an option.


To use this routine

the arrays to contain the output information are defined as follows:

KDATA(A,B)  is the a data entry  (integer value)
            where a is the maximum number of reports/subsets
            that may be contained in the bufr message (this
            is now set to "maxr" which is passed as an input
            argument to w3fi88), and where b is the maximum
            number of descriptor combinations that may
            be processed (this is now set to "maxd" which
            is also passed as an input argument to w3fi88;
            upper air data and some satellite data require
            a value for maxd of 1700, but for most other
            data a value for maxd of 500 will suffice)
MSTACK(1,B) contains the descriptor that matches the
            data entry (max. value for b is now "maxd"
            which is passed as an input argument to w3fi88)
MSTACK(2,B) is the scale (power of 10) to be applied to
            the data (max. value for b is now "maxd"
            which is passed as an input argument to w3fi88)

Definition at line 437 of file w3fi88.f.