NCEPLIBS-bufr
11.5.0
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | hold4wlc (LUNIT, CHR, STR) |
NORMALLY, A LONG CHARACTER STRING (I.E. More... | |
Definition in file hold4wlc.f.
subroutine hold4wlc | ( | LUNIT, | |
character*(*) | CHR, | ||
character*(*) | STR | ||
) |
NORMALLY, A LONG CHARACTER STRING (I.E.
LONGER THAN 8 BYTES) IS STORED IN AN UNCOMPRESSED BUFR SUBSET FOR OUTPUT VIA A CALL TO BUFR ARCHIVE LIBRARY SUBROUTINE WRITLC, AT A POINT AFTER THE CALL TO BUFR ARCHIVE LIBRARY SUBROUTINE WRITSB (OR WRITSA) HAS ALREADY BEEN MADE FOR THE SUBSET IN QUESTION. THIS WORKS FINE FOR ALL CASES EXCEPT WHEN WRITSB (OR WRITSA) FLUSHES THE MESSAGE CONTAINING THE SUBSET IN QUESTION TO THE BUFR OUTPUT STREAM DURING THE SAME CALL TO WRITSB (OR WRITSA), SUCH AS WHEN A SUBSET HAS A BYTE COUNT > 65530 BYTES. WHEN THIS HAPPENS, THERE IS NO LONGER ANY WAY FOR A SUBSEQUENT WRITLC CALL TO STORE A LONG CHARACTER STRING IN THE SUBSET, BECAUSE THE SUBSET HAS ALREADY BEEN FLUSHED FROM INTERNAL MEMORY TO THE OUTPUT STREAM. THIS SUBROUTINE GETS AROUND THAT PROBLEM, BY ALLOWING A LONG CHARACTER STRING TO BE SPECIFIED AHEAD OF TIME (I.E. BEFORE CALLING WRITSB OR WRITSB), AND THE CORRESPONDING VALUE WILL BE HELD AND STORED AUTOMATICALLY (VIA AN INTERNAL CALL TO WRITLC) AT THE PROPER TIME DURING THE SUBSEQUENT CALL TO WRITSB (OR WRITSA). IF MULTIPLE LONG CHARACTER STRINGS NEED TO BE STORED IN A SUBSET, THEN A SEPARATE CALL TO THIS SUBROUTINE SHOULD BE MADE FOR EACH SUCH STRING.
PROGRAM HISTORY LOG: 2014-02-05 J. ATOR – ORIGINAL AUTHOR
USAGE: CALL HOLD4WLC(LUNIT,CHR,STR) INPUT ARGUMENT LIST: LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE CHR - CHARACTER*(*): UNPACKED CHARACTER STRING (I.E., CHARACTER DATA ELEMENT GREATER THAN EIGHT BYTES) STR - CHARACTER*(*): MNEMONIC ASSOCIATED WITH STRING IN CHR
REMARKS: THIS ROUTINE CALLS: ERRWRT STRSUC THIS ROUTINE IS CALLED BY: None Normally called only by application programs.
Definition at line 40 of file hold4wlc.f.