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