NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
iupvs01.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 iupvs01 (LUNIT, 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 iupvs01.f.

Function/Subroutine Documentation

function iupvs01 (   LUNIT,
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 iupbs01(), except that iupbs01() operates on a BUFR message passed in via a memory array, whereas this function 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]LUNIT- integer: Fortran logical unit number for BUFR file
[in]S01MNEM- character*(*): Value to be read from Section 0 or Section 1 of BUFR message in internal arrays for LUNIT
  • '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
iupvs01 - integer: Value corresponding to S01MNEM
  • -1 = S01MNEM was invalid for the edition of BUFR message in internal arrays for LUNIT, or some other error occurred
Remarks
  • 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:

  • 2005-11-29 J. Ator – Original author
  • 2014-12-10 J. Ator – Use modules instead of COMMON blocks

Definition at line 71 of file iupvs01.f.

References bort(), iupbs01(), and status().

Referenced by split_by_subset().