/[MITgcm]/MITgcm/pkg/cfc/cfc_readparms.F
ViewVC logotype

Annotation of /MITgcm/pkg/cfc/cfc_readparms.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.4 - (hide annotations) (download)
Wed Aug 9 15:23:38 2017 UTC (6 years, 9 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, HEAD
Changes since 1.3: +6 -2 lines
replace CLOSE(nmlfileUnit) with CLOSE(nmlfileUnit,STATUS='DELETE') to remove
scratchfiles after closing, except for SINGLE_DISK_IO, when everything
stays the same

1 mlosch 1.4 C $Header: /u/gcmpack/MITgcm/pkg/cfc/cfc_readparms.F,v 1.3 2013/06/10 02:51:08 jmc Exp $
2     C $Name: BASE $
3 dfer 1.1
4     #include "GCHEM_OPTIONS.h"
5    
6     CBOP
7 jmc 1.3 C !ROUTINE: CFC_READPARMS
8     C !INTERFACE:
9 dfer 1.1 SUBROUTINE CFC_READPARMS( myThid )
10    
11     C !DESCRIPTION: \bv
12     C *==========================================================*
13     C | S/R CFC_READPARMS
14     C | o Initialise and read cfc package parameters
15     C *==========================================================*
16     C \ev
17    
18     C !USES:
19     IMPLICIT NONE
20    
21     C === Global variables ===
22     #include "SIZE.h"
23     #include "EEPARAMS.h"
24     #include "PARAMS.h"
25     #include "CFC.h"
26 jmc 1.3 #ifdef ALLOW_PTRACERS
27     # include "PTRACERS_SIZE.h"
28     # include "PTRACERS_PARAMS.h"
29     #endif
30 dfer 1.1
31     C !INPUT/OUTPUT PARAMETERS:
32     C === Routine arguments ===
33     C myThid :: My Thread Id. number
34     INTEGER myThid
35     CEOP
36    
37     #ifdef ALLOW_CFC
38    
39     C === Local variables ===
40     C msgBuf :: Informational/error message buffer
41     C iUnit :: Work variable for IO unit number
42     CHARACTER*(MAX_LEN_MBUF) msgBuf
43     INTEGER iUnit
44    
45     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
46    
47     NAMELIST /CFC_FORCING/
48 jmc 1.3 & atmCFC_inpFile, atmCFC_recSepTime, atmCFC_timeOffset,
49     & atmCFC_yNorthBnd, atmCFC_ySouthBnd,
50 jmc 1.2 & CFC_windFile, CFC_atmospFile, CFC_iceFile,
51     & CFC_forcingPeriod, CFC_forcingCycle
52 dfer 1.1
53     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
54    
55     _BEGIN_MASTER(myThid)
56    
57 jmc 1.3 atmCFC_inpFile = 'cfc1112.atm'
58     atmCFC_recSepTime = 360. _d 0 * 86400. _d 0
59     atmCFC_timeOffset = UNSET_RL
60     atmCFC_yNorthBnd = 10. _d 0
61     atmCFC_ySouthBnd = -10. _d 0
62 jmc 1.2 CFC_windFile = ' '
63     CFC_atmospFile= ' '
64     CFC_iceFile = ' '
65 dfer 1.1 c default periodic forcing to same as for physics
66 jmc 1.2 CFC_forcingPeriod = externForcingPeriod
67     CFC_forcingCycle = externForcingCycle
68 dfer 1.1
69     WRITE(msgBuf,'(A)') ' CFC_READPARMS: opening data.cfc'
70     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
71     I SQUEEZE_RIGHT, myThid )
72    
73     CALL OPEN_COPY_DATA_FILE( 'data.cfc', 'CFC_READPARMS',
74     O iUnit, myThid )
75    
76     C-- Read parameters from open data file:
77    
78     C- forcing filenames and parameters
79     READ(UNIT=iUnit,NML=CFC_FORCING)
80    
81     WRITE(msgBuf,'(A)')
82     & ' CFC_READPARMS: finished reading data.cfc'
83     CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
84     I SQUEEZE_RIGHT, myThid )
85    
86     C-- Close the open data file
87 mlosch 1.4 #ifdef SINGLE_DISK_IO
88 dfer 1.1 CLOSE(iUnit)
89 mlosch 1.4 #else
90     CLOSE(iUnit,STATUS='DELETE')
91     #endif /* SINGLE_DISK_IO */
92 dfer 1.1
93 jmc 1.3 IF ( atmCFC_timeOffset .EQ. UNSET_RL ) THEN
94     C- Assume that cfcTime=0 corresponds to the beginning of the 1rst record
95     C time-period. This is consistent with 1rst record value = time-averaged
96     C atmos-CFC over time period: cfcTime= 0 to cfcTime= 1 x atmCFC_recSepTime
97     C- To reproduce previous time interpolation (formerly in cfc12_forcing.F),
98     C set default timeOffset according to PTRACERS_Iter0 :
99     atmCFC_timeOffset = atmCFC_recSepTime
100     & - deltaTClock*PTRACERS_Iter0
101     ENDIF
102    
103     CFC_monFreq = 0. _d 0
104     IF ( debugLevel.GE.debLevB ) CFC_monFreq = PTRACERS_monitorFreq
105    
106 dfer 1.1 _END_MASTER(myThid)
107    
108     C-- Everyone else must wait for the parameters to be loaded
109     _BARRIER
110    
111     C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----|
112    
113     #endif /* ALLOW_CFC */
114    
115     RETURN
116     END

  ViewVC Help
Powered by ViewVC 1.1.22