18 |
#include "SIZE.h" |
#include "SIZE.h" |
19 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
20 |
#include "PTRACERS_SIZE.h" |
#include "PTRACERS_SIZE.h" |
21 |
#include "PTRACERS.h" |
#include "PTRACERS_PARAMS.h" |
22 |
#include "PARAMS.h" |
#include "PARAMS.h" |
23 |
#ifdef ALLOW_MNC |
#ifdef ALLOW_MNC |
24 |
#include "MNC_PARAMS.h" |
#include "MNC_PARAMS.h" |
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, |
76 |
|
|
77 |
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 |
78 |
C internal flag to indicate we are in business |
C internal flag to indicate we are in business |
79 |
PTRACERSisON=.TRUE. |
c PTRACERSisON=.TRUE. |
80 |
|
C Note(jmc): remove this flag which is not really usefull (not set properly |
81 |
|
C when usePTRACERS=F and always TRUE otherwise); |
82 |
|
C much better to use "usePTRACERS" flag instead. |
83 |
|
|
84 |
|
C Set ptracer IO & diagnostics labels (2 characters long) |
85 |
|
CALL PTRACERS_SET_IOLABEL( |
86 |
|
O PTRACERS_ioLabel, |
87 |
|
I PTRACERS_num, myThid ) |
88 |
|
|
89 |
C Set defaults values for parameters in PTRACERS.h |
C Set defaults values for parameters in PTRACERS.h |
90 |
PTRACERS_dumpFreq = dumpFreq |
PTRACERS_dumpFreq = dumpFreq |
104 |
ENDDO |
ENDDO |
105 |
PTRACERS_EvPrRn(iTracer)=UNSET_RL |
PTRACERS_EvPrRn(iTracer)=UNSET_RL |
106 |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
107 |
PTRACERS_useKPP(iTracer)=useKPP |
PTRACERS_useGMRedi(iTracer)=useGMRedi |
108 |
|
PTRACERS_useDWNSLP(iTracer)=useDOWN_SLOPE |
109 |
PTRACERS_initialFile(iTracer)=' ' |
PTRACERS_initialFile(iTracer)=' ' |
110 |
DO ic = 1,MAX_LEN_FNAM |
DO ic = 1,MAX_LEN_FNAM |
111 |
PTRACERS_names(iTracer)(ic:ic) = ' ' |
PTRACERS_names(iTracer)(ic:ic) = ' ' |
127 |
PTRACERS_pickup_write_mnc = .FALSE. |
PTRACERS_pickup_write_mnc = .FALSE. |
128 |
PTRACERS_pickup_read_mnc = .FALSE. |
PTRACERS_pickup_read_mnc = .FALSE. |
129 |
#endif |
#endif |
130 |
|
tauTr1ClimRelax = 0. |
131 |
|
|
132 |
C Open and read the data.ptracers file |
C Open and read the data.ptracers file |
133 |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
WRITE(msgBuf,'(A)') ' PTRACERS_READPARMS: opening data.ptracers' |
149 |
C Now set-up any remaining parameters that result from the input |
C Now set-up any remaining parameters that result from the input |
150 |
C parameters |
C parameters |
151 |
|
|
152 |
|
C Tracer 1 climatology relaxation time scale (<- but the code is gone !) |
153 |
|
IF ( tauTr1ClimRelax .EQ. 0. ) THEN |
154 |
|
lambdaTr1ClimRelax = 0. |
155 |
|
ELSE |
156 |
|
lambdaTr1ClimRelax = 1./tauTr1ClimRelax |
157 |
|
ENDIF |
158 |
|
|
159 |
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 |
160 |
C assume that all PTRACERS fields will be in use |
C assume that all PTRACERS fields will be in use |
161 |
IF (PTRACERS_numInUse.LT.0) THEN |
IF (PTRACERS_numInUse.LT.0) THEN |
204 |
CALL PRINT_ERROR( msgBuf, myThid ) |
CALL PRINT_ERROR( msgBuf, myThid ) |
205 |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
206 |
ENDIF |
ENDIF |
207 |
|
IF ( PTRACERS_useDWNSLP(iTracer) .AND. .NOT.useDOWN_SLOPE ) THEN |
208 |
|
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
209 |
|
& ' pTracers_useDWNSLP(',iTracer,' ) is TRUE' |
210 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
211 |
|
WRITE(msgBuf,'(2A,L5,A)') 'PTRACERS_READPARMS:', |
212 |
|
& ' But not useDOWN_SLOPE (=', useDOWN_SLOPE, ')' |
213 |
|
CALL PRINT_ERROR( msgBuf, myThid ) |
214 |
|
STOP 'ABNORMAL END: S/R PTRACERS_READPARMS' |
215 |
|
ENDIF |
216 |
IF ( PTRACERS_useKPP(iTracer) .AND. .NOT.useKPP ) THEN |
IF ( PTRACERS_useKPP(iTracer) .AND. .NOT.useKPP ) THEN |
217 |
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
WRITE(msgBuf,'(2A,I3,A)') 'PTRACERS_READPARMS:', |
218 |
& ' pTracers_useKPP(',iTracer,' ) is TRUE' |
& ' pTracers_useKPP(',iTracer,' ) is TRUE' |
300 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
301 |
WRITE(msgBuf,'(A,I4)') ' tracer number : ',iTracer |
WRITE(msgBuf,'(A,I4)') ' tracer number : ',iTracer |
302 |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
CALL PRINT_MESSAGE( msgBuf, iUnit, SQUEEZE_RIGHT, myThid ) |
303 |
|
CALL WRITE_0D_C( PTRACERS_ioLabel(iTracer), 0, INDEX_NONE, |
304 |
|
& 'PTRACERS_ioLabel =', ' /* tracer IO Label */') |
305 |
CALL WRITE_0D_I( PTRACERS_advScheme(iTracer), INDEX_NONE, |
CALL WRITE_0D_I( PTRACERS_advScheme(iTracer), INDEX_NONE, |
306 |
& 'PTRACERS_advScheme =', ' /* Advection Scheme */') |
& 'PTRACERS_advScheme =', ' /* Advection Scheme */') |
307 |
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_ImplVertAdv(iTracer), INDEX_NONE, |
315 |
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
& 'PTRACERS_diffKrNr =', ' /* Vertical Diffusivity */') |
316 |
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useGMRedi(iTracer), INDEX_NONE, |
317 |
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
& 'PTRACERS_useGMRedi =', ' /* apply GM-Redi */') |
318 |
|
CALL WRITE_0D_L( PTRACERS_useDWNSLP(iTracer), INDEX_NONE, |
319 |
|
& 'PTRACERS_useDWNSLP =', ' /* apply DOWN-SLOPE Flow */') |
320 |
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
CALL WRITE_0D_L( PTRACERS_useKPP(iTracer), INDEX_NONE, |
321 |
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
& 'PTRACERS_useKPP =', ' /* apply KPP scheme */') |
322 |
CALL WRITE_1D_R8( PTRACERS_ref(1,iTracer), Nr, INDEX_K, |
CALL WRITE_1D_R8( PTRACERS_ref(1,iTracer), Nr, INDEX_K, |