69 |
& PTRACERS_pickup_write_mnc, |
& PTRACERS_pickup_write_mnc, |
70 |
& PTRACERS_pickup_read_mnc |
& PTRACERS_pickup_read_mnc |
71 |
|
|
72 |
|
_BEGIN_MASTER(myThid) |
73 |
|
|
74 |
C This routine has been called by the main model so we set our |
C This routine has been called by the main model so we set our |
75 |
C internal flag to indicate we are in business |
C internal flag to indicate we are in business |
76 |
PTRACERSisON=.TRUE. |
PTRACERSisON=.TRUE. |
103 |
ENDDO |
ENDDO |
104 |
PTRACERS_useRecords = .FALSE. |
PTRACERS_useRecords = .FALSE. |
105 |
#ifdef ALLOW_MNC |
#ifdef ALLOW_MNC |
106 |
PTRACERS_timeave_mnc = timeave_mnc .AND. useMNC |
PTRACERS_timeave_mnc = useMNC .AND. timeave_mnc |
107 |
PTRACERS_snapshot_mnc = snapshot_mnc .AND. useMNC |
PTRACERS_snapshot_mnc = useMNC .AND. snapshot_mnc |
108 |
PTRACERS_monitor_mnc = monitor_mnc .AND. useMNC |
PTRACERS_monitor_mnc = useMNC .AND. monitor_mnc |
109 |
PTRACERS_pickup_write_mnc = pickup_write_mnc .AND. useMNC |
PTRACERS_pickup_write_mnc = useMNC .AND. pickup_write_mnc |
110 |
PTRACERS_pickup_read_mnc = pickup_read_mnc .AND. useMNC |
PTRACERS_pickup_read_mnc = useMNC .AND. pickup_read_mnc |
111 |
#else |
#else |
112 |
PTRACERS_timeave_mnc = .FALSE. |
PTRACERS_timeave_mnc = .FALSE. |
113 |
PTRACERS_snapshot_mnc = .FALSE. |
PTRACERS_snapshot_mnc = .FALSE. |
117 |
#endif |
#endif |
118 |
|
|
119 |
C Open and read the data.ptracers file |
C Open and read the data.ptracers file |
|
_BEGIN_MASTER(myThid) |
|
120 |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
121 |
CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
122 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , myThid ) |
123 |
CALL OPEN_COPY_DATA_FILE( |
CALL OPEN_COPY_DATA_FILE( |
124 |
I 'data.ptracers', 'PTRACERS_READPARMS', |
I 'data.ptracers', 'PTRACERS_READPARMS', |
125 |
O iUnit, |
O iUnit, |
127 |
READ(UNIT=iUnit,NML=PTRACERS_PARM01) |
READ(UNIT=iUnit,NML=PTRACERS_PARM01) |
128 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
129 |
& ' PTRACERS_READPARMS: finished reading data.ptracers' |
& ' PTRACERS_READPARMS: finished reading data.ptracers' |
130 |
CALL PRINT_MESSAGE(msgBuf, standardMessageUnit, |
CALL PRINT_MESSAGE( msgBuf, standardMessageUnit, |
131 |
& SQUEEZE_RIGHT , 1) |
& SQUEEZE_RIGHT , myThid ) |
132 |
|
|
133 |
C Close the open data file |
C Close the open data file |
134 |
CLOSE(iUnit) |
CLOSE(iUnit) |
|
_END_MASTER(myThid) |
|
|
|
|
|
C Everyone else must wait for the parameters to be loaded |
|
|
_BARRIER |
|
135 |
|
|
136 |
C Now set-up any remaining parameters that result from the input |
C Now set-up any remaining parameters that result from the input |
137 |
C parameters |
C parameters |
147 |
& ' PTRACERS_READPARMS: You requested ',PTRACERS_numInUse, |
& ' PTRACERS_READPARMS: You requested ',PTRACERS_numInUse, |
148 |
& ' tracers at run time when only ',PTRACERS_num, |
& ' tracers at run time when only ',PTRACERS_num, |
149 |
& ' were specified at compile time. Naughty! ' |
& ' were specified at compile time. Naughty! ' |
150 |
CALL PRINT_ERROR(msgBuf, 1) |
CALL PRINT_ERROR( msgBuf, myThid ) |
151 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
152 |
ENDIF |
ENDIF |
153 |
C Check that enough parameters were specified |
C Check that enough parameters were specified |
157 |
& ' PTRACERS_READPARMS: ', |
& ' PTRACERS_READPARMS: ', |
158 |
& 'No advect. scheme specified for tracer #', |
& 'No advect. scheme specified for tracer #', |
159 |
& iTracer |
& iTracer |
160 |
CALL PRINT_ERROR(msgBuf, 1) |
CALL PRINT_ERROR( msgBuf, myThid ) |
161 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
162 |
ENDIF |
ENDIF |
163 |
ENDDO |
ENDDO |
166 |
IF ( PTRACERS_ImplVertAdv(iTracer) ) THEN |
IF ( PTRACERS_ImplVertAdv(iTracer) ) THEN |
167 |
WRITE(msgBuf,'(A)') |
WRITE(msgBuf,'(A)') |
168 |
& 'PTRACERS_READPARMS: #undef INCLUDE_IMPLVERTADV_CODE' |
& 'PTRACERS_READPARMS: #undef INCLUDE_IMPLVERTADV_CODE' |
169 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
170 |
WRITE(msgBuf,'(2A,I2,A)') 'PTRACERS_READPARMS:', |
WRITE(msgBuf,'(2A,I2,A)') 'PTRACERS_READPARMS:', |
171 |
& ' but pTracers_ImplVertAdv(',iTracer,' ) is TRUE' |
& ' but pTracers_ImplVertAdv(',iTracer,' ) is TRUE' |
172 |
CALL PRINT_ERROR( msgBuf , myThid) |
CALL PRINT_ERROR( msgBuf, myThid ) |
173 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
174 |
ENDIF |
ENDIF |
175 |
ENDDO |
ENDDO |
187 |
ENDDO |
ENDDO |
188 |
|
|
189 |
#ifdef ALLOW_MNC |
#ifdef ALLOW_MNC |
190 |
PTRACERS_timeave_mnc = |
PTRACERS_timeave_mnc = useMNC .AND. PTRACERS_timeave_mnc |
191 |
& PTRACERS_timeave_mnc .AND. useMNC |
PTRACERS_snapshot_mnc = useMNC .AND. PTRACERS_snapshot_mnc |
192 |
PTRACERS_snapshot_mnc = |
PTRACERS_monitor_mnc = useMNC .AND. PTRACERS_monitor_mnc |
193 |
& PTRACERS_snapshot_mnc .AND. useMNC |
PTRACERS_pickup_write_mnc = useMNC .AND. PTRACERS_pickup_write_mnc |
194 |
PTRACERS_monitor_mnc = |
PTRACERS_pickup_read_mnc = useMNC .AND. PTRACERS_pickup_read_mnc |
|
& PTRACERS_monitor_mnc .AND. useMNC .AND. monitor_mnc |
|
|
PTRACERS_pickup_write_mnc = |
|
|
& PTRACERS_pickup_write_mnc .AND. useMNC |
|
|
PTRACERS_pickup_read_mnc = |
|
|
& PTRACERS_pickup_read_mnc .AND. useMNC |
|
195 |
|
|
196 |
PTRACERS_timeave_mdsio = (.NOT. PTRACERS_timeave_mnc) |
PTRACERS_timeave_mdsio = (.NOT. PTRACERS_timeave_mnc) |
197 |
& .OR. outputTypesInclusive |
& .OR. outputTypesInclusive |
203 |
& .OR. outputTypesInclusive |
& .OR. outputTypesInclusive |
204 |
PTRACERS_pickup_read_mdsio = (.NOT. PTRACERS_pickup_read_mnc) |
PTRACERS_pickup_read_mdsio = (.NOT. PTRACERS_pickup_read_mnc) |
205 |
& .OR. outputTypesInclusive |
& .OR. outputTypesInclusive |
|
|
|
206 |
#else |
#else |
207 |
PTRACERS_timeave_mnc = .FALSE. |
PTRACERS_timeave_mnc = .FALSE. |
208 |
PTRACERS_snapshot_mnc = .FALSE. |
PTRACERS_snapshot_mnc = .FALSE. |
219 |
C-- Print a summary of pTracer parameter values: |
C-- Print a summary of pTracer parameter values: |
220 |
iUnit = standardMessageUnit |
iUnit = standardMessageUnit |
221 |
WRITE(msgBuf,'(A)') '// ===================================' |
WRITE(msgBuf,'(A)') '// ===================================' |
222 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , myThid ) |
223 |
WRITE(msgBuf,'(A)') '// PTRACERS parameters ' |
WRITE(msgBuf,'(A)') '// PTRACERS parameters ' |
224 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , myThid ) |
225 |
WRITE(msgBuf,'(A)') '// ===================================' |
WRITE(msgBuf,'(A)') '// ===================================' |
226 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , myThid ) |
227 |
CALL WRITE_0D_I( PTRACERS_numInUse, INDEX_NONE, |
CALL WRITE_0D_I( PTRACERS_numInUse, INDEX_NONE, |
228 |
& 'PTRACERS_numInUse =', |
& 'PTRACERS_numInUse =', |
229 |
& ' /* number of tracers */') |
& ' /* number of tracers */') |
238 |
& ' /* Frequency^-1 for time-Aver. output (s) */') |
& ' /* Frequency^-1 for time-Aver. output (s) */') |
239 |
CALL WRITE_0D_L( PTRACERS_useRecords, INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useRecords, INDEX_NONE, |
240 |
& 'PTRACERS_useRecords =', ' /* all tracers in 1 file */') |
& 'PTRACERS_useRecords =', ' /* all tracers in 1 file */') |
241 |
|
|
242 |
CALL WRITE_0D_L( PTRACERS_timeave_mnc, INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_timeave_mnc, INDEX_NONE, |
243 |
& 'PTRACERS_timeave_mnc =', |
& 'PTRACERS_timeave_mnc =', |
244 |
& ' /* use MNC for Tave output */') |
& ' /* use MNC for Tave output */') |
246 |
& 'PTRACERS_snapshot_mnc =', |
& 'PTRACERS_snapshot_mnc =', |
247 |
& ' /* use MNC for snapshot output */') |
& ' /* use MNC for snapshot output */') |
248 |
CALL WRITE_0D_L( PTRACERS_pickup_write_mnc, INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_pickup_write_mnc, INDEX_NONE, |
249 |
& 'PTRACERS_pickup_write_mnc =', |
& 'PTRACERS_pickup_write_mnc =', |
250 |
& ' /* use MNC for writing pickups */') |
& ' /* use MNC for writing pickups */') |
251 |
CALL WRITE_0D_L( PTRACERS_pickup_read_mnc, INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_pickup_read_mnc, INDEX_NONE, |
252 |
& 'PTRACERS_pickup_read_mnc =', |
& 'PTRACERS_pickup_read_mnc =', |
253 |
& ' /* use MNC for reading pickups */') |
& ' /* use MNC for reading pickups */') |
254 |
|
|
255 |
DO iTracer=1,PTRACERS_numInUse |
DO iTracer=1,PTRACERS_numInUse |
256 |
WRITE(msgBuf,'(A)') ' -----------------------------------' |
WRITE(msgBuf,'(A)') ' -----------------------------------' |
257 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
258 |
WRITE(msgBuf,'(A,I4)') ' tracer number : ',iTracer |
WRITE(msgBuf,'(A,I4)') ' tracer number : ',iTracer |
259 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
260 |
CALL WRITE_0D_I( PTRACERS_advScheme(iTracer), INDEX_NONE, |
CALL WRITE_0D_I( PTRACERS_advScheme(iTracer), INDEX_NONE, |
261 |
& 'PTRACERS_advScheme =', ' /* Advection Scheme */') |
& 'PTRACERS_advScheme =', ' /* Advection Scheme */') |
262 |
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
279 |
|
|
280 |
ENDDO |
ENDDO |
281 |
WRITE(msgBuf,'(A)') ' -----------------------------------' |
WRITE(msgBuf,'(A)') ' -----------------------------------' |
282 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
283 |
|
|
284 |
|
_END_MASTER(myThid) |
285 |
|
C Everyone else must wait for the parameters to be loaded |
286 |
|
_BARRIER |
287 |
|
|
288 |
#endif /* ALLOW_PTRACERS */ |
#endif /* ALLOW_PTRACERS */ |
289 |
|
|
290 |
RETURN |
RETURN |