File indexing completed on 2018-03-02 18:37:30 UTC
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
09a6f3668a Jeff*0001 #include "ctrparam.h"
0002 #include "ATM2D_OPTIONS.h"
0003
0004
0005 SUBROUTINE GET_OCNVARS( myTime, myIter, myThid )
0006
0007
0008
0009
0010
0011 IMPLICIT NONE
0012
0013
0014 #include "ATMSIZE.h"
0015 #include "SIZE.h"
0016 #include "EEPARAMS.h"
0017 #include "THSICE_VARS.h"
0018 #include "ATM2D_VARS.h"
0019
0020 #ifdef ATM2D_MPI_ON
0021 # include "OCNSIZE.h"
0022 # include "OCNVARS.h"
0b83645f94 Jeff*0023 # include "OCNIDS.h"
09a6f3668a Jeff*0024 #else
0025 # include "PARAMS.h"
0026 # include "GRID.h"
0027 # include "SURFACE.h"
0028 # include "DYNVARS.h"
0b83645f94 Jeff*0029 # ifdef ALLOW_DIC
43e8d37a02 Jeff*0030 # include "DIC_VARS.h"
0b83645f94 Jeff*0031 # endif
09a6f3668a Jeff*0032 #endif
0033
0034
0035
0036
0037
0038
0039 _RL myTime
0040 INTEGER myIter
0041 INTEGER myThid
0042
0043
0044 INTEGER i,j
0045
0046
0047 #ifdef ATM2D_MPI_ON
0048
0049 DO j=1,sNy
0050 DO i=1,sNx
9274434acc Jean*0051 sstFromOcn(i,j)= SST_ocn(i,j)
0052 sssFromOcn(i,j)= SSS_ocn(i,j)
09a6f3668a Jeff*0053 mlDepth(i,j) = OcMxlD_ocn(i,j)
0b83645f94 Jeff*0054 IF ( ocnCpl_exchange_DIC ) oFluxCO2(i,j) = fluxCO2_ocn(i,j)
9274434acc Jean*0055
0b83645f94 Jeff*0056
09a6f3668a Jeff*0057
0058
9274434acc Jean*0059 tOceMxl(i,j,1,1)= SST_ocn(i,j)
0060 sOceMxl(i,j,1,1)= SSS_ocn(i,j)
09a6f3668a Jeff*0061 hOceMxl(i,j,1,1) = OcMxlD_ocn(i,j)
0062 v2ocMxL(i,j,1,1) = vSq_ocn(i,j)
0063 ENDDO
0064 ENDDO
0065
0066 #else
0067 DO j=1,sNy
0068 DO i=1,sNx
0069 sstFromOcn(i,j) = theta(i,j,1,1,1)
0070 sssFromOcn(i,j) = salt (i,j,1,1,1)
0071 ENDDO
0072 ENDDO
0073
0074 # ifdef NONLIN_FRSURF
0075
22e821eefb Jean*0076 IF ( nonlinFreeSurf.GT.0 .AND. staggerTimeStep ) THEN
09a6f3668a Jeff*0077 IF ( select_rStar.GT.0 ) THEN
0078 DO j=1,sNy
0079 DO i=1,sNx
0080 mlDepth(i,j) =
0081 & h0FacC(i,j,1,1,1)*rStarFacC(i,j,1,1)*drF(1)
0082 ENDDO
0083 ENDDO
0084 ELSE
0085 DO j=1,sNy
0086 DO i=1,sNx
0087 mlDepth(i,j) = hFac_surfC(i,j,1,1)*drF(1)
0088 ENDDO
0089 ENDDO
0090 ENDIF
0091 ELSE
0092 # else /* NONLIN_FRSURF */
0093 IF (.TRUE.) THEN
0094 # endif /* NONLIN_FRSURF */
0095 DO j=1,sNy
0096 DO i=1,sNx
0097 mlDepth(i,j) = hFacC(i,j,1,1,1)*drF(1)
0098 ENDDO
0099 ENDDO
0100 ENDIF
0101
0b83645f94 Jeff*0102 DO j=1,sNy
09a6f3668a Jeff*0103 DO i=1,sNx
9274434acc Jean*0104 v2ocMxL(i,j,1,1) =
09a6f3668a Jeff*0105 & ( uVel(i , j,1,1,1)*uVel(i , j,1,1,1)
0106 & + uVel(i+1,j,1,1,1)*uVel(i+1,j,1,1,1)
0107 & + vVel(i,j+1,1,1,1)*vVel(i,j+1,1,1,1)
0108 & + vVel(i,j , 1,1,1)*vVel(i,j , 1,1,1)
0109 & )*0.5 _d 0
0110 ENDDO
0b83645f94 Jeff*0111 ENDDO
09a6f3668a Jeff*0112
0b83645f94 Jeff*0113 DO j=1,sNy
09a6f3668a Jeff*0114 DO i=1,sNx
0115
0b83645f94 Jeff*0116 # ifdef ALLOW_DIC
0117 oFluxCO2(i,j) = fluxCO2(i,j,1,1)
0118 # endif
09a6f3668a Jeff*0119
0120
9274434acc Jean*0121 tOceMxl(i,j,1,1)= sstFromOcn(i,j)
0122 sOceMxl(i,j,1,1)= sssFromOcn(i,j)
09a6f3668a Jeff*0123 hOceMxl(i,j,1,1) = mlDepth(i,j)
0124 ENDDO
0125 ENDDO
9274434acc Jean*0126
09a6f3668a Jeff*0127 #endif
0128
0129 RETURN
0130 END
0131