28 |
#ifdef ALLOW_PTRACERS |
#ifdef ALLOW_PTRACERS |
29 |
|
|
30 |
C !LOCAL VARIABLES: |
C !LOCAL VARIABLES: |
31 |
C iTracer :: loop indices |
C k,iTracer :: loop indices |
32 |
C iUnit :: unit number for I/O |
C iUnit :: unit number for I/O |
33 |
C msgBuf :: message buffer |
C msgBuf :: message buffer |
34 |
INTEGER iTracer |
INTEGER k, iTracer |
35 |
INTEGER iUnit |
INTEGER iUnit |
36 |
INTEGER ic |
INTEGER ic |
37 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
38 |
|
_RL PTRACERS_diffKr(PTRACERS_num) |
39 |
|
|
40 |
C PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS |
C PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS |
41 |
C are written to post-processing files. |
C are written to post-processing files. |
42 |
NAMELIST /PTRACERS_PARM01/ |
NAMELIST /PTRACERS_PARM01/ |
43 |
|
& PTRACERS_dumpFreq, |
44 |
& PTRACERS_taveFreq, |
& PTRACERS_taveFreq, |
45 |
|
& PTRACERS_monitorFreq, |
46 |
& PTRACERS_advScheme, |
& PTRACERS_advScheme, |
47 |
|
& PTRACERS_ImplVertAdv, |
48 |
& PTRACERS_diffKh, |
& PTRACERS_diffKh, |
49 |
& PTRACERS_diffK4, |
& PTRACERS_diffK4, |
50 |
& PTRACERS_diffKr, |
& PTRACERS_diffKr, |
51 |
|
& PTRACERS_diffKrNr, |
52 |
& PTRACERS_useGMRedi, |
& PTRACERS_useGMRedi, |
53 |
& PTRACERS_useKPP, |
& PTRACERS_useKPP, |
54 |
& PTRACERS_numInUse, |
& PTRACERS_numInUse, |
57 |
& PTRACERS_names, |
& PTRACERS_names, |
58 |
& PTRACERS_long_names, |
& PTRACERS_long_names, |
59 |
& PTRACERS_units, |
& PTRACERS_units, |
|
& PTRACERS_write_ioinc, |
|
60 |
& PTRACERS_read_mnc, |
& PTRACERS_read_mnc, |
61 |
& PTRACERS_write_mnc |
& PTRACERS_write_mnc |
62 |
|
|
65 |
PTRACERSisON=.TRUE. |
PTRACERSisON=.TRUE. |
66 |
|
|
67 |
C Set defaults values for parameters in PTRACERS.h |
C Set defaults values for parameters in PTRACERS.h |
68 |
PTRACERS_taveFreq=taveFreq |
PTRACERS_taveFreq = dumpFreq |
69 |
|
PTRACERS_taveFreq = taveFreq |
70 |
|
PTRACERS_monitorFreq = monitorFreq |
71 |
PTRACERS_numInUse=-1 |
PTRACERS_numInUse=-1 |
72 |
DO iTracer=1,PTRACERS_num |
DO iTracer=1,PTRACERS_num |
73 |
PTRACERS_advScheme(iTracer)=saltAdvScheme |
PTRACERS_advScheme(iTracer)=saltAdvScheme |
74 |
|
PTRACERS_ImplVertAdv(iTracer) = .FALSE. |
75 |
PTRACERS_diffKh(iTracer)=diffKhS |
PTRACERS_diffKh(iTracer)=diffKhS |
76 |
PTRACERS_diffK4(iTracer)=diffK4S |
PTRACERS_diffK4(iTracer)=diffK4S |
77 |
PTRACERS_diffKr(iTracer)=diffKrNrS(1) |
PTRACERS_diffKr(iTracer)=UNSET_RL |
78 |
|
DO k=1,Nr |
79 |
|
PTRACERS_diffKrNr(k,iTracer)=diffKrNrS(k) |
80 |
|
ENDDO |
81 |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
82 |
PTRACERS_useKPP(iTracer)=useKPP |
PTRACERS_useKPP(iTracer)=useKPP |
83 |
PTRACERS_initialFile(iTracer)=' ' |
PTRACERS_initialFile(iTracer)=' ' |
92 |
PTRACERS_read_mnc = .FALSE. |
PTRACERS_read_mnc = .FALSE. |
93 |
PTRACERS_write_mdsio = .TRUE. |
PTRACERS_write_mdsio = .TRUE. |
94 |
PTRACERS_write_mnc = .FALSE. |
PTRACERS_write_mnc = .FALSE. |
|
PTRACERS_write_ioinc = .FALSE. |
|
95 |
|
|
96 |
C Open and read the data.ptracers file |
C Open and read the data.ptracers file |
97 |
_BEGIN_MASTER(myThid) |
_BEGIN_MASTER(myThid) |
143 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
144 |
ENDIF |
ENDIF |
145 |
ENDDO |
ENDDO |
146 |
|
#ifndef INCLUDE_IMPLVERTADV_CODE |
147 |
|
DO iTracer=1,PTRACERS_numInUse |
148 |
|
IF ( PTRACERS_ImplVertAdv(iTracer) ) THEN |
149 |
|
WRITE(msgBuf,'(A)') |
150 |
|
& 'PTRACERS_READPARMS: #undef INCLUDE_IMPLVERTADV_CODE' |
151 |
|
CALL PRINT_ERROR( msgBuf , myThid) |
152 |
|
WRITE(msgBuf,'(2A,I2,A)') 'PTRACERS_READPARMS:', |
153 |
|
& ' but pTracers_ImplVertAdv(',iTracer,' ) is TRUE' |
154 |
|
CALL PRINT_ERROR( msgBuf , myThid) |
155 |
|
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
156 |
|
ENDIF |
157 |
|
ENDDO |
158 |
|
#endif |
159 |
|
DO iTracer=1,PTRACERS_numInUse |
160 |
|
PTRACERS_useGMRedi(iTracer) = PTRACERS_useGMRedi(iTracer) |
161 |
|
& .AND.useGMRedi |
162 |
|
PTRACERS_useKPP(iTracer) = PTRACERS_useKPP(iTracer) |
163 |
|
& .AND.useKPP |
164 |
|
IF ( PTRACERS_diffKr(iTracer).NE.UNSET_RL ) THEN |
165 |
|
DO k=1,Nr |
166 |
|
PTRACERS_diffKrNr(k,iTracer)=PTRACERS_diffKr(iTracer) |
167 |
|
ENDDO |
168 |
|
ENDIF |
169 |
|
ENDDO |
170 |
|
|
171 |
#ifdef ALLOW_MNC |
#ifdef ALLOW_MNC |
172 |
IF (useMNC) THEN |
IF (useMNC) THEN |
173 |
C Set the default I/O Types |
C Set the default I/O Types |
174 |
IF (PTRACERS_read_mnc) PTRACERS_read_mdsio = .FALSE. |
IF (PTRACERS_read_mnc) PTRACERS_read_mdsio = .FALSE. |
175 |
IF ( (.NOT. PTRACERS_write_ioinc) |
IF ( (.NOT. outputTypesInclusive) |
176 |
& .AND. PTRACERS_write_mnc ) pickup_write_mdsio = .FALSE. |
& .AND. PTRACERS_write_mnc ) pickup_write_mdsio = .FALSE. |
177 |
|
IF ( (.NOT. outputTypesInclusive) |
178 |
|
& .AND. PTRACERS_write_mnc ) PTRACERS_write_mdsio = .FALSE. |
179 |
|
|
180 |
C Initialize the MNC variable types for PTRACERS |
C Initialize the MNC variable types for PTRACERS |
181 |
CALL PTRACERS_MNC_INIT( myThid ) |
CALL PTRACERS_MNC_INIT( myThid ) |
182 |
ENDIF |
ENDIF |
183 |
#endif /* ALLOW_MNC */ |
#endif /* ALLOW_MNC */ |
184 |
|
|
185 |
|
C-- Print a summary of pTracer parameter values: |
186 |
|
iUnit = standardMessageUnit |
187 |
|
WRITE(msgBuf,'(A)') '// ===================================' |
188 |
|
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
189 |
|
WRITE(msgBuf,'(A)') '// PTRACERS parameters ' |
190 |
|
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
191 |
|
WRITE(msgBuf,'(A)') '// ===================================' |
192 |
|
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
193 |
|
CALL WRITE_0D_I( PTRACERS_numInUse, INDEX_NONE, |
194 |
|
& 'PTRACERS_numInUse =', |
195 |
|
& ' /* number of tracers */') |
196 |
|
CALL WRITE_0D_R8(PTRACERS_dumpFreq, INDEX_NONE, |
197 |
|
& 'PTRACERS_dumpFreq =', |
198 |
|
& ' /* Frequency^-1 for snapshot output (s) */') |
199 |
|
CALL WRITE_0D_R8(PTRACERS_taveFreq, INDEX_NONE, |
200 |
|
& 'PTRACERS_taveFreq =', |
201 |
|
& ' /* Frequency^-1 for time-Aver. output (s) */') |
202 |
|
CALL WRITE_0D_L( PTRACERS_useRecords, INDEX_NONE, |
203 |
|
& 'PTRACERS_useRecords =', ' /* all tracers in 1 file */') |
204 |
|
CALL WRITE_0D_L( PTRACERS_write_mdsio, INDEX_NONE, |
205 |
|
& 'PTRACERS_write_mdsio =', ' /* write mdsio files */') |
206 |
|
CALL WRITE_0D_L( PTRACERS_write_mnc, INDEX_NONE, |
207 |
|
& 'PTRACERS_write_mnc =', ' /* write mnc files */') |
208 |
|
|
209 |
|
DO iTracer=1,PTRACERS_numInUse |
210 |
|
WRITE(msgBuf,'(A)') ' -----------------------------------' |
211 |
|
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
212 |
|
WRITE(msgBuf,'(A,I4)') ' tracer number : ',iTracer |
213 |
|
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
214 |
|
CALL WRITE_0D_I( PTRACERS_advScheme(iTracer), INDEX_NONE, |
215 |
|
& 'PTRACERS_advScheme =', ' /* Advection Scheme */') |
216 |
|
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
217 |
|
& 'PTRACERS_ImplVertAdv =', |
218 |
|
& ' /* implicit vert. advection flag */') |
219 |
|
CALL WRITE_0D_R8( PTRACERS_diffKh(iTracer), INDEX_NONE, |
220 |
|
& 'PTRACERS_diffKh =', ' /* Laplacian Diffusivity */') |
221 |
|
CALL WRITE_0D_R8( PTRACERS_diffK4(iTracer), INDEX_NONE, |
222 |
|
& 'PTRACERS_diffK4 =', ' /* Biharmonic Diffusivity */') |
223 |
|
CALL WRITE_1D_R8( PTRACERS_diffKrNr(1,iTracer), Nr, INDEX_K, |
224 |
|
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
225 |
|
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
226 |
|
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
227 |
|
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
228 |
|
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
229 |
|
|
230 |
|
ENDDO |
231 |
|
WRITE(msgBuf,'(A)') ' -----------------------------------' |
232 |
|
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT , 1) |
233 |
#endif /* ALLOW_PTRACERS */ |
#endif /* ALLOW_PTRACERS */ |
234 |
|
|
235 |
RETURN |
RETURN |