| 1 |
jscott |
1.1 |
#include "ctrparam.h" |
| 2 |
|
|
#include "ATM2D_OPTIONS.h" |
| 3 |
|
|
|
| 4 |
|
|
C !INTERFACE: |
| 5 |
|
|
SUBROUTINE GET_OCNVARS( myTime, myIter, myThid ) |
| 6 |
|
|
C *==========================================================* |
| 7 |
jscott |
1.3 |
C | Gets the ocean data from either the ocean common block, | |
| 8 |
|
|
C | or, in MPI mode, from the passed common block. This data | |
| 9 |
|
|
C | is used by the atmosphere and sea ice models. | |
| 10 |
jscott |
1.1 |
C *==========================================================* |
| 11 |
|
|
IMPLICIT NONE |
| 12 |
|
|
|
| 13 |
|
|
C === Global Atmosphere Variables === |
| 14 |
|
|
#include "ATMSIZE.h" |
| 15 |
|
|
#include "SIZE.h" |
| 16 |
|
|
#include "EEPARAMS.h" |
| 17 |
|
|
#include "THSICE_VARS.h" |
| 18 |
|
|
#include "ATM2D_VARS.h" |
| 19 |
|
|
|
| 20 |
jscott |
1.2 |
#ifdef ATM2D_MPI_ON |
| 21 |
jscott |
1.1 |
# include "OCNSIZE.h" |
| 22 |
|
|
# include "OCNVARS.h" |
| 23 |
|
|
#else |
| 24 |
|
|
# include "PARAMS.h" |
| 25 |
|
|
# include "GRID.h" |
| 26 |
|
|
# include "SURFACE.h" |
| 27 |
|
|
# include "DYNVARS.h" |
| 28 |
|
|
#endif |
| 29 |
|
|
|
| 30 |
|
|
C !INPUT/OUTPUT PARAMETERS: |
| 31 |
|
|
C === Routine arguments === |
| 32 |
|
|
C myTime - current simulation time (ocean model time) |
| 33 |
|
|
C myIter - iteration number (ocean model) |
| 34 |
|
|
C myThid - Thread no. that called this routine. |
| 35 |
|
|
_RL myTime |
| 36 |
|
|
INTEGER myIter |
| 37 |
|
|
INTEGER myThid |
| 38 |
|
|
|
| 39 |
|
|
C LOCAL VARIABLES: |
| 40 |
|
|
INTEGER i,j |
| 41 |
|
|
|
| 42 |
|
|
|
| 43 |
|
|
#ifdef ATM2D_MPI_ON |
| 44 |
|
|
C presuming ocnsize.h same as size.h |
| 45 |
|
|
DO j=1,sNy |
| 46 |
|
|
DO i=1,sNx |
| 47 |
|
|
sstFromOcn(i,j)= SST_ocn(i,j) |
| 48 |
|
|
sssFromOcn(i,j)= SSS_ocn(i,j) |
| 49 |
jscott |
1.2 |
mlDepth(i,j) = OcMxlD_ocn(i,j) |
| 50 |
jscott |
1.1 |
C fluxCO2(i,j) = new variable passed |
| 51 |
|
|
|
| 52 |
|
|
C Put in seaice common block |
| 53 |
jscott |
1.2 |
tOceMxl(i,j,1,1)= SST_ocn(i,j) |
| 54 |
|
|
sOceMxl(i,j,1,1)= SSS_ocn(i,j) |
| 55 |
|
|
hOceMxl(i,j,1,1) = OcMxlD_ocn(i,j) |
| 56 |
jscott |
1.1 |
v2ocMxL(i,j,1,1) = vSq_ocn(i,j) |
| 57 |
|
|
ENDDO |
| 58 |
|
|
ENDDO |
| 59 |
|
|
|
| 60 |
|
|
#else |
| 61 |
|
|
DO j=1,sNy |
| 62 |
|
|
DO i=1,sNx |
| 63 |
|
|
sstFromOcn(i,j) = theta(i,j,1,1,1) |
| 64 |
|
|
sssFromOcn(i,j) = salt (i,j,1,1,1) |
| 65 |
|
|
ENDDO |
| 66 |
|
|
ENDDO |
| 67 |
jscott |
1.3 |
|
| 68 |
jscott |
1.1 |
# ifdef NONLIN_FRSURF |
| 69 |
jscott |
1.3 |
Cjrs ask J-M about next lines |
| 70 |
jscott |
1.1 |
IF ( nonlinFreeSurf.GT.0 .AND. |
| 71 |
|
|
& (staggerTimeStep .OR. .NOT.cpl_earlyExpImpCall ) ) THEN |
| 72 |
|
|
IF ( select_rStar.GT.0 ) THEN |
| 73 |
|
|
DO j=1,sNy |
| 74 |
|
|
DO i=1,sNx |
| 75 |
|
|
mlDepth(i,j) = |
| 76 |
|
|
& h0FacC(i,j,1,1,1)*rStarFacC(i,j,1,1)*drF(1) |
| 77 |
|
|
ENDDO |
| 78 |
|
|
ENDDO |
| 79 |
|
|
ELSE |
| 80 |
|
|
DO j=1,sNy |
| 81 |
|
|
DO i=1,sNx |
| 82 |
|
|
mlDepth(i,j) = hFac_surfC(i,j,1,1)*drF(1) |
| 83 |
|
|
ENDDO |
| 84 |
|
|
ENDDO |
| 85 |
|
|
ENDIF |
| 86 |
|
|
ELSE |
| 87 |
|
|
# else /* NONLIN_FRSURF */ |
| 88 |
|
|
IF (.TRUE.) THEN |
| 89 |
|
|
# endif /* NONLIN_FRSURF */ |
| 90 |
|
|
DO j=1,sNy |
| 91 |
|
|
DO i=1,sNx |
| 92 |
|
|
mlDepth(i,j) = hFacC(i,j,1,1,1)*drF(1) |
| 93 |
|
|
ENDDO |
| 94 |
|
|
ENDDO |
| 95 |
|
|
ENDIF |
| 96 |
|
|
|
| 97 |
|
|
DO j=1,sNy |
| 98 |
|
|
DO i=1,sNx |
| 99 |
|
|
v2ocMxL(i,j,1,1) = |
| 100 |
|
|
& ( uVel(i , j,1,1,1)*uVel(i , j,1,1,1) |
| 101 |
|
|
& + uVel(i+1,j,1,1,1)*uVel(i+1,j,1,1,1) |
| 102 |
|
|
& + vVel(i,j+1,1,1,1)*vVel(i,j+1,1,1,1) |
| 103 |
|
|
& + vVel(i,j , 1,1,1)*vVel(i,j , 1,1,1) |
| 104 |
|
|
& )*0.5 _d 0 |
| 105 |
|
|
ENDDO |
| 106 |
|
|
ENDDO |
| 107 |
|
|
|
| 108 |
|
|
|
| 109 |
|
|
DO j=1,sNy |
| 110 |
|
|
DO i=1,sNx |
| 111 |
|
|
|
| 112 |
|
|
C fluxCO2(i,j) = new variable passed |
| 113 |
jscott |
1.3 |
|
| 114 |
jscott |
1.1 |
C Put in seaice common block |
| 115 |
|
|
tOceMxl(i,j,1,1)= sstFromOcn(i,j) |
| 116 |
|
|
sOceMxl(i,j,1,1)= sssFromOcn(i,j) |
| 117 |
|
|
hOceMxl(i,j,1,1) = mlDepth(i,j) |
| 118 |
|
|
C v2ocMxL(i,j,1,1) = velSq(i,j) |
| 119 |
|
|
ENDDO |
| 120 |
|
|
ENDDO |
| 121 |
|
|
|
| 122 |
|
|
#endif |
| 123 |
|
|
|
| 124 |
jscott |
1.2 |
C PRINT *,'After ocean step, sst,sss:', theta(JBUGI,JBUGJ,1,1,1), |
| 125 |
|
|
C & salt(JBUGI,JBUGJ,1,1,1) |
| 126 |
jscott |
1.3 |
C PRINT *,'***get_ocnvars, before ice thicken/extend' |
| 127 |
|
|
C PRINT *,'Icemask: ',icemask(JBUGI,JBUGJ,1,1) |
| 128 |
|
|
C PRINT *,'Iceheight: ',iceheight(JBUGI,JBUGJ,1,1) |
| 129 |
|
|
C PRINT *,'pass_runoff:',pass_runoff(JBUGI,JBUGJ) |
| 130 |
|
|
C PRINT *,'pass_precip:',pass_precip(JBUGI,JBUGJ) |
| 131 |
|
|
C PRINT *,'pass_evap:', pass_evap(JBUGI,JBUGJ) |
| 132 |
|
|
C PRINT *,'pass_qnet:',pass_qnet(JBUGI,JBUGJ) |
| 133 |
|
|
C PRINT *,'icFrwAtm',icFrwAtm(JBUGI,JBUGJ,1,1) |
| 134 |
|
|
C PRINT *,'icFlxSw:',icFlxSw(JBUGI,JBUGJ,1,1) |
| 135 |
|
|
C PRINT *,'pass_Prcatm',pass_prcAtm(JBUGI,JBUGJ) |
| 136 |
|
|
C PRINT *,tOceMxl(JBUGI,JBUGJ,1,1),v2OcMxl(JBUGI,JBUGJ,1,1) |
| 137 |
jscott |
1.1 |
|
| 138 |
|
|
RETURN |
| 139 |
|
|
END |
| 140 |
|
|
|