NCEPLIBS-bufr  11.6.0
 All Data Structures Files Functions Variables Pages
iupbs01.f File Reference

Read a data value from Section 0 or Section 1 of a BUFR message. More...

Go to the source code of this file.

Functions/Subroutines

function iupbs01 (MBAY, S01MNEM)
 This function returns a specified value from within Section 0 or Section 1 of a BUFR message. More...
 

Detailed Description

Read a data value from Section 0 or Section 1 of a BUFR message.

Definition in file iupbs01.f.

Function/Subroutine Documentation

function iupbs01 ( dimension(*)  MBAY,
character*(*)  S01MNEM 
)

This function returns a specified value from within Section 0 or Section 1 of a BUFR message.

This function will work on any BUFR message encoded using BUFR edition 2, 3, or 4. It is similar to function iupvs01(), except that it operates on a BUFR message passed in via a memory array, whereas iupvs01() operates on the BUFR message that was read into internal arrays via the most recent call to any of the other message-reading subroutines for a specified Fortran logical unit.

Author
J. Ator
Date
2005-11-29
Parameters
[in]MBAY– integer(*): BUFR message
[in]S01MNEM– character*(*): Value to be read from Section 0 or Section 1 of MBAY
  • 'LENM' = Length (in bytes) of BUFR message
  • 'LEN0' = Length (in bytes) of Section 0
  • 'LEN1' = Length (in bytes) of Section 1
  • 'BEN' = BUFR edition number
  • 'BMT' = BUFR master table
  • 'OGCE' = Originating center
  • 'GSES' = Originating subcenter
  • 'USN' = Update sequence number
  • 'ISC2' = Flag indicating absence/presence of (optional) Section 2 in BUFR message:
    • 0 = Section 2 absent
    • 1 = Section 2 present
  • 'MTYP' = Data category
  • 'MSBTI' = Data subcategory (international)
  • 'MSBT' = Data subcategory (local)
  • 'MTV' = Version number of master table
  • 'MTVL' = Version number of local tables
  • 'YCEN' = Year of century (1-100)
  • 'CENT' = Century (e.g., 20 for years 1901-2000, 21 for years 2001-2100)
  • 'YEAR' = Year (4-digit)
  • 'MNTH' = Month
  • 'DAYS' = Day
  • 'HOUR' = Hour
  • 'MINU' = Minute
  • 'SECO' = Second
Returns
iupbs01 – integer: Value corresponding to S01MNEM
  • -1 = S01MNEM was invalid for the edition of BUFR message in MBAY, or some other error occurred
Remarks
  • The start of the BUFR message (i.e. the string 'BUFR') must be aligned on the first 4 bytes of MBAY.
  • Values corresponding to S01MNEM = 'GSES' can only be read from BUFR messages encoded using BUFR edition 3 or 4.
  • Values corresponding to S01MNEM = 'YCEN' or 'CENT' can only be read from BUFR messages encoded using BUFR edition 2 or 3.
  • When reading from BUFR messages encoded using BUFR edition 2 or 3, values corresponding to S01MNEM = 'YEAR' will be calculated internally using the values for 'YCEN' and 'CENT', or inferred using a windowing technique
  • Values corresponding to S01MNEM = 'SECO' or 'MSBTI' can only be read from BUFR messages encoded using BUFR edition 4.

Program history log:

Date Programmer Comments
2005-11-29 J. Ator Original author
2006-04-14 J. Ator Added options for 'YCEN' and 'CENT'; restructured logic

Definition at line 73 of file iupbs01.f.

References gets1loc(), i4dy(), iupb(), and wrdlen().

Referenced by atrcpt(), cktaba(), cnved4(), copybf(), copymg(), cpymem(), crbmg(), crdbufr(), dumpbf(), fdebufr(), getlens(), idxmsg(), igetdate(), ireadmt(), iupvs01(), mesgbc(), mesgbf(), msgwrt(), nmwrd(), padmsg(), pkbs1(), rtrcptb(), stbfdx(), stndrd(), ufbmex(), and wrcmps().