NCEPLIBS-bufr 11.7.1
pkbs1.f File Reference

Write a data value into Section 1 of a BUFR message. More...

Go to the source code of this file.

Functions/Subroutines

subroutine pkbs1 (IVAL, MBAY, S1MNEM)
 This subroutines writes a specified value into a specified location within Section 1 of a BUFR message, overwriting the value previously stored in that location. More...
 

Detailed Description

Write a data value into Section 1 of a BUFR message.

Definition in file pkbs1.f.

Function/Subroutine Documentation

◆ pkbs1()

subroutine pkbs1 (   IVAL,
dimension(*)  MBAY,
character*(*)  S1MNEM 
)

This subroutines writes a specified value into a specified location within Section 1 of a BUFR message, overwriting the value previously stored in that location.

This subroutine will work on any BUFR message encoded using BUFR edition 2, 3, or 4. It is similar to subroutine pkvs01(), except that it operates on a BUFR message passed in via a memory array, whereas pkvs01() operates on BUFR messages stored internally within the software.

Authors
J. Ator
D. Keyser
Date
2005-11-29
Parameters
[in]IVAL– integer: Value to be stored
[in,out]MBAY– integer(*): BUFR message
[in]S1MNEM– character*(*): Location in Section 1 of MBAY within which to store IVAL
  • 'BMT' = BUFR master table
  • 'OGCE' = Originating center
  • 'GSES' = Originating subcenter
  • 'USN' = Update sequence number
  • '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
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 S1MNEM = 'GSES' can only be stored within BUFR messages encoded using BUFR edition 3 or 4.
  • Values corresponding to S1MNEM = 'YCEN' or 'CENT' can only be stored within BUFR messages encoded using BUFR edition 2 or 3.
  • Values corresponding to S1MNEM = 'YEAR', 'SECO' or 'MSBTI' can only be stored within BUFR messages encoded using BUFR edition 4.

Program history log:

Date Programmer Comments
2005-11-29 J. Ator Original author
2006-04-14 D. Keyser Added options for 'MTYP', 'MSBT', 'YEAR', 'MNTH', 'DAYS', 'HOUR', 'YCEN' and 'CENT'

Definition at line 57 of file pkbs1.f.

References bort(), gets1loc(), iupbs01(), and pkb().

Referenced by minimg(), and msgwrt().