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

BUFR message decoder. More...

Go to the source code of this file.

Functions/Subroutines

subroutine fi6701 (iptr, ident, msga, istack, iwork, aname, kdata, ivals, mstack, aunits, kdesc, mwidth, mref, mscale, knr, index)
 Data extraction.
 
subroutine fi6702 (iptr, ident, msga, kdata, kdesc, ll, mstack, aunits, mwidth, mref, mscale, jdesc, ivals, j)
 Process standard descriptor.
 
subroutine fi6703 (iptr, ident, msga, kdata, ivals, mstack, mwidth, mref, mscale, j, jdesc)
 Process compressed data and place individual elements into output array.
 
subroutine fi6704 (iptr, msga, kdata, ivals, mstack, mwidth, mref, mscale, j, ll, jdesc)
 Process data that is not compressed.
 
subroutine fi6705 (iptr, ident, msga, iwork, lx, ly, kdata, ll, knr, mstack)
 Process a replication descriptor, must extract number of replications of n descriptors from the data stream.
 
subroutine fi6706 (iptr, lx, ly, ident, msga, kdata, ivals, mstack, mwidth, mref, mscale, j, ll, kdesc, iwork, jdesc)
 Process operator descriptors.
 
subroutine fi6707 (iptr, iwork, itbld, jdesc)
 Substitute descriptor queue for queue descriptor.
 
subroutine fi6708 (iptr, iwork, lf, lx, ly, jdesc)
 Subroutine FI6708.
 
subroutine fi6709 (ident, mstack, kdata, iptr)
 Reformat decoded profiler data to show heights instead of height increments.
 
subroutine fi6710 (ident, mstack, kdata, iptr)
 Reformat profiler edition 2 data.
 
subroutine w3fi67 (iptr, ident, msga, istack, mstack, kdata, knr, index)
 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 w3fi67.f.

Function/Subroutine Documentation

◆ fi6701()

subroutine fi6701 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(*)  istack,
integer, dimension(*)  iwork,
character*40, dimension(*)  aname,
integer, dimension(500,*)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,*)  mstack,
character*24, dimension(*)  aunits,
integer, dimension(*)  kdesc,
integer, dimension(*)  mwidth,
integer, dimension(700,3)  mref,
integer, dimension(*)  mscale,
integer, dimension(*)  knr,
integer  index 
)

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)
Parameters
[in]IPTRSee w5fi67 routine docblock.
[in]IDENTSee w3fi67 routine docblock.
[in]MSGAArray containing bufr message.
[in,out]ISTACK[in] Original array of descriptors extracted from source bufr message. [out] Arrays containing data from table b.
[in]MSTACKWorking array of descriptors (expanded)and scaling factor.
[in,out]KDESCImage of current descriptor.
[in]INDEX
KNR
[out]IWORKWorking descriptor list
IVALS
[out]KDATAArray containing decoded reports from bufr message kdata(report number,parameter number).
[out]ANAMEDescriptor name..
[out]AUNITSUnits for descriptor.
[out]MSCALEScale for value of descriptor.
[out]MREFReference value for descriptor.
[out]MWIDTHBit width for value of descriptor.
Note
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 638 of file w3fi67.f.

◆ fi6702()

subroutine fi6702 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(500,*)  kdata,
integer, dimension(*)  kdesc,
  ll,
integer, dimension(2,*)  mstack,
character*24, dimension(*)  aunits,
integer, dimension(*)  mwidth,
integer, dimension(700,3)  mref,
integer, dimension(*)  mscale,
integer  jdesc,
integer, dimension(*)  ivals,
integer  j 
)

Process standard descriptor.

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

Program history log:

  • Bill Cavanaugh 1988-09-01
  • Bill Cavanaugh 1991-04-04 Changed to pass width of text fields in bytes.
Parameters
[in]IPTRSee w3fi67 routine docblock.
[in]IDENTSee w3fi67 routine docblock.
[in]MSGAArray containing bufr message.
[in,out]KDATAArray containing decoded reports from bufr message. KDATA(Report number, parameter number)
[in,out]KDESCImage of current descriptor.
[in]MSTACK
LL
[out]AUNITSUnits for descriptor.
[out]MSCALEScale for value of descriptor.
[out]MREFReference value for descriptor.
[out]MWIDTHBit width for value of descriptor.
JDESC
[in]IVALSArray of single parameter values.
J
Note
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 940 of file w3fi67.f.

◆ fi6703()

subroutine fi6703 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(500,*)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,*)  mstack,
integer, dimension(*)  mwidth,
integer, dimension(700,3)  mref,
integer, dimension(*)  mscale,
integer  j,
integer  jdesc 
)

Process compressed data and place individual elements into output array.

