updated top-level README and version_decl for V4.5 (#1847)
[WRF.git] / var / external / bufr / writcp.f
blob0dd3cad62f39c85be4e981bc7c073d069a3bc144
1 SUBROUTINE WRITCP(LUNIT)
3 C$$$ SUBPROGRAM DOCUMENTATION BLOCK
5 C SUBPROGRAM: WRITCP
6 C PRGMMR: WOOLLEN ORG: NP20 DATE: 2002-05-14
8 C ABSTRACT: THIS SUBROUTINE SHOULD ONLY BE CALLED WHEN LOGICAL UNIT
9 C LUNIT HAS BEEN OPENED FOR OUTPUT OPERATIONS. IT NOW SIMPLY CALLS
10 C BUFR ARCHIVE LIBRARY SUBROUTINE CMPMSG TO TOGGLE ON MESSAGE
11 C COMPRESSION, FOLLOWED BY A CALL TO WRITSB TO PACK UP THE CURRENT
12 C SUBSET WITHIN MEMORY AND TRY TO ADD IT TO THE COMPRESSED BUFR
13 C MESSAGE THAT IS CURRENTLY OPEN WITHIN MEMORY FOR THIS LUNIT,
14 C FOLLOWED BY ANOTHER CALL TO CMPMSG TO TOGGLE OFF MESSAGE
15 C COMPRESSION. THIS SUBROUTINE USES THE SAME INPUT AND OUTPUT
16 C PARAMETERS AS WRITSB.
18 C PROGRAM HISTORY LOG:
19 C 2002-05-14 J. WOOLLEN -- ORIGINAL AUTHOR
20 C 2003-11-04 S. BENDER -- ADDED REMARKS/BUFRLIB ROUTINE
21 C INTERDEPENDENCIES
22 C 2003-11-04 D. KEYSER -- UNIFIED/PORTABLE FOR WRF; ADDED
23 C DOCUMENTATION (INCLUDING HISTORY); OUTPUTS
24 C MORE COMPLETE DIAGNOSTIC INFO WHEN ROUTINE
25 C TERMINATES ABNORMALLY
26 C 2005-03-09 J. ATOR -- MODIFIED TO USE CMPMSG AND WRITSB
28 C USAGE: CALL WRITCP (LUNIT)
29 C INPUT ARGUMENT LIST:
30 C LUNIT - INTEGER: FORTRAN LOGICAL UNIT NUMBER FOR BUFR FILE
32 C REMARKS:
33 C THIS ROUTINE CALLS: CMPMSG WRITSB
34 C THIS ROUTINE IS CALLED BY: None
35 C Normally called only by application
36 C programs.
38 C ATTRIBUTES:
39 C LANGUAGE: FORTRAN 77
40 C MACHINE: PORTABLE TO ALL PLATFORMS
42 C$$$
44 CALL CMPMSG('Y')
46 CALL WRITSB(LUNIT)
48 CALL CMPMSG('N')
50 RETURN
51 END