NCEPLIBS-bufr
11.6.0
|
Go to the source code of this file.
Functions/Subroutines | |
subroutine | wrcmps (LUNIX) |
THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY (ARRAY IBAY IN MODULE BITBUF), STORING IT FOR COMPRESSION. More... | |
Definition in file wrcmps.f.
subroutine wrcmps | ( | LUNIX | ) |
THIS SUBROUTINE PACKS UP THE CURRENT SUBSET WITHIN MEMORY (ARRAY IBAY IN MODULE BITBUF), STORING IT FOR COMPRESSION.
IT THEN TRIES TO ADD IT TO THE COMPRESSED BUFR MESSAGE THAT IS CURRENTLY OPEN WITHIN MEMORY FOR ABS(LUNIX) (ARRAY MGWA). IF THE SUBSET WILL NOT FIT INTO THE CURRENTLY OPEN MESSAGE, THEN THAT COMPRESSED MESSAGE IS FLUSHED TO LUNIX AND A NEW ONE IS CREATED IN ORDER TO HOLD THE CURRENT SUBSET (STILL STORED FOR COMPRESSION). THIS SUBROUTINE PERFORMS FUNCTIONS SIMILAR TO BUFR ARCHIVE LIBRARY SUBROUTINE MSGUPD EXCEPT THAT IT ACTS ON COMPRESSED BUFR MESSAGES.
PROGRAM HISTORY LOG: 2002-05-14 J. WOOLLEN – ORIGINAL AUTHOR 2003-11-04 S. BENDER – ADDED REMARKS/BUFRLIB ROUTINE INTERDEPENDENCIES 2003-11-04 D. KEYSER – MAXJL (MAXIMUM NUMBER OF JUMP/LINK ENTRIES) INCREASED FROM 15000 TO 16000 (WAS IN VERIFICATION VERSION); LOGICAL VARIABLES "WRIT1" AND "FLUSH" NOW SAVED IN GLOBAL MEMORY (IN COMMON BLOCK /COMPRS/), THIS FIXED A BUG IN THIS ROUTINE WHICH CAN LEAD TO MESSAGES BEING WRITTEN OUT BEFORE THEY ARE FULL; UNIFIED/PORTABLE FOR WRF; ADDED DOCUMENTATION (INCLUDING HISTORY); OUTPUTS MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE TERMINATES ABNORMALLY 2004-08-18 J. ATOR – REMOVE CALL TO XMSGINI (CMSGINI NOW HAS SAME CAPABILITY); IMPROVE DOCUMENTATION; CORRECT LOGIC FOR WHEN A CHARACTER VALUE IS THE SAME FOR ALL SUBSETS IN A MESSAGE; MAXIMUM MESSAGE LENGTH INCREASED FROM 20,000 TO 50,000 BYTES 2004-08-18 J. WOOLLEN – 1) ADDED SAVE FOR LOGICAL 'FIRST' 2) ADDED 'KMISS' TO FIX BUG WHICH WOULD OCCASIONALLY SKIP OVER SUBSETS 3) ADDED LOGIC TO MAKE SURE MISSING VALUES ARE REPRESENTED BY INCREMENTS WITH ALL BITS ON 4) REMOVED TWO UNECESSARY REFERENCES TO 'WRIT1' 2005-11-29 J. ATOR – FIX INITIALIZATION BUG FOR CHARACTER COMPRESSION; INCREASE MXCSB TO 4000; USE IUPBS01; CHECK EDITION NUMBER OF BUFR MESSAGE BEFORE PADDING TO AN EVEN BYTE COUNT 2009-03-23 J. ATOR – ADDED SAVE FOR IBYT AND JBIT; USE MSGFULL 2009-08-11 J. WOOLLEN – MADE CATX AND CSTR BIGGER TO HANDLE LONGER STRINGS. ALSO SEPARATED MATX,CATX,NCOL FROM OTHER VARS IN COMMON COMPRS FOR USE IN SUBROUTINE WRITLC. ALSO PASSED MBAY(1,LUN) AS ARRAY TO INITIAL CALL TO CMSGINI IN ORDER FOR USE BY WRITLC. 2012-02-17 J. ATOR – FIXED A BUG INVOLVING COMPRESSED FILES WITH EMBEDDED DICTIONARY MESSAGES 2014-12-03 J. ATOR – USE PKX TO PACK LOCAL REFERENCE VALUE FOR CHARACTER STRINGS 2014-12-10 J. ATOR – USE MODULES INSTEAD OF COMMON BLOCKS 2015-09-24 D. STOKES – INCLUDE EDGE4 IN SAVE LIST 2016-03-18 J. ATOR – FIX BUG INVOLVING ENCODING OF LONG CHARACTER STRINGS (VIA WRITLC) INTO MESSAGES WHICH ALSO CONTAIN DELAYED REPLICATION SEQUENCES 2021-02-24 J. ATOR – USE IPKM AND PKC INSTEAD OF PKX
USAGE: CALL WRCMPS (LUNIX) INPUT ARGUMENT LIST: LUNIX - INTEGER: ABSOLUTE VALUE IS FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE (IF LUNIX IS LESS THAN ZERO, THIS IS A "FLUSH" CALL AND THE BUFFER MUST BE CLEARED OUT)
REMARKS: THIS ROUTINE CALLS: BORT CMSGINI IUPBS01 MSGFULL MSGWRT PKB PKC PKX STATUS UPB UPC USRTPL THIS ROUTINE IS CALLED BY: CLOSMG WRITSA WRITSB Normally not called by any application programs.
Definition at line 79 of file wrcmps.f.
References bort(), cmsgini(), ipkm(), iupbs01(), msgfull(), msgwrt(), pkb(), pkc(), status(), upb(), upc(), and usrtpl().