Author
Bill Cavanaugh
Date
1988-09-01 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.
Parameters
[in]IPTRSee w3fi67() routine docblock.
[in]IDENTSee w3fi67() routine docblock.
[in]MSGAArray containing bufr message, mstack.
[in]MSTACK
[in]IVALSArray of single parameter values.
[in,out]J
[out]KDATAArray containing decoded reports from bufr message. kdata(report number,parameter number).
JDESCArrays Containing data from table b.
[out]MSCALEScale for value of descriptor.
[out]MREFReference value for descriptor.
[out]MWIDTHBit width for value of descriptor.
Note
List caveats, other helpful hints or information.
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1090 of file w3fi67.f.

◆ fi6704()

subroutine fi6704 ( integer, dimension(*)  iptr,
integer, dimension(*)  msga,
integer, dimension(500,*)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,*)  mstack,
integer, dimension(*)  mwidth,
integer, dimension(700,3)  mref,
integer, dimension(*)  mscale,
integer  j,
integer  ll,
integer  jdesc 
)

Process data that is not compressed.

Author
Bill Cavanaugh
Date
1988-09-01 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 Tests showed that the same data in compressed and uncompressed form gave different results. This has been corrected.
Parameters
[in]IPTRSee w3fi67 routine docblock
[in]MSGAArray containing bufr message
[in,out]IVALSArray of single parameter values
[out]KDATAArray containing decoded reports from bufr message. kdata(report number,parameter number)
[in,out]J[in] ? [out] arrays containing data from table b
[out]MSCALEScale for value of descriptor
[in]MSTACK
LL
JDESC
[out]MREFReference value for descriptor
[out]MWIDTHBit width for value of descriptor
Note
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 1347 of file w3fi67.f.

◆ fi6705()

subroutine fi6705 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(*)  iwork,
integer  lx,
integer  ly,
integer, dimension(500,*)  kdata,
integer  ll,
integer, dimension(*)  knr,
integer, dimension(2,*)  mstack 
)

Process a replication descriptor, must extract number of replications of n descriptors from the data stream.

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 w3fi67 routine docblock
[in]IDENTSee w3fi67 routine docblock
[in,out]LXX portion of current descriptor
[in,out]LYY portion of current descriptor
[out]KDATAArray containing decoded reports from bufr message. kdata(report number,parameter number)
LL
KNR
MSTACK
MSGA
Note
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 1509 of file w3fi67.f.

◆ fi6706()

subroutine fi6706 ( integer, dimension(*)  iptr,
integer  lx,
integer  ly,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(500,*)  kdata,
integer, dimension(*)  ivals,
integer, dimension(2,*)  mstack,
integer, dimension(*)  mwidth,
integer, dimension(700,3)  mref,
integer, dimension(*)  mscale,
integer  j,
integer  ll,
integer, dimension(*)  kdesc,
integer, dimension(*)  iwork,
integer  jdesc 
)

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 proposed 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 w3fi67 routine docblock.
[in]LXX portion of current descriptor.
[in]LYY portion of current descriptor.
[out]KDATAArray containing decoded reports from bufr message. kdata(report number,parameter number) arrays containing data from table b
[out]MSCALEScale for value of descriptor
[out]MREFReference value for descriptor
[out]MWIDTHBit width for value of descriptor
IDENT
MSGA
IVALS
MSTACK
J
LL
KDESC
IWORK
JDESC
Note
Error return:
  • IPTR(1) = 5 - Erroneous x value in data descriptor operator
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1672 of file w3fi67.f.

◆ fi6707()

subroutine fi6707 ( integer, dimension(*)  iptr,
integer, dimension(*)  iwork,
integer, dimension(500,11)  itbld,
integer  jdesc 
)

Substitute descriptor queue for 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 w3fi67 routine docblock.
[in]ITBLDArray containing descriptor queues.
[in]JDESCQueue descriptor to be expanded.
Author
Bill Cavanaugh
Date
1988-09-01

Definition at line 1814 of file w3fi67.f.

◆ fi6708()

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

Subroutine FI6708.

Author
Bill Cavanaugh
Date
1989-01-17 Program history log:
  • Bill Cavanaugh 1988-09-01
Parameters
[in,out]IPTRSee w3fi67() routine docblock.
[in]IWORKWorking descriptor list.
LF
LX
LY
[in]JDESCQueue descriptor to be expanded.
Note
List caveats, other helpful hints or information.
Author
Bill Cavanaugh
Date
1989-01-17

Definition at line 1921 of file w3fi67.f.

◆ fi6709()

subroutine fi6709 ( integer, dimension(*)  ident,
integer, dimension(2,*)  mstack,
integer, dimension(500,*)  kdata,
integer, dimension(*)  iptr 
)

Reformat decoded profiler data to show heights instead of height 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
[in]IPTRSee w3fi67
Note
List caveats, other helpful hints or information.
Author
Bill Cavanaugh
Date
1990-02-14

Definition at line 1973 of file w3fi67.f.

◆ fi6710()

subroutine fi6710 ( integer, dimension(*)  ident,
integer, dimension(2,1600)  mstack,
integer, dimension(500,1600)  kdata,
integer, dimension(*)  iptr 
)

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
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 w3fi67
Author
Bill Cavanaugh
Date
1993-01-27

