File indexing completed on 2018-03-02 18:42:47 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
071fa694ec Jean*0001 #include "OCN_CPL_OPTIONS.h"
69e21e3ef0 Jean*0002
963aacc62a Jean*0003
0004
0005
46cf0794c0 Jean*0006 SUBROUTINE CPL_OUTPUT( myTime, myIter, myThid )
963aacc62a Jean*0007
0008
46cf0794c0 Jean*0009
963aacc62a Jean*0010
46cf0794c0 Jean*0011
0012
0013
963aacc62a Jean*0014
0015
0016
69e21e3ef0 Jean*0017 IMPLICIT NONE
0018
0019
0020 #include "SIZE.h"
0021 #include "EEPARAMS.h"
0022 #include "PARAMS.h"
0023 #include "CPL_PARAMS.h"
0024 #include "OCNCPL.h"
963aacc62a Jean*0025 #include "CPL_TAVE.h"
69e21e3ef0 Jean*0026
963aacc62a Jean*0027
69e21e3ef0 Jean*0028
963aacc62a Jean*0029
46cf0794c0 Jean*0030
0031
69e21e3ef0 Jean*0032 _RL myTime
0033 INTEGER myIter
0034 INTEGER myThid
963aacc62a Jean*0035
69e21e3ef0 Jean*0036
0037 #ifdef COMPONENT_MODULE
46cf0794c0 Jean*0038 #ifdef ALLOW_TIMEAVE
69e21e3ef0 Jean*0039
963aacc62a Jean*0040
0041 LOGICAL DIFFERENT_MULTIPLE
0042 EXTERNAL DIFFERENT_MULTIPLE
0043
0044
69e21e3ef0 Jean*0045
46cf0794c0 Jean*0046
0047
69e21e3ef0 Jean*0048 INTEGER bi,bj
df5a9764ba Jean*0049 CHARACTER*(10) suff
46cf0794c0 Jean*0050 CHARACTER*(MAX_LEN_FNAM) fn
0051 #ifdef ALLOW_MNC
b22b541fe9 Ed H*0052 CHARACTER*(1) pf
46cf0794c0 Jean*0053 #endif /* ALLOW_MNC */
b22b541fe9 Ed H*0054
69e21e3ef0 Jean*0055
0056 IF ( myIter.NE.nIter0 .AND.
94a46dfe0d Jean*0057 & DIFFERENT_MULTIPLE(cpl_taveFreq,myTime,deltaTClock)
963aacc62a Jean*0058 & ) THEN
6c5a9380b0 Ed H*0059
0060
0061 DO bj = myByLo(myThid), myByHi(myThid)
c35128938e Jean*0062 DO bi = myBxLo(myThid), myBxHi(myThid)
963aacc62a Jean*0063 CALL TIMEAVE_NORMALIZE(SLPtave,CPL_timeAve,1,bi,bj,myThid)
0064 CALL TIMEAVE_NORMALIZE(HFtave ,CPL_timeAve,1,bi,bj,myThid)
0065 CALL TIMEAVE_NORMALIZE(QSWtave,CPL_timeAve,1,bi,bj,myThid)
0066 CALL TIMEAVE_NORMALIZE(TXtave ,CPL_timeAve,1,bi,bj,myThid)
0067 CALL TIMEAVE_NORMALIZE(TYtave ,CPL_timeAve,1,bi,bj,myThid)
0068 CALL TIMEAVE_NORMALIZE(FWtave ,CPL_timeAve,1,bi,bj,myThid)
0069 CALL TIMEAVE_NORMALIZE(SFxtave,CPL_timeAve,1,bi,bj,myThid)
0070 CALL TIMEAVE_NORMALIZE(SICtave,CPL_timeAve,1,bi,bj,myThid)
0071 CALL TIMEAVE_NORMALIZE(MXLtave,CPL_timeAve,1,bi,bj,myThid)
0072 CALL TIMEAVE_NORMALIZE(SSTtave,CPL_timeAve,1,bi,bj,myThid)
0073 CALL TIMEAVE_NORMALIZE(SSStave,CPL_timeAve,1,bi,bj,myThid)
0074 CALL TIMEAVE_NORMALIZE(vSqtave,CPL_timeAve,1,bi,bj,myThid)
644a2c3fdf Jean*0075 #ifdef ALLOW_DIC
071fa694ec Jean*0076 IF ( ocn_cplExch_DIC ) THEN
963aacc62a Jean*0077 CALL TIMEAVE_NORMALIZE(aCO2tave, CPL_timeAve,1,bi,bj,myThid)
0078 CALL TIMEAVE_NORMALIZE(sWSpdtave,CPL_timeAve,1,bi,bj,myThid)
0079 CALL TIMEAVE_NORMALIZE(iceftave, CPL_timeAve,1,bi,bj,myThid)
0080 CALL TIMEAVE_NORMALIZE(fCO2tave, CPL_timeAve,1,bi,bj,myThid)
0081 ENDIF
644a2c3fdf Jean*0082 #endif /* ALLOW_DIC */
c35128938e Jean*0083 ENDDO
69e21e3ef0 Jean*0084 ENDDO
c35128938e Jean*0085
46cf0794c0 Jean*0086 IF ( cpl_timeave_mdsio ) THEN
df5a9764ba Jean*0087 IF ( rwSuffixType.EQ.0 ) THEN
0088 WRITE(fn,'(A,I10.10)') 'cplFldtave.', myIter
0089 ELSE
0090 CALL RW_GET_SUFFIX( suff, myTime, myIter, myThid )
0091 WRITE(fn,'(A,A)') 'cplFldtave.', suff
0092 ENDIF
46cf0794c0 Jean*0093 CALL WRITE_REC_XY_RL( fn, SLPtave , 1, myIter, myThid )
0094 CALL WRITE_REC_XY_RL( fn, HFtave , 2, myIter, myThid )
0095 CALL WRITE_REC_XY_RL( fn, QSWtave , 3, myIter, myThid )
0096 CALL WRITE_REC_XY_RL( fn, TXtave , 4, myIter, myThid )
0097 CALL WRITE_REC_XY_RL( fn, TYtave , 5, myIter, myThid )
0098 CALL WRITE_REC_XY_RL( fn, FWtave , 6, myIter, myThid )
0099 CALL WRITE_REC_XY_RL( fn, SFxtave , 7, myIter, myThid )
0100 CALL WRITE_REC_XY_RL( fn, SICtave , 8, myIter, myThid )
0101 CALL WRITE_REC_XY_RL( fn, MXLtave , 9, myIter, myThid )
0102 CALL WRITE_REC_XY_RL( fn, SSTtave , 10, myIter, myThid )
0103 CALL WRITE_REC_XY_RL( fn, SSStave , 11, myIter, myThid )
0104 CALL WRITE_REC_XY_RL( fn, vSqtave , 12, myIter, myThid )
644a2c3fdf Jean*0105 #ifdef ALLOW_DIC
071fa694ec Jean*0106 IF ( ocn_cplExch_DIC ) THEN
46cf0794c0 Jean*0107 CALL WRITE_REC_XY_RL( fn, aCO2tave , 13, myIter, myThid )
0108 CALL WRITE_REC_XY_RL( fn, sWSpdtave, 14, myIter, myThid )
0109 CALL WRITE_REC_XY_RL( fn, iceftave , 15, myIter, myThid )
0110 CALL WRITE_REC_XY_RL( fn, fCO2tave , 16, myIter, myThid )
e7c6a47db7 Jeff*0111 ENDIF
644a2c3fdf Jean*0112 #endif /* ALLOW_DIC */
6c5a9380b0 Ed H*0113 ENDIF
0114
0115 #ifdef ALLOW_MNC
46cf0794c0 Jean*0116 IF ( useMNC.AND.cpl_timeave_mnc ) THEN
963aacc62a Jean*0117 IF ( writeBinaryPrec .EQ. precFloat64 ) THEN
0118 pf(1:1) = 'D'
0119 ELSE
0120 pf(1:1) = 'R'
0121 ENDIF
6c5a9380b0 Ed H*0122 CALL MNC_CW_SET_UDIM('cpl_tave', -1, myThid)
987ff12cb6 Ed H*0123 CALL MNC_CW_RL_W_S('D','cpl_tave',0,0,'T',myTime,myThid)
6c5a9380b0 Ed H*0124 CALL MNC_CW_SET_UDIM('cpl_tave', 0, myThid)
987ff12cb6 Ed H*0125 CALL MNC_CW_I_W_S('I','cpl_tave',0,0,'iter',myIter,myThid)
b22b541fe9 Ed H*0126 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0127 & 'SLPtave',SLPtave,myThid)
b22b541fe9 Ed H*0128 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0129 & 'HFtave',HFtave,myThid)
b22b541fe9 Ed H*0130 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0131 & 'QSWtave',QSWtave,myThid)
b22b541fe9 Ed H*0132 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0133 & 'TXtave',TXtave,myThid)
b22b541fe9 Ed H*0134 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0135 & 'TYtave',TYtave,myThid)
b22b541fe9 Ed H*0136 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0137 & 'FWtave',FWtave,myThid)
b22b541fe9 Ed H*0138 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0139 & 'SFxtave',SFxtave,myThid)
b22b541fe9 Ed H*0140 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0141 & 'SICtave',SICtave,myThid)
b22b541fe9 Ed H*0142 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0143 & 'MXLtave',MXLtave,myThid)
b22b541fe9 Ed H*0144 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0145 & 'SSTtave',SSTtave,myThid)
b22b541fe9 Ed H*0146 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0147 & 'SSStave',SSStave,myThid)
b22b541fe9 Ed H*0148 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
6c5a9380b0 Ed H*0149 & 'vSqtave',vSqtave,myThid)
644a2c3fdf Jean*0150 #ifdef ALLOW_DIC
071fa694ec Jean*0151 IF ( ocn_cplExch_DIC ) THEN
e7c6a47db7 Jeff*0152 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
0153 & 'aCO2tave',aCO2tave,myThid)
0154 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
0155 & 'sWSpdtave',sWSpdtave,myThid)
0156 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
0157 & 'iceftave',iceftave,myThid)
0158 CALL MNC_CW_RL_W(pf,'cpl_tave',0,0,
0159 & 'fCO2tave',fCO2tave,myThid)
0160 ENDIF
644a2c3fdf Jean*0161 #endif /* ALLOW_DIC */
46cf0794c0 Jean*0162 ENDIF
6c5a9380b0 Ed H*0163 #endif /* ALLOW_MNC */
0164
0165
0166 DO bj = myByLo(myThid), myByHi(myThid)
0167 DO bi = myBxLo(myThid), myBxHi(myThid)
963aacc62a Jean*0168 CALL TIMEAVE_RESET( SLPtave, 1, bi, bj, myThid )
0169 CALL TIMEAVE_RESET( HFtave , 1, bi, bj, myThid )
0170 CALL TIMEAVE_RESET( QSWtave, 1, bi, bj, myThid )
0171 CALL TIMEAVE_RESET( TXtave , 1, bi, bj, myThid )
0172 CALL TIMEAVE_RESET( TYtave , 1, bi, bj, myThid )
0173 CALL TIMEAVE_RESET( FWtave , 1, bi, bj, myThid )
0174 CALL TIMEAVE_RESET( SFxtave, 1, bi, bj, myThid )
0175 CALL TIMEAVE_RESET( SICtave, 1, bi, bj, myThid )
0176 CALL TIMEAVE_RESET( MXLtave, 1, bi, bj, myThid )
0177 CALL TIMEAVE_RESET( SSTtave, 1, bi, bj, myThid )
0178 CALL TIMEAVE_RESET( SSStave, 1, bi, bj, myThid )
0179 CALL TIMEAVE_RESET( vSqtave, 1, bi, bj, myThid )
644a2c3fdf Jean*0180 #ifdef ALLOW_DIC
071fa694ec Jean*0181 IF ( ocn_cplExch_DIC ) THEN
963aacc62a Jean*0182 CALL TIMEAVE_RESET( aCO2tave , 1, bi, bj, myThid )
0183 CALL TIMEAVE_RESET( sWSpdtave, 1, bi, bj, myThid )
0184 CALL TIMEAVE_RESET( iceftave , 1, bi, bj, myThid )
0185 CALL TIMEAVE_RESET( fCO2tave , 1, bi, bj, myThid )
e7c6a47db7 Jeff*0186 ENDIF
644a2c3fdf Jean*0187 #endif /* ALLOW_DIC */
963aacc62a Jean*0188 CPL_timeAve(bi,bj) = 0.
6c5a9380b0 Ed H*0189 ENDDO
69e21e3ef0 Jean*0190 ENDDO
0191
0192 ENDIF
0193
0194 #endif /* ALLOW_TIMEAVE */
0195 #endif /* COMPONENT_MODULE */
0196
0197 RETURN
0198 END