NCEPLIBS-bufr  12.1.0
standard.F90 File Reference

Write WMO-standard BUFR messages. More...

Go to the source code of this file.

Functions/Subroutines

integer function istdesc (idn)
 Given the WMO bit-wise representation of an FXY value for a descriptor, check whether the descriptor is WMO-standard. More...
 
subroutine stdmsg (cf)
 Specify whether BUFR messages output by future calls to message-writing subroutines and subset-writing subroutines should be internally reformatted to remove all NCEPLIBS-bufr software extensions to the WMO standard, prior to actually writing each message. More...
 
recursive subroutine stndrd (lunit, msgin, lmsgot, msgot)
 Standardize a BUFR message. More...
 

Detailed Description

Write WMO-standard BUFR messages.

Author
J. Ator
Date
2004-08-18

Definition in file standard.F90.

Function/Subroutine Documentation

◆ istdesc()

integer function istdesc ( integer, intent(in)  idn)

Given the WMO bit-wise representation of an FXY value for a descriptor, check whether the descriptor is WMO-standard.

If a descriptor is not WMO-standard, then by definition it is a local descriptor.

Parameters
idn- WMO bit-wise representation of FXY value for descriptor
Returns
istdesc - Flag indicating whether idn is a WMO-standard descriptor:
  • 0 = No
  • 1 = Yes
Author
J. Ator
Date
2004-08-18

Definition at line 297 of file standard.F90.

References adn30(), and iokoper().

Referenced by ireadmt(), bufr_c2f_interface::istdesc_c(), and stndrd().

◆ stdmsg()

subroutine stdmsg ( character*1, intent(in)  cf)

Specify whether BUFR messages output by future calls to message-writing subroutines and subset-writing subroutines should be internally reformatted to remove all NCEPLIBS-bufr software extensions to the WMO standard, prior to actually writing each message.

It is strongly recommended to use this subroutine (or, alternatively, subroutine stndrd() for messages which already exist in memory arrays) whenever BUFR messages are being written that will potentially be read using software other than the NCEPLIBS-bufr software. Otherwise, by default the output messages will contain a number of extensions to allow for faster reading and more efficient storage, but which will be encoded using non-standard descriptors in Section 3, and therefore likely be unrecognizable to other software packages.

The specified value for cf will remain in effect for all future calls to message-writing subroutines and subset-writing subroutines for all Fortran logical units that are open for output within the application program, unless a subsequent call is made to this subroutine to reset the value of cf again. If this subroutine is never called, a default value of 'N' is used for cf.

Parameters
cf- Flag indicating whether future BUFR output messages are to be standardized:
  • 'N' = No (the default)
  • 'Y' = Yes
Author
J. Ator
Date
2004-08-18

Definition at line 35 of file standard.F90.

References bort(), capit(), and moda_msgstd::csmf.

◆ stndrd()

recursive subroutine stndrd ( integer, intent(in)  lunit,
integer, dimension(*), intent(in)  msgin,
integer, intent(in)  lmsgot,
integer, dimension(*), intent(out)  msgot 
)

Standardize a BUFR message.

This subroutine performs the same function as subroutine stdmsg(), except that it operates on a BUFR message passed in via a memory array and returns its output via a separate memory array, whereas stdmsg() operates on BUFR messages stored internally within the software.

Remarks
  • msgin and msgot must be separate arrays
  • Standardized messages are usually longer in length than their non-standard counterparts, so it's a good idea to allow for extra space when allocating msgot within the application program
Parameters
lunit- Fortran logical unit number for BUFR file
msgin- BUFR message
lmsgot- Dimensioned size (in integers) of msgot; used by the subroutine to ensure that it doesn't overflow the msgot array
msgot- Standardized copy of msgin
Author
J. Ator
Date
2004-08-18

Definition at line 72 of file standard.F90.

References bort(), getlens(), moda_s3list::ids3, istdesc(), iupb(), iupbs01(), iupbs3(), mvb(), nemtbax(), numtab(), pkb(), pkc(), status(), upb(), upc(), and x84().

Referenced by msgwrt().