NCEPLIBS-bufr
11.6.0
|
Write a long character string (greater than 8 bytes) to a data subset. More...
Go to the source code of this file.
Functions/Subroutines | |
subroutine | writlc (LUNIT, CHR, STR) |
This subroutine writes a long character string (greater than 8 bytes) to a data subset. More... | |
Write a long character string (greater than 8 bytes) to a data subset.
Definition in file writlc.f.
subroutine writlc | ( | LUNIT, | |
character*(*) | CHR, | ||
character*(*) | STR | ||
) |
This subroutine writes a long character string (greater than 8 bytes) to a data subset.
The data subset should have already been written into a BUFR message via a previous call to one of the subset-writing subroutines, before calling this subroutine to write any long character strings into the same subset.
[in] | LUNIT | – integer: Fortran logical unit number for BUFR file |
[in] | CHR | – character*(*): Value corresponding to STR |
[in] | STR | – character*(*): Table B mnemonic of long character string to be written, possibly supplemented with an ordinal occurrence notation |
If there is more than one occurrence of STR within the data subset definition, then each occurrence can be written via a separate call to this subroutine, and by appending the ordinal number of the occurrence to STR in each case. For example, if there are 5 occurrences of mnemonic LSTID within a given data subset definition, then 5 separate calls should be made to this subroutine, once each with STR set to 'LSTID#1', 'LSTID#2', 'LSTID#3', 'LSTID#4' and 'LSTID#5'. However, the first notation is superfluous, because omitting the ordinal number always defaults to the first occurrence of a particular string, so a user could just specify 'LSTID' instead of 'LSTID#1'.
Program history log:
Date | Programmer | Comments |
---|---|---|
2003-11-04 | J. Woollen | Original author |
2004-08-09 | J. Ator | Maximum message length increased from 20,000 to 50,000 bytes |
2005-11-29 | J. Ator | Use getlens() |
2007-01-19 | J. Ator | Replaced call to parseq with call to parstr() |
2009-03-23 | J. Ator | Added '#' option for more than one occurrence of STR |
2009-08-11 | J. Woollen | Added COMMON COMPRS along with logic to write long strings into compressed subsets |
2012-12-07 | J. Ator | Allow str mnemonic length of up to 14 chars when used with '#' occurrence code |
2014-10-22 | J. Ator | No longer abort if no subset available for writing; just print a warning message |
2014-12-10 | J. Ator | USE modules instead of COMMON blocks |
2020-09-09 | J. Ator | No longer abort if STR not available within subset definition; instead, just print a warning message |
Definition at line 59 of file writlc.f.
References bort(), errwrt(), getlens(), iupbs3(), parstr(), parutg(), pkc(), status(), upb(), upbb(), and usrtpl().
Referenced by msgupd().