Definition at line 2360 of file w3fi67.f.

◆ w3fi67()

subroutine w3fi67 ( integer, dimension(*)  iptr,
integer, dimension(*)  ident,
integer, dimension(*)  msga,
integer, dimension(*)  istack,
integer, dimension(2,*)  mstack,
integer, dimension(500,*)  kdata,
integer, dimension(*)  knr,
integer  index 
)

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

Those arrays are described in the output 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 fi6703() and fi6704() 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 fi6701(), fi6703() and fi6704() 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)
  • Bill Cavanaugh 1992-06-29 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:
    • kdesc descriptor
    • aname descriptor name
    • aunits units for descriptor
    • mscale scale for value of descriptor
    • mref reference value for descriptor
    • mwidth 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 (fi6709) 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 1993-01-26 Added routine fi6710() to permit reformatting profiler data in BUFR edition 2.
Parameters
[in]MSGAArray containing supposed bufr message.
[out]ISTACKOriginal array of descriptors extracted from source bufr message.
[out]MSTACK(A,B)
  • LEVEL B - Descriptor number
  • LEVEL A = 1 Descriptor
    • = 2 10**N Scaling to return to original value
[out]IPTRUtility array.
  • 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 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 lines from table d.
  • IPTR(21)- Table b switch.
  • IPTR(22)- Table d switch.
  • IPTR(23)- Code/flag table switch.
  • IPTR(24)- Aditional words added by text info.
  • IPTR(25)- Current bit number.
  • IPTR(26)- Data width change.
  • IPTR(27)- Data scale change.
  • 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)- Unused.
  • IPTR(36)- Next descriptor may be undecipherable.
  • IPTR(37)- Unused.
  • IPTR(38)- Unused.
  • IPTR(39)- Delayed replication flag.
    • 0 - No delayed replication.
    • 1 - Message contains delayed replication.
  • IPTR(40)- Number of characters in text for curr descriptor.
[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 (land)
    • 1 = Surface (ship)
    • 2 = Vertical soundings other than satellite
    • 3 = Vertical soundings (satellite)
    • 4 = Sngl lvl upper-air other than satellite
    • 5 = Sngl lvl upper-air (satellite)
    • 6 = Radar
  • 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.
[in]KNRkdata(report number,parameter number) arrays containing data from table b
  • ANAME Descriptor name.
  • AUNITS Units for descriptor.
  • MSCALE Scale for value of descriptor.
  • MREF Reference value for descriptor.
  • MWIDTH Bit width for value of descriptor.
[out]INDEXPointer to available subset.
Note
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-5.
    • = 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 Section 1 count exceeds 10000.
    • = 23 Section 2 count exceeds 10000.
    • = 24 Section 3 count exceeds 10000.
    • = 25 Section 4 count exceeds 10000.
    • = 27 Non zero lowest on text data.
    • = 28 Nbinc not nr of characters.
    • = 29 Table b appears to be damaged.
    • = 99 No more subsets (reports) available in current bufr mesage.
    • = 400 Number of subsets exceeds capability of routine.
    • = 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.

    On the initial call to w3fi67() with a bufr message the argument index must be set to zero (index = 0). on the return from w3fi67() '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

  1. READ IN BUFR MESSAGE
  2. SET INDEX = 0
  3. CALL W3FI67( )
  4. IF (IPTR(1).EQ.99) THEN NO MORE SUBSETS EITHER GO TO 1 OR TERMINATE IN NO MORE BUFR MESSAGES END IF
  5. IF (IPTR(1).NE.0) THEN ERROR CONDITION EITHER GO TO 1 OR TERMINATE IN NO MORE BUFR MESSAGES END IF
  6. THE VALUE OF INDEX INDICATES THE ACTIVE SUBSET SO IF INTERESTED IN GENERATING AN IFOD MESSAGE CALL W3FL05 ( ) ELSE PROCESS DECODED INFORMATION AS REQUIRED END IF
  7. GO TO 3

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 (FOR THIS VERSION OF THE DECODER A=500) THAT MAY BE CONTAINED IN THE BUFR MESSAGE, AND WHERE B IS THE MAXIMUM NUMBER OF DESCRIPTOR COMBINATIONS THAT MAY BE PROCESSED. UPPER AIR DATA AND SOME SATELLITE DATA REQUIRE A VALUE FOR B OF 1600, BUT FOR MOST OTHER DATA A VALUE FOR B OF 500 WILL SUFFICE MSTACK(1,B) CONTAINS THE DESCRIPTOR THAT MATCHES THE DATA ENTRY MSTACK(2,B) IS THE SCALE (POWER OF 10) TO BE APPLIED TO THE DATA

ATTRIBUTES: LANGUAGE: FORTRAN 77 MACHINE: NAS

Definition at line 284 of file w3fi67.f.