NCEPLIBS-bufr  12.1.0
tankrcpt.F90 File Reference

Read and write tank receipt times within BUFR messages. More...

Go to the source code of this file.

Functions/Subroutines

recursive subroutine atrcpt (msgin, lmsgot, msgot)
 Read an input message and output an equivalent BUFR message with a tank receipt time added to Section 1. More...
 
recursive subroutine rtrcpt (lunit, iyr, imo, idy, ihr, imi, iret)
 Read the tank receipt time (if one exists) from Section 1 of a BUFR message. More...
 
recursive subroutine rtrcptb (mbay, iyr, imo, idy, ihr, imi, iret)
 Read the tank receipt time (if one exists) from Section 1 of a BUFR message. More...
 
recursive subroutine strcpt (cf, iyr, imo, idy, ihr, imi)
 Specify a tank receipt time to be included within Section 1 of all BUFR messages output by future calls to message-writing subroutines and subset-writing subroutines. More...
 

Detailed Description

Read and write tank receipt times within BUFR messages.

Author
J. Ator
Date
2009-03-23

Definition in file tankrcpt.F90.

Function/Subroutine Documentation

◆ atrcpt()

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

Read an input message and output an equivalent BUFR message with a tank receipt time added to Section 1.

The tank receipt time to be added must have been specified via a previous call to subroutine strcpt(). This subroutine performs the same function as subroutine strcpt() when the latter is called with CF = 'Y', except that the latter subroutine operates on BUFR messages internally within the software, whereas this subroutine operates on a single BUFR message passed in via a memory array.

Remarks
  • msgin and msgot must be separate arrays
  • msgot will be longer in length than msgin, so the user must allow for extra space when allocating msgot within the application program
Parameters
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- Copy of msgin with a tank receipt time added to Section 1
Author
J. Ator
Date
2009-03-23

Definition at line 23 of file tankrcpt.F90.

References bort(), getlens(), moda_tnkrcp::itrdy, moda_tnkrcp::itrhr, moda_tnkrcp::itrmi, moda_tnkrcp::itrmo, moda_tnkrcp::itryr, iupbs01(), mvb(), pkb(), and x84().

Referenced by msgwrt().

◆ rtrcpt()

recursive subroutine rtrcpt ( integer, intent(in)  lunit,
integer, intent(out)  iyr,
integer, intent(out)  imo,
integer, intent(out)  idy,
integer, intent(out)  ihr,
integer, intent(out)  imi,
integer, intent(out)  iret 
)

Read the tank receipt time (if one exists) from Section 1 of a BUFR message.

This subroutine is similar to subroutine rtrcptb(), except that rtrcptb() operates on a BUFR message passed in via a memory array, whereas this subroutine 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.

Parameters
lunit- Fortran logical unit number for BUFR file
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
iret- return code
  • 0 = normal return
  • -1 = no tank receipt time exists within the BUFR message currently open for input within internal arrays
Author
J. Ator
Date
2009-03-23

Definition at line 186 of file tankrcpt.F90.

References bort(), moda_bitbuf::mbay, rtrcptb(), status(), x48(), and x84().

◆ rtrcptb()

recursive subroutine rtrcptb ( integer, dimension(*), intent(in)  mbay,
integer, intent(out)  iyr,
integer, intent(out)  imo,
integer, intent(out)  idy,
integer, intent(out)  ihr,
integer, intent(out)  imi,
integer, intent(out)  iret 
)

Read the tank receipt time (if one exists) from Section 1 of a BUFR message.

This subroutine is similar to subroutine rtrcpt(), except that it operates on a BUFR message passed in via a memory array, whereas rtrcpt() 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.

Parameters
mbay- BUFR message
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
iret- return code:
  • 0 = normal return
  • -1 = no tank receipt time exists within mbay
Author
J. Ator
Date
2013-10-07

Definition at line 113 of file tankrcpt.F90.

References iupb(), iupbs01(), and x48().

Referenced by fdebufr_c(), and rtrcpt().

◆ strcpt()

recursive subroutine strcpt ( character*1, intent(in)  cf,
integer, intent(in)  iyr,
integer, intent(in)  imo,
integer, intent(in)  idy,
integer, intent(in)  ihr,
integer, intent(in)  imi 
)

Specify a tank receipt time to be included within Section 1 of all BUFR messages output by future calls to message-writing subroutines and subset-writing subroutines.

This subroutine can be called at any time after the first call to subroutine openbf(), and 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, as set within module moda_tnkrcp.

Whenever this subroutine is called with cf = 'N', the values in iyr, imo, idy, ihr, and imi are ignored.

Remarks
  • Tank receipt time is an NCEP extension to Section 1 of the official WMO BUFR regulations. However, it's encoded by the NCEPLIBS-bufr software in such a way that its inclusion within an output BUFR message is still fully compliant with the regulations.
Parameters
cf- Flag indicating whether future BUFR output messages should include the tank receipt time defined by iyr, imo, idy, ihr, and imi:
  • 'N' = No (the default)
  • 'Y' = Yes
iyr- Tank receipt year
imo- Tank receipt month
idy- Tank receipt day
ihr- Tank receipt hour
imi- Tank receipt minute
Author
J. Ator
Date
2009-03-23

Definition at line 257 of file tankrcpt.F90.

References bort(), capit(), moda_tnkrcp::ctrt, moda_tnkrcp::itrdy, moda_tnkrcp::itrhr, moda_tnkrcp::itrmi, moda_tnkrcp::itrmo, moda_tnkrcp::itryr, and x84().