/[MITgcm]/MITgcm_contrib/rpa_layers/modsrc/packages_boot.F
ViewVC logotype

Contents of /MITgcm_contrib/rpa_layers/modsrc/packages_boot.F

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


Revision 1.2 - (show annotations) (download)
Wed Sep 16 18:06:39 2009 UTC (14 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +4 -6 lines
minor changes in ordering calls (just for convenience)

1 C $Header: /u/gcmpack/MITgcm_contrib/rpa_layers/modsrc/packages_boot.F,v 1.1 2009/09/15 19:46:38 rpa 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 & useLayers,
84 & useMNC,
85 & useRunClock,
86 & useEMBED_FILES,
87 & useMYPACKAGE
88 CEOP
89
90 _BEGIN_MASTER(myThid)
91
92 WRITE(msgBuf,'(A)') ' PACKAGES_BOOT: opening data.pkg'
93 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
94 & SQUEEZE_RIGHT , myThid )
95
96
97 CALL OPEN_COPY_DATA_FILE(
98 I 'data.pkg', 'PACKAGES_BOOT',
99 O iUnit,
100 I myThid )
101
102 C-- Default package configuration
103 c useGAD =.FALSE.
104 useOBCS =.FALSE.
105 useSHAP_FILT =.FALSE.
106 useZONAL_FILT =.FALSE.
107 useOPPS =.FALSE.
108 usePP81 =.FALSE.
109 useMY82 =.FALSE.
110 useGGL90 =.FALSE.
111 useKPP =.FALSE.
112 useGMRedi =.FALSE.
113 useDOWN_SLOPE =.FALSE.
114 useCAL =.FALSE.
115 useEXF =.FALSE.
116 useBulkForce =.FALSE.
117 useEBM =.FALSE.
118 useCheapAML =.FALSE.
119 useGrdchk =.FALSE.
120 useECCO =.FALSE.
121 useSBO =.FALSE.
122 useFLT =.FALSE.
123 usePTRACERS =.FALSE.
124 useGCHEM =.FALSE.
125 useRBCS =.FALSE.
126 useOffLine =.FALSE.
127 useMATRIX =.FALSE.
128 useSEAICE =.FALSE.
129 useSALT_PLUME =.FALSE.
130 useShelfIce =.FALSE.
131 useThSIce =.FALSE.
132 useATM2D =.FALSE.
133 useAIM =.FALSE.
134 useLand =.FALSE.
135 useFizhi =.FALSE.
136 useGridAlt =.FALSE.
137 useDiagnostics =.FALSE.
138 useREGRID =.FALSE.
139 useLayers =.FALSE.
140 useMNC =.FALSE.
141 useRunClock =.FALSE.
142 useMYPACKAGE =.FALSE.
143
144 C-- Read parameters from open data file
145 READ(UNIT=iUnit,NML=PACKAGES)
146
147
148 WRITE(msgBuf,'(A)') ' PACKAGES_BOOT: finished reading data.pkg'
149 CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
150 & SQUEEZE_RIGHT , myThid )
151
152 C-- Close the open data file
153 CLOSE(iUnit)
154
155 C-- packages with hard-coded switch
156 #ifdef ALLOW_CAL
157 IF (useEXF) useCAL = .TRUE.
158 #endif
159
160 #ifdef ALLOW_PROFILES
161 useCAL = .TRUE.
162 #endif
163
164 C-- packages with an implied switch
165 useGAD = tempStepping .OR. saltStepping .OR. usePTRACERS
166
167 _END_MASTER(myThid)
168
169 C-- Everyone else must wait for the parameters to be loaded
170 _BARRIER
171
172 RETURN
173 END

  ViewVC Help
Powered by ViewVC 1.1.22