1 |
edhill |
1.4 |
C $Header: $ |
2 |
stephd |
1.1 |
C $Name: $ |
3 |
|
|
|
4 |
edhill |
1.4 |
#include "DIC_OPTIONS.h" |
5 |
stephd |
1.1 |
#include "GCHEM_OPTIONS.h" |
6 |
|
|
|
7 |
|
|
CStartOfInterface |
8 |
|
|
SUBROUTINE DIC_BIOTIC_DIAGS( myTime, myIter, myThid ) |
9 |
|
|
C /==========================================================\ |
10 |
|
|
C | SUBROUTINE DIC_BIOTIC_DIAGS | |
11 |
|
|
C | o Do DIC diagnostic output | |
12 |
|
|
C |==========================================================| |
13 |
|
|
C \==========================================================/ |
14 |
|
|
IMPLICIT NONE |
15 |
|
|
|
16 |
|
|
C === Global variables === |
17 |
|
|
#include "SIZE.h" |
18 |
|
|
#include "EEPARAMS.h" |
19 |
|
|
#include "PARAMS.h" |
20 |
|
|
#include "DIC_BIOTIC.h" |
21 |
|
|
|
22 |
|
|
C == Routine arguments == |
23 |
|
|
C myTime - Current time of simulation ( s ) |
24 |
|
|
C myIter - Iteration number |
25 |
|
|
C myThid - Number of this instance of INI_FORCING |
26 |
|
|
_RL myTime |
27 |
|
|
INTEGER myIter |
28 |
|
|
INTEGER myThid |
29 |
|
|
CEndOfInterface |
30 |
|
|
|
31 |
|
|
|
32 |
|
|
C == Local variables == |
33 |
|
|
LOGICAL DIFFERENT_MULTIPLE |
34 |
|
|
EXTERNAL DIFFERENT_MULTIPLE |
35 |
|
|
INTEGER bi, bj, k |
36 |
|
|
CHARACTER*(MAX_LEN_MBUF) suff |
37 |
|
|
|
38 |
|
|
#ifdef DIC_BIOTIC |
39 |
|
|
|
40 |
|
|
|
41 |
|
|
#ifdef ALLOW_TIMEAVE |
42 |
|
|
|
43 |
|
|
C Dump files and restart average computation if needed |
44 |
|
|
IF ( DIFFERENT_MULTIPLE(taveFreq,myTime,myTime-deltaTClock) |
45 |
|
|
& ) THEN |
46 |
|
|
|
47 |
|
|
C Normalize by integrated time |
48 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
49 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
50 |
|
|
CALL TIMEAVE_NORMALIZ(BIOave, DIC_timeave, nR , |
51 |
|
|
& bi,bj,myThid) |
52 |
|
|
CALL TIMEAVE_NORMALIZ(CARave, DIC_timeave, nR , |
53 |
|
|
& bi,bj,myThid) |
54 |
|
|
CALL TIMEAVE_NORMALIZ(SURave,dic_timeave, 1 , |
55 |
|
|
& bi,bj,myThid) |
56 |
|
|
CALL TIMEAVE_NORMALIZ(SUROave,dic_timeave, 1 , |
57 |
|
|
& bi,bj,myThid) |
58 |
|
|
CALL TIMEAVE_NORMALIZ(pCO2ave,dic_timeave, 1 , |
59 |
|
|
& bi,bj,myThid) |
60 |
|
|
CALL TIMEAVE_NORMALIZ(pHave,dic_timeave, 1 , |
61 |
|
|
& bi,bj,myThid) |
62 |
stephd |
1.2 |
CALL TIMEAVE_NORMALIZ(fluxCO2ave,dic_timeave, 1 , |
63 |
|
|
& bi,bj,myThid) |
64 |
stephd |
1.1 |
ENDDO |
65 |
|
|
ENDDO |
66 |
|
|
|
67 |
|
|
WRITE(suff,'(I10.10)') myIter |
68 |
|
|
|
69 |
|
|
CALL WRITE_FLD_XYZ_RL('DIC_Biotave.',suff,BIOave, |
70 |
|
|
& myIter,myThid) |
71 |
|
|
CALL WRITE_FLD_XYZ_RL('DIC_Cartave.',suff,CARave, |
72 |
|
|
& myIter,myThid) |
73 |
|
|
CALL WRITE_FLD_XY_RL('DIC_Surtave.',suff,SURave, |
74 |
|
|
& myIter,myThid) |
75 |
|
|
CALL WRITE_FLD_XY_RL('DIC_SurOtave.',suff,SUROave, |
76 |
|
|
& myIter,myThid) |
77 |
stephd |
1.2 |
CALL WRITE_FLD_XY_RL('DIC_pHtave.',suff,pHave, |
78 |
|
|
& myIter,myThid) |
79 |
stephd |
1.1 |
CALL WRITE_FLD_XY_RL('DIC_pCO2tave.',suff,pCO2ave, |
80 |
|
|
& myIter,myThid) |
81 |
stephd |
1.2 |
CALL WRITE_FLD_XY_RL('DIC_fluxCO2ave.',suff,fluxCO2ave, |
82 |
stephd |
1.1 |
& myIter,myThid) |
83 |
stephd |
1.2 |
|
84 |
stephd |
1.1 |
|
85 |
|
|
C Reset averages to zero |
86 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
87 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
88 |
|
|
CALL TIMEAVE_RESET(BIOave,Nr,bi,bj,myThid) |
89 |
|
|
CALL TIMEAVE_RESET(CARave,Nr,bi,bj,myThid) |
90 |
|
|
CALL TIMEAVE_RESET(SURave,1,bi,bj,myThid) |
91 |
|
|
CALL TIMEAVE_RESET(SUROave,1,bi,bj,myThid) |
92 |
|
|
CALL TIMEAVE_RESET(pCO2ave,1,bi,bj,myThid) |
93 |
|
|
CALL TIMEAVE_RESET(pHave,1,bi,bj,myThid) |
94 |
stephd |
1.2 |
CALL TIMEAVE_RESET(fluxCO2ave,1,bi,bj,myThid) |
95 |
stephd |
1.1 |
do k=1,Nr |
96 |
|
|
DIC_TimeAve(bi,bj,k)=0.d0 |
97 |
|
|
enddo |
98 |
|
|
ENDDO |
99 |
|
|
ENDDO |
100 |
|
|
|
101 |
|
|
ENDIF |
102 |
|
|
|
103 |
|
|
#endif /* ALLOW_TIMEAVE */ |
104 |
|
|
|
105 |
|
|
#endif /* DIC_BIOTIC */ |
106 |
|
|
|
107 |
|
|
RETURN |
108 |
|
|
END |