/[MITgcm]/MITgcm_contrib/darwin/pkg/gchem/gchem_readparms.F
ViewVC logotype

Annotation of /MITgcm_contrib/darwin/pkg/gchem/gchem_readparms.F

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


Revision 1.2 - (hide annotations) (download)
Tue Feb 26 17:13:11 2008 UTC (17 years, 4 months ago) by jahn
Branch: MAIN
CVS Tags: ctrb_darwin_ckpt59o_20080602, ctrb_darwin_ckpt59n_20080424
Changes since 1.1: +6 -6 lines
upgrade to MITgcm checkpoint59n

1 jahn 1.2 C $Header: /u/gcmpack/MITgcm_contrib/darwin/pkg/gchem/gchem_readparms.F,v 1.1 2008/01/11 21:28:02 jahn Exp $
2 jahn 1.1 C $Name: $
3    
4     #include "GCHEM_OPTIONS.h"
5    
6     CBOP
7     C !ROUTINE: GCHEM_READPARMS
8    
9     C !INTERFACE: ==========================================================
10     SUBROUTINE GCHEM_READPARMS( myThid )
11    
12     C !DESCRIPTION:
13     C Initialize GCHEM parameters, read in data.gchem
14    
15     C !USES: ===============================================================
16     IMPLICIT NONE
17     #include "SIZE.h"
18     #include "EEPARAMS.h"
19     #include "PARAMS.h"
20     #include "GCHEM.h"
21    
22     C !INPUT PARAMETERS: ===================================================
23     C myThid :: thread number
24     INTEGER myThid
25    
26     C !OUTPUT PARAMETERS: ==================================================
27     C none
28    
29     #ifdef ALLOW_GCHEM
30    
31     C !LOCAL VARIABLES: ====================================================
32     C tIter0 :: retired parameter
33     C iTracer :: loop indices
34     C iUnit :: unit number for I/O
35     C msgBuf :: message buffer
36     INTEGER tIter0
37     INTEGER iTracer
38     INTEGER iUnit
39     CHARACTER*(MAX_LEN_MBUF) msgBuf
40     c PARAMETER ( UNSET_I = 123456789 )
41     CEOP
42    
43     NAMELIST /GCHEM_PARM01/
44     & tIter0,
45     & WindFile,
46     & IceFile,
47     & AtmospFile,
48     & IronFile,
49     & SilicaFile,
50     & Filename1,
51     & Filename2,
52     & Filename3,
53     & Filename4,
54     & Filename5,
55     & nsubtime,
56     & gchem_int1, gchem_int2, gchem_int3,
57     & gchem_int4, gchem_int5,
58     & gchem_rl1, gchem_rl2, gchem_rl3,
59     & gchem_rl4, gchem_rl5,
60     & gchem_ForcingPeriod, gchem_ForcingCycle
61    
62     C Set defaults values for parameters in GCHEM.h
63     tIter0 = UNSET_I
64     nsubtime=1
65     windFile=' '
66     atmospFile=' '
67     IceFile=' '
68     IronFile=' '
69     SilicaFile=' '
70     Filename1=' '
71     Filename2=' '
72     Filename3=' '
73     Filename4=' '
74     Filename5=' '
75     gchem_int1=0
76     gchem_int2=0
77     gchem_int3=0
78     gchem_int4=0
79     gchem_int5=0
80 jahn 1.2 gchem_rl1=0. _d 0
81     gchem_rl2=0. _d 0
82     gchem_rl3=0. _d 0
83     gchem_rl4=0. _d 0
84     gchem_rl5=0. _d 0
85 jahn 1.1 c default periodic forcing to same as for physics
86     gchem_ForcingPeriod=externForcingPeriod
87     gchem_ForcingCycle=externForcingCycle
88     C Open and read the data.gchem file
89     _BEGIN_MASTER(myThid)
90     WRITE(msgBuf,'(A)') ' GCHEM_READPARMS: opening data.gchem'
91     CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
92     & SQUEEZE_RIGHT , 1)
93     CALL OPEN_COPY_DATA_FILE(
94     I 'data.gchem', 'GCHEM_PARM01',
95     O iUnit,
96     I myThid )
97     READ(UNIT=iUnit,NML=GCHEM_PARM01)
98     WRITE(msgBuf,'(A)')
99     & ' GCHEM_READPARMS: finished reading data.gchem'
100     CALL PRINT_MESSAGE(msgBuf, standardMessageUnit,
101     & SQUEEZE_RIGHT , 1)
102    
103     C Close the open data file
104     CLOSE(iUnit)
105    
106     C- Check for retired parameters:
107     IF ( tIter0 .NE. UNSET_I ) THEN
108     c nRetired = nRetired+1
109     WRITE(msgBuf,'(A,A)')
110     & 'S/R GCHEM_READPARMS: Paramater "tIter0" is',
111     & ' no longer allowed in file "data.gchem"'
112     CALL PRINT_ERROR( msgBuf , myThid)
113     WRITE(msgBuf,'(A,A)')
114     & 'S/R GCHEM_READPARMS: "tIter0" has been moved to',
115     & ' PTRACERS_Iter0 in file "data.ptracers".'
116     CALL PRINT_ERROR( msgBuf , myThid)
117     STOP 'ABNORMAL END: S/R GCHEM_READPARMS'
118     ENDIF
119    
120     _END_MASTER(myThid)
121    
122     C Everyone else must wait for the parameters to be loaded
123     _BARRIER
124    
125     #endif /* ALLOW_GCHEM */
126    
127     RETURN
128     END

  ViewVC Help
Powered by ViewVC 1.1.22