1 |
rpa |
1.1 |
C $Header: /u/gcmpack/MITgcm/model/src/packages_boot.F,v 1.46 2008/08/17 02:08:24 jmc Exp $ |
2 |
|
|
C $Name: $ |
3 |
|
|
|
4 |
|
|
#include "PACKAGES_CONFIG.h" |
5 |
|
|
#include "CPP_OPTIONS.h" |
6 |
|
|
|
7 |
|
|
CBOP |
8 |
|
|
C !ROUTINE: PACKAGES_BOOT |
9 |
|
|
C !INTERFACE: |
10 |
|
|
SUBROUTINE PACKAGES_BOOT( myThid ) |
11 |
|
|
|
12 |
|
|
C !DESCRIPTION: \bv |
13 |
|
|
C *==========================================================* |
14 |
|
|
C | SUBROUTINE PACKAGES_BOOT |
15 |
|
|
C | o Routine to parse runtime package selection file |
16 |
|
|
C *==========================================================* |
17 |
|
|
C | Routine reads a flat file which contains a single flag |
18 |
|
|
C | for each known "package". Flag can enables runtime |
19 |
|
|
C | activation or deactivation of a package. The data is read |
20 |
|
|
C | from a file called data.pkg. |
21 |
|
|
C | Note - If a runtime activation flag is set on but the |
22 |
|
|
C | package code was not included in the build then |
23 |
|
|
C | the default behavior is to stop with an error. |
24 |
|
|
C *==========================================================* |
25 |
|
|
C \ev |
26 |
|
|
|
27 |
|
|
C !USES: |
28 |
|
|
IMPLICIT NONE |
29 |
|
|
C === Global variables === |
30 |
|
|
#include "SIZE.h" |
31 |
|
|
#include "EEPARAMS.h" |
32 |
|
|
#include "PARAMS.h" |
33 |
|
|
|
34 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
35 |
|
|
C === Routine arguments === |
36 |
|
|
C myThid - Number of this instances |
37 |
|
|
INTEGER myThid |
38 |
|
|
|
39 |
|
|
C !LOCAL VARIABLES: |
40 |
|
|
C === Local variables === |
41 |
|
|
C msgBuf - Informational/error meesage buffer |
42 |
|
|
C iUnit - Work variable for IO unit number |
43 |
|
|
CHARACTER*(MAX_LEN_MBUF) msgBuf |
44 |
|
|
INTEGER iUnit |
45 |
|
|
|
46 |
|
|
C data.pkg namelists |
47 |
|
|
NAMELIST /PACKAGES/ |
48 |
|
|
& useOBCS, |
49 |
|
|
& useSHAP_FILT, |
50 |
|
|
& useZONAL_FILT, |
51 |
|
|
& useOPPS, |
52 |
|
|
& usePP81, |
53 |
|
|
& useMY82, |
54 |
|
|
& useGGL90, |
55 |
|
|
& useKPP, |
56 |
|
|
& useGMRedi, |
57 |
|
|
& useDOWN_SLOPE, |
58 |
|
|
c & useCAL, |
59 |
|
|
& useEXF, |
60 |
|
|
& useBulkForce, |
61 |
|
|
& useEBM, |
62 |
|
|
& useCheapAML, |
63 |
|
|
& useGrdchk, |
64 |
|
|
& useECCO, |
65 |
|
|
& useSBO, |
66 |
|
|
& useFLT, |
67 |
|
|
& usePTRACERS, |
68 |
|
|
& useGCHEM, |
69 |
|
|
& useRBCS, |
70 |
|
|
& useOffLine, |
71 |
|
|
& useMATRIX, |
72 |
|
|
& useSEAICE, |
73 |
|
|
& useSALT_PLUME, |
74 |
|
|
& useShelfIce, |
75 |
|
|
& useThSIce, |
76 |
|
|
& useATM2D, |
77 |
|
|
& useAIM, |
78 |
|
|
& useLand, |
79 |
|
|
& useFizhi, |
80 |
|
|
& useGridAlt, |
81 |
|
|
& useDiagnostics, |
82 |
|
|
& useREGRID, |
83 |
|
|
& useMNC, |
84 |
|
|
& useRunClock, |
85 |
|
|
& useEMBED_FILES, |
86 |
|
|
& useMYPACKAGE, |
87 |
|
|
C added by RPA |
88 |
|
|
& useLayers |
89 |
|
|
CEOP |
90 |
|
|
|
91 |
|
|
_BEGIN_MASTER(myThid) |
92 |
|
|
|
93 |
|
|
WRITE(msgBuf,'(A)') ' PACKAGES_BOOT: opening data.pkg' |
94 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
95 |
|
|
& SQUEEZE_RIGHT , myThid ) |
96 |
|
|
|
97 |
|
|
|
98 |
|
|
CALL OPEN_COPY_DATA_FILE( |
99 |
|
|
I 'data.pkg', 'PACKAGES_BOOT', |
100 |
|
|
O iUnit, |
101 |
|
|
I myThid ) |
102 |
|
|
|
103 |
|
|
C-- Default package configuration |
104 |
|
|
c useGAD =.FALSE. |
105 |
|
|
useOBCS =.FALSE. |
106 |
|
|
useSHAP_FILT =.FALSE. |
107 |
|
|
useZONAL_FILT =.FALSE. |
108 |
|
|
useOPPS =.FALSE. |
109 |
|
|
usePP81 =.FALSE. |
110 |
|
|
useMY82 =.FALSE. |
111 |
|
|
useGGL90 =.FALSE. |
112 |
|
|
useKPP =.FALSE. |
113 |
|
|
useGMRedi =.FALSE. |
114 |
|
|
useDOWN_SLOPE =.FALSE. |
115 |
|
|
useCAL =.FALSE. |
116 |
|
|
useEXF =.FALSE. |
117 |
|
|
useBulkForce =.FALSE. |
118 |
|
|
useEBM =.FALSE. |
119 |
|
|
useCheapAML =.FALSE. |
120 |
|
|
useGrdchk =.FALSE. |
121 |
|
|
useECCO =.FALSE. |
122 |
|
|
useSBO =.FALSE. |
123 |
|
|
useFLT =.FALSE. |
124 |
|
|
usePTRACERS =.FALSE. |
125 |
|
|
useGCHEM =.FALSE. |
126 |
|
|
useRBCS =.FALSE. |
127 |
|
|
useOffLine =.FALSE. |
128 |
|
|
useMATRIX =.FALSE. |
129 |
|
|
useSEAICE =.FALSE. |
130 |
|
|
useSALT_PLUME =.FALSE. |
131 |
|
|
useShelfIce =.FALSE. |
132 |
|
|
useThSIce =.FALSE. |
133 |
|
|
useATM2D =.FALSE. |
134 |
|
|
useAIM =.FALSE. |
135 |
|
|
useLand =.FALSE. |
136 |
|
|
useFizhi =.FALSE. |
137 |
|
|
useGridAlt =.FALSE. |
138 |
|
|
useDiagnostics =.FALSE. |
139 |
|
|
useREGRID =.FALSE. |
140 |
|
|
useMNC =.FALSE. |
141 |
|
|
useRunClock =.FALSE. |
142 |
|
|
useMYPACKAGE =.FALSE. |
143 |
|
|
C added by RPA |
144 |
|
|
useLayers =.FALSE. |
145 |
|
|
|
146 |
|
|
C-- Read parameters from open data file |
147 |
|
|
READ(UNIT=iUnit,NML=PACKAGES) |
148 |
|
|
|
149 |
|
|
|
150 |
|
|
WRITE(msgBuf,'(A)') ' PACKAGES_BOOT: finished reading data.pkg' |
151 |
|
|
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
152 |
|
|
& SQUEEZE_RIGHT , myThid ) |
153 |
|
|
|
154 |
|
|
C-- Close the open data file |
155 |
|
|
CLOSE(iUnit) |
156 |
|
|
|
157 |
|
|
C-- packages with hard-coded switch |
158 |
|
|
#ifdef ALLOW_CAL |
159 |
|
|
IF (useEXF) useCAL = .TRUE. |
160 |
|
|
#endif |
161 |
|
|
|
162 |
|
|
#ifdef ALLOW_PROFILES |
163 |
|
|
useCAL = .TRUE. |
164 |
|
|
#endif |
165 |
|
|
|
166 |
|
|
C-- packages with an implied switch |
167 |
|
|
useGAD = tempStepping .OR. saltStepping .OR. usePTRACERS |
168 |
|
|
|
169 |
|
|
_END_MASTER(myThid) |
170 |
|
|
|
171 |
|
|
C-- Everyone else must wait for the parameters to be loaded |
172 |
|
|
_BARRIER |
173 |
|
|
|
174 |
|
|
RETURN |
175 |
|
|
END |