File indexing completed on 2023-02-04 06:09:48 UTC
view on githubraw file Latest commit 2e3e8c33 on 2023-02-03 17:26:01 UTC
6d54cf9ca1 Ed H*0001 #include "DIC_OPTIONS.h"
daab022f42 Step*0002
0003
0004 SUBROUTINE DIC_BIOTIC_DIAGS( myTime, myIter, myThid )
3c9c51750e Jean*0005
0006
0007
0008
0009
daab022f42 Step*0010 IMPLICIT NONE
0011
0012
0013 #include "SIZE.h"
0014 #include "EEPARAMS.h"
0015 #include "PARAMS.h"
2ef8966791 Davi*0016 #include "DIC_VARS.h"
3a1a157ebd Ed H*0017 #include "PTRACERS_SIZE.h"
e28bbbf906 Jean*0018 #include "PTRACERS_PARAMS.h"
daab022f42 Step*0019
0020
0021
0022
0023
0024 _RL myTime
0025 INTEGER myIter
0026 INTEGER myThid
0027
0028
6bf15b6a7c Jean*0029 #ifdef DIC_BIOTIC
0030 #ifdef ALLOW_TIMEAVE
daab022f42 Step*0031
0032
94a46dfe0d Jean*0033 LOGICAL DIFFERENT_MULTIPLE
0034 EXTERNAL DIFFERENT_MULTIPLE
6bf15b6a7c Jean*0035 INTEGER bi, bj
df5a9764ba Jean*0036 CHARACTER*(10) suff
6bf15b6a7c Jean*0037 #ifdef ALLOW_MNC
b22b541fe9 Ed H*0038 CHARACTER*(1) pf
6bf15b6a7c Jean*0039 #endif
daab022f42 Step*0040
0041
0955b89c88 Davi*0042 IF (DIFFERENT_MULTIPLE(PTRACERS_taveFreq,myTime,deltaTClock)) THEN
e28bbbf906 Jean*0043
daab022f42 Step*0044
0045 DO bj = myByLo(myThid), myByHi(myThid)
0046 DO bi = myBxLo(myThid), myBxHi(myThid)
6bf15b6a7c Jean*0047 CALL TIMEAVE_NORMALIZE(BIOave, DIC_timeAve, Nr ,
daab022f42 Step*0048 & bi,bj,myThid)
6bf15b6a7c Jean*0049 CALL TIMEAVE_NORMALIZE(CARave, DIC_timeAve, Nr ,
daab022f42 Step*0050 & bi,bj,myThid)
6bf15b6a7c Jean*0051 CALL TIMEAVE_NORMALIZE(SURave,DIC_timeAve, 1 ,
daab022f42 Step*0052 & bi,bj,myThid)
6bf15b6a7c Jean*0053 CALL TIMEAVE_NORMALIZE(SUROave,DIC_timeAve, 1 ,
daab022f42 Step*0054 & bi,bj,myThid)
6bf15b6a7c Jean*0055 CALL TIMEAVE_NORMALIZE(pCO2ave,DIC_timeAve, 1 ,
daab022f42 Step*0056 & bi,bj,myThid)
6bf15b6a7c Jean*0057 CALL TIMEAVE_NORMALIZE(pHave,DIC_timeAve, 1 ,
daab022f42 Step*0058 & bi,bj,myThid)
6bf15b6a7c Jean*0059 CALL TIMEAVE_NORMALIZE(fluxCO2ave,DIC_timeAve, 1 ,
6891e8b81c Step*0060 & bi,bj,myThid)
6bf15b6a7c Jean*0061 CALL TIMEAVE_NORMALIZE(pfluxave,DIC_timeAve, Nr ,
4e9f2133df Step*0062 & bi,bj,myThid)
6bf15b6a7c Jean*0063 CALL TIMEAVE_NORMALIZE(epfluxave,DIC_timeAve, Nr ,
65132eb687 Step*0064 & bi,bj,myThid)
6bf15b6a7c Jean*0065 CALL TIMEAVE_NORMALIZE(cfluxave,DIC_timeAve, Nr ,
4e9f2133df Step*0066 & bi,bj,myThid)
daab022f42 Step*0067 ENDDO
0068 ENDDO
e28bbbf906 Jean*0069
3a1a157ebd Ed H*0070 IF ( PTRACERS_timeave_mdsio ) THEN
df5a9764ba Jean*0071 IF ( rwSuffixType.EQ.0 ) THEN
0072 WRITE(suff,'(I10.10)') myIter
0073 ELSE
0074 CALL RW_GET_SUFFIX( suff, myTime, myIter, myThid )
0075 ENDIF
e28bbbf906 Jean*0076 CALL WRITE_FLD_XYZ_RL('DIC_Biotave.',suff,BIOave,
3a1a157ebd Ed H*0077 & myIter,myThid)
0078 CALL WRITE_FLD_XYZ_RL('DIC_Cartave.',suff,CARave,
0079 & myIter,myThid)
0080 CALL WRITE_FLD_XY_RL('DIC_Surtave.',suff,SURave,
0081 & myIter,myThid)
0082 CALL WRITE_FLD_XY_RL('DIC_SurOtave.',suff,SUROave,
0083 & myIter,myThid)
0084 CALL WRITE_FLD_XY_RL('DIC_pHtave.',suff,pHave,
0085 & myIter,myThid)
0086 CALL WRITE_FLD_XY_RL('DIC_pCO2tave.',suff,pCO2ave,
0087 & myIter,myThid)
0088 CALL WRITE_FLD_XY_RL('DIC_fluxCO2ave.',suff,fluxCO2ave,
0089 & myIter,myThid)
566991271e Step*0090 CALL WRITE_FLD_XYZ_RL('DIC_pfluxtave.',suff,pfluxave,
4e9f2133df Step*0091 & myIter,myThid)
65132eb687 Step*0092 CALL WRITE_FLD_XYZ_RL('DIC_epfluxtave.',suff,epfluxave,
0093 & myIter,myThid)
566991271e Step*0094 CALL WRITE_FLD_XYZ_RL('DIC_cfluxtave.',suff,cfluxave,
4e9f2133df Step*0095 & myIter,myThid)
3a1a157ebd Ed H*0096 ENDIF
daab022f42 Step*0097
3a1a157ebd Ed H*0098 #ifdef ALLOW_MNC
0099 IF ( PTRACERS_timeave_mnc ) THEN
6bf15b6a7c Jean*0100 IF ( writeBinaryPrec .EQ. precFloat64 ) THEN
0101 pf(1:1) = 'D'
0102 ELSE
0103 pf(1:1) = 'R'
0104 ENDIF
3a1a157ebd Ed H*0105 CALL MNC_CW_SET_UDIM('dic_tave', -1, myThid)
0106 CALL MNC_CW_RL_W_S('D','dic_tave',0,0,'T',myTime,myThid)
0107 CALL MNC_CW_SET_UDIM('dic_tave', 0, myThid)
0108 CALL MNC_CW_I_W_S('I','dic_tave',0,0,'iter',myIter,myThid)
0109 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0110 & pf,'dic_tave',0,0,'dic_BIO_ave',BIOave,myThid)
3a1a157ebd Ed H*0111 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0112 & pf,'dic_tave',0,0,'dic_CAR_ave',CARave,myThid)
3a1a157ebd Ed H*0113 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0114 & pf,'dic_tave',0,0,'dic_SUR_ave',SURave,myThid)
3a1a157ebd Ed H*0115 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0116 & pf,'dic_tave',0,0,'dic_SURO_ave',SUROave,myThid)
3a1a157ebd Ed H*0117 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0118 & pf,'dic_tave',0,0,'dic_pH_ave',pHave,myThid)
3a1a157ebd Ed H*0119 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0120 & pf,'dic_tave',0,0,'dic_pCO2_ave',pCO2ave,myThid)
3a1a157ebd Ed H*0121 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0122 & pf,'dic_tave',0,0,'dic_fluxCO2_ave',fluxCO2ave,myThid)
4e9f2133df Step*0123 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0124 & pf,'dic_tave',0,0,'dic_pflux_ave',pfluxave,myThid)
4e9f2133df Step*0125 CALL MNC_CW_RL_W(
65132eb687 Step*0126 & pf,'dic_tave',0,0,'dic_epflux_ave',epfluxave,myThid)
0127 CALL MNC_CW_RL_W(
b22b541fe9 Ed H*0128 & pf,'dic_tave',0,0,'dic_cflux_ave',cfluxave,myThid)
3a1a157ebd Ed H*0129 ENDIF
0130 #endif
6891e8b81c Step*0131
daab022f42 Step*0132
0133 DO bj = myByLo(myThid), myByHi(myThid)
0134 DO bi = myBxLo(myThid), myBxHi(myThid)
0135 CALL TIMEAVE_RESET(BIOave,Nr,bi,bj,myThid)
0136 CALL TIMEAVE_RESET(CARave,Nr,bi,bj,myThid)
0137 CALL TIMEAVE_RESET(SURave,1,bi,bj,myThid)
0138 CALL TIMEAVE_RESET(SUROave,1,bi,bj,myThid)
0139 CALL TIMEAVE_RESET(pCO2ave,1,bi,bj,myThid)
0140 CALL TIMEAVE_RESET(pHave,1,bi,bj,myThid)
6891e8b81c Step*0141 CALL TIMEAVE_RESET(fluxCO2ave,1,bi,bj,myThid)
566991271e Step*0142 CALL TIMEAVE_RESET(pfluxave,Nr,bi,bj,myThid)
65132eb687 Step*0143 CALL TIMEAVE_RESET(epfluxave,Nr,bi,bj,myThid)
566991271e Step*0144 CALL TIMEAVE_RESET(cfluxave,Nr,bi,bj,myThid)
6bf15b6a7c Jean*0145 DIC_timeAve(bi,bj) = 0. _d 0
daab022f42 Step*0146 ENDDO
0147 ENDDO
e28bbbf906 Jean*0148
daab022f42 Step*0149 ENDIF
0150
0151 #endif /* ALLOW_TIMEAVE */
0152 #endif /* DIC_BIOTIC */
e28bbbf906 Jean*0153
daab022f42 Step*0154 RETURN
0155 END