NCEPLIBS-bufr  11.5.0
 All Data Structures Files Functions Variables Pages
drfini.f File Reference

Initialize replication factors for delayed replication sequences. More...

Go to the source code of this file.

Functions/Subroutines

subroutine drfini (LUNIT, MDRF, NDRF, DRFTAG)
 This subroutine explicitly initializes delayed replication factors and allocates a corresponding amount of space within internal arrays, thereby allowing the subsequent use of subroutine ufbseq() to write data into delayed replication sequences. More...
 

Detailed Description

Initialize replication factors for delayed replication sequences.

Definition in file drfini.f.

Function/Subroutine Documentation

subroutine drfini (   LUNIT,
dimension(ndrf)  MDRF,
  NDRF,
character*(*)  DRFTAG 
)

This subroutine explicitly initializes delayed replication factors and allocates a corresponding amount of space within internal arrays, thereby allowing the subsequent use of subroutine ufbseq() to write data into delayed replication sequences.

Author
J. Woollen
Date
2002-05-14
Parameters
[in]LUNIT- integer: Fortran logical unit number for BUFR file
[in]MDRF- integer(*): Array of delayed replication factors, in one-to-one correspondence with the number of occurrences of DRFTAG within the overall subset definition, and explicitly defining how much space (i.e. how many replications) to allocate within each successive occurrence
[in]NDRF- integer: Number of delayed replication factors within MDRF
[in]DRFTAG- character*(*): Table D sequence mnemonic, bracketed by appropriate delayed replication notation (e.g. {}, () OR <>)

Logical unit LUNIT should have already been opened for output operations (i.e. writing/encoding BUFR) via a previous call to subroutine openbf(), and a message for output should have already been opened via a previous call to one of the [message-writing subroutines].

The use of this subroutine is only required when writing data into delayed replication sequences using ufbseq(), or for cases where ufbint() or ufbrep() are being used to write data into delayed replication sequences which occur more than once within an overall subset definition. In such cases, the use of this subroutine allows the application code to explicitly specify how many replications of the sequence are to be allocated to each occurrence of the delayed replication sequence within the overall subset definition, prior to storing all of the actual data values themselves via a single subsequent call to ufbint() or ufbrep(). In contrast, the use of this subroutine is not required when ufbint() or ufbrep() are to be called to store data values for a delayed replication sequence which only occurs one time within an overall subset definition, because in that case the same type of initialization and space allocation functionality will be automatically handled internally within subroutine ufbint() or ufbrep().

Program history log:

  • 2002-05-14 J. Woollen – Original author
  • 2003-11-04 S. Bender – Added remarks and routine interdependencies
  • 2003-11-04 D. Keyser – Unified/portable for WRF; added history documentation; outputs more complete diagnostic info when routine terminates abnormally
  • 2005-03-04 J. Ator – Updated documentation
  • 2014-09-08 J. Ator – Increase NDRF limit from 100 to 200
  • 2014-12-10 J. Ator – Use modules instead of COMMON blocks
  • 2018-06-07 J. Ator – Increase NDRF limit from 200 to 2000

Definition at line 63 of file drfini.f.

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