39 |
INTEGER ic |
INTEGER ic |
40 |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
CHARACTER*(MAX_LEN_MBUF) msgBuf |
41 |
_RL PTRACERS_diffKr(PTRACERS_num) |
_RL PTRACERS_diffKr(PTRACERS_num) |
42 |
|
_RL tauTr1ClimRelax |
43 |
|
|
44 |
C PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS |
C PTRACERS_taveFreq :: Frequency with which time-averaged PTRACERS |
45 |
C are written to post-processing files. |
C are written to post-processing files. |
46 |
|
C tauTr1ClimRelax :: old parameter (will be removed 1 day) |
47 |
NAMELIST /PTRACERS_PARM01/ |
NAMELIST /PTRACERS_PARM01/ |
48 |
|
& tauTr1ClimRelax, |
49 |
& PTRACERS_dumpFreq, |
& PTRACERS_dumpFreq, |
50 |
& PTRACERS_taveFreq, |
& PTRACERS_taveFreq, |
51 |
& PTRACERS_monitorFreq, |
& PTRACERS_monitorFreq, |
58 |
& PTRACERS_ref, |
& PTRACERS_ref, |
59 |
& PTRACERS_EvPrRn, |
& PTRACERS_EvPrRn, |
60 |
& PTRACERS_useGMRedi, |
& PTRACERS_useGMRedi, |
61 |
|
& PTRACERS_useDWNSLP, |
62 |
& PTRACERS_useKPP, |
& PTRACERS_useKPP, |
63 |
& PTRACERS_Iter0, |
& PTRACERS_Iter0, |
64 |
& PTRACERS_numInUse, |
& PTRACERS_numInUse, |
77 |
|
|
78 |
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 |
79 |
C internal flag to indicate we are in business |
C internal flag to indicate we are in business |
80 |
PTRACERSisON=.TRUE. |
c PTRACERSisON=.TRUE. |
81 |
|
C Note(jmc): remove this flag which is not really usefull (not set properly |
82 |
|
C when usePTRACERS=F and always TRUE otherwise); |
83 |
|
C much better to use "usePTRACERS" flag instead. |
84 |
|
|
85 |
C Set ptracer IO & diagnostics labels (2 characters long) |
C Set ptracer IO & diagnostics labels (2 characters long) |
86 |
CALL PTRACERS_SET_IOLABEL( |
CALL PTRACERS_SET_IOLABEL( |
105 |
ENDDO |
ENDDO |
106 |
PTRACERS_EvPrRn(iTracer)=UNSET_RL |
PTRACERS_EvPrRn(iTracer)=UNSET_RL |
107 |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
108 |
PTRACERS_useKPP(iTracer)=useKPP |
PTRACERS_useDWNSLP(iTracer)=useDOWN_SLOPE |
109 |
|
PTRACERS_useKPP(iTracer) =useKPP |
110 |
PTRACERS_initialFile(iTracer)=' ' |
PTRACERS_initialFile(iTracer)=' ' |
111 |
DO ic = 1,MAX_LEN_FNAM |
DO ic = 1,MAX_LEN_FNAM |
112 |
PTRACERS_names(iTracer)(ic:ic) = ' ' |
PTRACERS_names(iTracer)(ic:ic) = ' ' |
128 |
PTRACERS_pickup_write_mnc = .FALSE. |
PTRACERS_pickup_write_mnc = .FALSE. |
129 |
PTRACERS_pickup_read_mnc = .FALSE. |
PTRACERS_pickup_read_mnc = .FALSE. |
130 |
#endif |
#endif |
131 |
|
tauTr1ClimRelax = 0. |
132 |
|
|
133 |
C Open and read the data.ptracers file |
C Open and read the data.ptracers file |
134 |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
150 |
C Now set-up any remaining parameters that result from the input |
C Now set-up any remaining parameters that result from the input |
151 |
C parameters |
C parameters |
152 |
|
|
153 |
|
C Tracer 1 climatology relaxation time scale (<- but the code is gone !) |
154 |
|
IF ( tauTr1ClimRelax .EQ. 0. ) THEN |
155 |
|
lambdaTr1ClimRelax = 0. |
156 |
|
ELSE |
157 |
|
lambdaTr1ClimRelax = 1./tauTr1ClimRelax |
158 |
|
ENDIF |
159 |
|
|
160 |
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 |
161 |
C assume that all PTRACERS fields will be in use |
C assume that all PTRACERS fields will be in use |
162 |
IF (PTRACERS_numInUse.LT.0) THEN |
IF (PTRACERS_numInUse.LT.0) THEN |
205 |
CALL PRINT_ERROR( msgBuf, myThid ) |
CALL PRINT_ERROR( msgBuf, myThid ) |
206 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
207 |
ENDIF |
ENDIF |
208 |
|
IF ( PTRACERS_useDWNSLP(iTracer) .AND. .NOT.useDOWN_SLOPE ) THEN |
209 |
|
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
210 |
|
& ' pTracers_useDWNSLP(',iTracer,' ) is TRUE' |
211 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
212 |
|
WRITE(msgBuf,'(2A,L5,A)') 'PTRACERS_READPARMS:', |
213 |
|
& ' But not useDOWN_SLOPE (=', useDOWN_SLOPE, ')' |
214 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
215 |
|
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
216 |
|
ENDIF |
217 |
IF ( PTRACERS_useKPP(iTracer) .AND. .NOT.useKPP ) THEN |
IF ( PTRACERS_useKPP(iTracer) .AND. .NOT.useKPP ) THEN |
218 |
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
219 |
& ' pTracers_useKPP(',iTracer,' ) is TRUE' |
& ' pTracers_useKPP(',iTracer,' ) is TRUE' |
316 |
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
317 |
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
318 |
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
319 |
|
CALL WRITE_0D_L( PTRACERS_useDWNSLP(iTracer), INDEX_NONE, |
320 |
|
& 'PTRACERS_useDWNSLP =', ' /* apply DOWN-SLOPE Flow */') |
321 |
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
322 |
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
323 |
CALL WRITE_1D_R8( PTRACERS_ref(1,iTracer), Nr, INDEX_K, |
CALL WRITE_1D_R8( PTRACERS_ref(1,iTracer), Nr, INDEX_K, |