File indexing completed on 2018-03-02 18:36:30 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
145451e90a Davi*0001 #include "CPP_OPTIONS.h"
0002
0003
0004
0005
0006 SUBROUTINE CALC_WSURF_TR(thetaFld, saltFld, wVelFld,
0007 I myTime, myIter, myThid )
0008
0009
0010
0011
0012
0013
0014
35af123d4d Jean*0015
145451e90a Davi*0016
0017
0018
0019
0020
0021 IMPLICIT NONE
0022
0023 #include "SIZE.h"
0024 #include "EEPARAMS.h"
0025 #include "PARAMS.h"
0026 #include "GRID.h"
0027 #include "SURFACE.h"
0028
0029
0030
0031
0032
0033
0034
0035
0036
0037 _RL myTime
0038 INTEGER myIter
0039 INTEGER myThid
0040 _RL thetaFld(1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
0041 _RL saltFld (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
0042 _RL wVelFld (1-Olx:sNx+Olx,1-Oly:sNy+Oly,Nr,nSx,nSy)
0043
0044
0045
0046
0047 INTEGER i,j,bi,bj,ks
0048 _RL wT_Mean, wS_Mean
35af123d4d Jean*0049 _RL wT_Tile(nSx,nSy)
0050 _RL wS_Tile(nSx,nSy)
145451e90a Davi*0051
0052
0053
0054
35af123d4d Jean*0055 TsurfCor= 0.
0056 SsurfCor= 0.
145451e90a Davi*0057
0058 wT_Mean = 0.
0059 wS_Mean = 0.
0060
0061 DO bj=myByLo(myThid), myByHi(myThid)
0062 DO bi=myBxLo(myThid), myBxHi(myThid)
35af123d4d Jean*0063 wT_Tile(bi,bj) = 0.
0064 wS_Tile(bi,bj) = 0.
145451e90a Davi*0065 DO j=1,sNy
0066 DO i=1,sNx
0067 ks = ksurfC(i,j,bi,bj)
0068 IF (ks.LE.Nr) THEN
35af123d4d Jean*0069 wT_Tile(bi,bj) = wT_Tile(bi,bj)
145451e90a Davi*0070 & + rA(i,j,bi,bj)*wVelFld(i,j,ks,bi,bj)
0071 & *thetaFld(i,j,ks,bi,bj)
35af123d4d Jean*0072 wS_Tile(bi,bj) = wS_Tile(bi,bj)
145451e90a Davi*0073 & + rA(i,j,bi,bj)*wVelFld(i,j,ks,bi,bj)
0074 & *saltFld(i,j,ks,bi,bj)
0075 ENDIF
0076 ENDDO
0077 ENDDO
35af123d4d Jean*0078
0079
0080
0081
145451e90a Davi*0082
0083 ENDDO
0084 ENDDO
0085
0086
35af123d4d Jean*0087
0088
0089
0090
0091 CALL GLOBAL_SUM_TILE_RL( wT_Tile, wT_Mean, myThid )
0092 CALL GLOBAL_SUM_TILE_RL( wS_Tile, wS_Mean, myThid )
0093
0094
0095 IF ( globalArea.GT.0. ) THEN
145451e90a Davi*0096 _BEGIN_MASTER( myThid )
0097 TsurfCor = wT_Mean / globalArea
0098 SsurfCor = wS_Mean / globalArea
0099 _END_MASTER( myThid )
0100 ENDIF
0101 _BARRIER
0102
0103
0104
0105 RETURN
0106 END