17 |
IMPLICIT NONE |
IMPLICIT NONE |
18 |
#include "SIZE.h" |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
20 |
|
#ifdef ALLOW_LONGSTEP |
21 |
|
#include "LONGSTEP_PARAMS.h" |
22 |
|
#endif |
23 |
#include "PTRACERS_SIZE.h" |
#include "PTRACERS_SIZE.h" |
24 |
#include "PTRACERS_PARAMS.h" |
#include "PTRACERS_PARAMS.h" |
25 |
#include "PARAMS.h" |
#include "PARAMS.h" |
42 |
INTEGER ic |
INTEGER ic |
43 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
44 |
_RL PTRACERS_diffKr(PTRACERS_num) |
_RL PTRACERS_diffKr(PTRACERS_num) |
45 |
|
_RL tauTr1ClimRelax |
46 |
|
|
47 |
C PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS |
C PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS |
48 |
C are written to post-processing files. |
C are written to post-processing files. |
49 |
|
C tauTr1ClimRelax :: old parameter (will be removed 1 day) |
50 |
NAMELIST /PTRACERS_PARM01/ |
NAMELIST /PTRACERS_PARM01/ |
51 |
|
& tauTr1ClimRelax, |
52 |
& PTRACERS_dumpFreq, |
& PTRACERS_dumpFreq, |
53 |
& PTRACERS_taveFreq, |
& PTRACERS_taveFreq, |
54 |
& PTRACERS_monitorFreq, |
& PTRACERS_monitorFreq, |
60 |
& PTRACERS_diffKrNr, |
& PTRACERS_diffKrNr, |
61 |
& PTRACERS_ref, |
& PTRACERS_ref, |
62 |
& PTRACERS_EvPrRn, |
& PTRACERS_EvPrRn, |
63 |
|
& PTRACERS_addSrelax2EmP, |
64 |
& PTRACERS_useGMRedi, |
& PTRACERS_useGMRedi, |
65 |
|
& PTRACERS_useDWNSLP, |
66 |
& PTRACERS_useKPP, |
& PTRACERS_useKPP, |
67 |
& PTRACERS_Iter0, |
& PTRACERS_Iter0, |
68 |
& PTRACERS_numInUse, |
& PTRACERS_numInUse, |
109 |
ENDDO |
ENDDO |
110 |
PTRACERS_EvPrRn(iTracer)=UNSET_RL |
PTRACERS_EvPrRn(iTracer)=UNSET_RL |
111 |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
112 |
PTRACERS_useKPP(iTracer)=useKPP |
PTRACERS_useDWNSLP(iTracer)=useDOWN_SLOPE |
113 |
|
PTRACERS_useKPP(iTracer) =useKPP |
114 |
PTRACERS_initialFile(iTracer)=' ' |
PTRACERS_initialFile(iTracer)=' ' |
115 |
DO ic = 1,MAX_LEN_FNAM |
DO ic = 1,MAX_LEN_FNAM |
116 |
PTRACERS_names(iTracer)(ic:ic) = ' ' |
PTRACERS_names(iTracer)(ic:ic) = ' ' |
118 |
PTRACERS_units(iTracer)(ic:ic) = ' ' |
PTRACERS_units(iTracer)(ic:ic) = ' ' |
119 |
ENDDO |
ENDDO |
120 |
ENDDO |
ENDDO |
121 |
|
PTRACERS_addSrelax2EmP = .FALSE. |
122 |
PTRACERS_useRecords = .FALSE. |
PTRACERS_useRecords = .FALSE. |
123 |
#ifdef ALLOW_MNC |
#ifdef ALLOW_MNC |
124 |
PTRACERS_timeave_mnc = useMNC .AND. timeave_mnc |
PTRACERS_timeave_mnc = useMNC .AND. timeave_mnc |
133 |
PTRACERS_pickup_write_mnc = .FALSE. |
PTRACERS_pickup_write_mnc = .FALSE. |
134 |
PTRACERS_pickup_read_mnc = .FALSE. |
PTRACERS_pickup_read_mnc = .FALSE. |
135 |
#endif |
#endif |
136 |
|
tauTr1ClimRelax = 0. |
137 |
|
DO k = 1,Nr |
138 |
|
#ifdef ALLOW_LONGSTEP |
139 |
|
PTRACERS_dTLev(k) = LS_nIter*dTtracerLev(k) |
140 |
|
#else |
141 |
|
PTRACERS_dTLev(k) = dTtracerLev(k) |
142 |
|
#endif |
143 |
|
ENDDO |
144 |
|
|
145 |
C Open and read the data.ptracers file |
C Open and read the data.ptracers file |
146 |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
162 |
C Now set-up any remaining parameters that result from the input |
C Now set-up any remaining parameters that result from the input |
163 |
C parameters |
C parameters |
164 |
|
|
165 |
|
C Tracer 1 climatology relaxation time scale (<- but the code is gone !) |
166 |
|
IF ( tauTr1ClimRelax .EQ. 0. ) THEN |
167 |
|
lambdaTr1ClimRelax = 0. |
168 |
|
ELSE |
169 |
|
lambdaTr1ClimRelax = 1./tauTr1ClimRelax |
170 |
|
ENDIF |
171 |
|
|
172 |
C If PTRACERS_numInUse was not set in data.ptracers then we can |
C If PTRACERS_numInUse was not set in data.ptracers then we can |
173 |
C assume that all PTRACERS fields will be in use |
C assume that all PTRACERS fields will be in use |
174 |
IF (PTRACERS_numInUse.LT.0) THEN |
IF (PTRACERS_numInUse.LT.0) THEN |
206 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
207 |
ENDIF |
ENDIF |
208 |
ENDDO |
ENDDO |
209 |
|
IF ( PTRACERS_dTLev(1).NE.PTRACERS_dTLev(Nr) |
210 |
|
& .AND. implicitDiffusion ) THEN |
211 |
|
WRITE(msgBuf,'(A)') |
212 |
|
& 'PTRACERS_READPARMS: #undef INCLUDE_IMPLVERTADV_CODE' |
213 |
|
CALL PRINT_ERROR( msgBuf , myThid) |
214 |
|
WRITE(msgBuf,'(2A)') 'PTRACERS_READPARMS: ', |
215 |
|
& 'but implicitDiffusion=T with non-uniform PTRACERS_dTLev' |
216 |
|
CALL PRINT_ERROR( msgBuf , myThid) |
217 |
|
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
218 |
|
ENDIF |
219 |
#endif |
#endif |
220 |
DO iTracer=1,PTRACERS_numInUse |
DO iTracer=1,PTRACERS_numInUse |
221 |
IF ( PTRACERS_useGMRedi(iTracer) .AND. .NOT.useGMRedi ) THEN |
IF ( PTRACERS_useGMRedi(iTracer) .AND. .NOT.useGMRedi ) THEN |
227 |
CALL PRINT_ERROR( msgBuf, myThid ) |
CALL PRINT_ERROR( msgBuf, myThid ) |
228 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
229 |
ENDIF |
ENDIF |
230 |
|
IF ( PTRACERS_useDWNSLP(iTracer) .AND. .NOT.useDOWN_SLOPE ) THEN |
231 |
|
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
232 |
|
& ' pTracers_useDWNSLP(',iTracer,' ) is TRUE' |
233 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
234 |
|
WRITE(msgBuf,'(2A,L5,A)') 'PTRACERS_READPARMS:', |
235 |
|
& ' But not useDOWN_SLOPE (=', useDOWN_SLOPE, ')' |
236 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
237 |
|
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
238 |
|
ENDIF |
239 |
IF ( PTRACERS_useKPP(iTracer) .AND. .NOT.useKPP ) THEN |
IF ( PTRACERS_useKPP(iTracer) .AND. .NOT.useKPP ) THEN |
240 |
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
241 |
& ' pTracers_useKPP(',iTracer,' ) is TRUE' |
& ' pTracers_useKPP(',iTracer,' ) is TRUE' |
296 |
CALL WRITE_0D_I( PTRACERS_Iter0, INDEX_NONE, |
CALL WRITE_0D_I( PTRACERS_Iter0, INDEX_NONE, |
297 |
& 'PTRACERS_Iter0 =', |
& 'PTRACERS_Iter0 =', |
298 |
& ' /* timestep number when tracers are initialized */') |
& ' /* timestep number when tracers are initialized */') |
299 |
CALL WRITE_0D_R8(PTRACERS_dumpFreq, INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_addSrelax2EmP, INDEX_NONE, |
300 |
|
& 'PTRACERS_addSrelax2EmP =','/* add Salt relaxation to EmP */') |
301 |
|
CALL WRITE_1D_RL( PTRACERS_dTLev, Nr, INDEX_K, |
302 |
|
& 'PTRACERS_dTLev =', |
303 |
|
&' /* Ptracer timestep ( s ) */') |
304 |
|
CALL WRITE_0D_RL(PTRACERS_dumpFreq, INDEX_NONE, |
305 |
& 'PTRACERS_dumpFreq =', |
& 'PTRACERS_dumpFreq =', |
306 |
& ' /* Frequency^-1 for snapshot output (s) */') |
& ' /* Frequency^-1 for snapshot output (s) */') |
307 |
CALL WRITE_0D_R8(PTRACERS_taveFreq, INDEX_NONE, |
CALL WRITE_0D_RL(PTRACERS_taveFreq, INDEX_NONE, |
308 |
& 'PTRACERS_taveFreq =', |
& 'PTRACERS_taveFreq =', |
309 |
& ' /* Frequency^-1 for time-Aver. output (s) */') |
& ' /* Frequency^-1 for time-Aver. output (s) */') |
310 |
CALL WRITE_0D_L( PTRACERS_useRecords, INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useRecords, INDEX_NONE, |
335 |
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
336 |
& 'PTRACERS_ImplVertAdv =', |
& 'PTRACERS_ImplVertAdv =', |
337 |
& ' /* implicit vert. advection flag */') |
& ' /* implicit vert. advection flag */') |
338 |
CALL WRITE_0D_R8( PTRACERS_diffKh(iTracer), INDEX_NONE, |
CALL WRITE_0D_RL( PTRACERS_diffKh(iTracer), INDEX_NONE, |
339 |
& 'PTRACERS_diffKh =', ' /* Laplacian Diffusivity */') |
& 'PTRACERS_diffKh =', ' /* Laplacian Diffusivity */') |
340 |
CALL WRITE_0D_R8( PTRACERS_diffK4(iTracer), INDEX_NONE, |
CALL WRITE_0D_RL( PTRACERS_diffK4(iTracer), INDEX_NONE, |
341 |
& 'PTRACERS_diffK4 =', ' /* Biharmonic Diffusivity */') |
& 'PTRACERS_diffK4 =', ' /* Biharmonic Diffusivity */') |
342 |
CALL WRITE_1D_R8( PTRACERS_diffKrNr(1,iTracer), Nr, INDEX_K, |
CALL WRITE_1D_RL( PTRACERS_diffKrNr(1,iTracer), Nr, INDEX_K, |
343 |
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
344 |
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
345 |
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
346 |
|
CALL WRITE_0D_L( PTRACERS_useDWNSLP(iTracer), INDEX_NONE, |
347 |
|
& 'PTRACERS_useDWNSLP =', ' /* apply DOWN-SLOPE Flow */') |
348 |
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
349 |
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
350 |
CALL WRITE_1D_R8( PTRACERS_ref(1,iTracer), Nr, INDEX_K, |
CALL WRITE_1D_RL( PTRACERS_ref(1,iTracer), Nr, INDEX_K, |
351 |
& 'PTRACERS_ref =', ' /* Reference vertical profile */') |
& 'PTRACERS_ref =', ' /* Reference vertical profile */') |
352 |
CALL WRITE_0D_R8( PTRACERS_EvPrRn(iTracer), INDEX_NONE, |
CALL WRITE_0D_RL( PTRACERS_EvPrRn(iTracer), INDEX_NONE, |
353 |
& 'PTRACERS_EvPrRn =', '/* tracer conc. in Evap. & Rain */') |
& 'PTRACERS_EvPrRn =', '/* tracer conc. in Evap. & Rain */') |
354 |
|
|
355 |
ENDDO |
ENDDO |