1 |
|
2 |
#include "CPP_OPTIONS.h" |
3 |
|
4 |
C !ROUTINE: BULKF_FIELDS_LOAD |
5 |
C !INTERFACE: |
6 |
SUBROUTINE BULKF_FIELDS_LOAD( myTime, myIter, myThid ) |
7 |
C *==========================================================* |
8 |
C | SUBROUTINE BULKF_FIELDS_LOAD |
9 |
C | o Control reading of fields from external source. |
10 |
C *==========================================================* |
11 |
C | Bulk formula External source field loading routine. |
12 |
C | This routine is called every time we want to |
13 |
C | load a a set of external fields. The routine decides |
14 |
C | which fields to load and then reads them in. |
15 |
C | This routine needs to be customised for particular |
16 |
C | experiments. |
17 |
C | Notes |
18 |
C | ===== |
19 |
C | Two-dimensional and three-dimensional I/O are handled in |
20 |
C | the following way under MITgcmUV. A master thread |
21 |
C | performs I/O using system calls. This threads reads data |
22 |
C | into a temporary buffer. At present the buffer is loaded |
23 |
C | with the entire model domain. This is probably OK for now |
24 |
C | Each thread then copies data from the buffer to the |
25 |
C | region of the proper array it is responsible for. |
26 |
C | ===== |
27 |
C | Conversion of flux fields are described in FFIELDS.h |
28 |
C *==========================================================* |
29 |
|
30 |
C !USES: |
31 |
IMPLICIT NONE |
32 |
C === Global variables === |
33 |
#include "SIZE.h" |
34 |
#include "EEPARAMS.h" |
35 |
#include "PARAMS.h" |
36 |
#include "FFIELDS.h" |
37 |
#include "GRID.h" |
38 |
#include "DYNVARS.h" |
39 |
cswdblk -- add --- |
40 |
#ifdef ALLOW_BULK_FORCE |
41 |
#include "BULKF.h" |
42 |
#endif |
43 |
cswdblk -- end add --- |
44 |
#ifdef ALLOW_THERM_SEAICE |
45 |
#include "ICE.h" |
46 |
#endif |
47 |
LOGICAL DIFFERENT_MULTIPLE |
48 |
EXTERNAL DIFFERENT_MULTIPLE |
49 |
|
50 |
C !INPUT/OUTPUT PARAMETERS: |
51 |
C === Routine arguments === |
52 |
C myThid - Thread no. that called this routine. |
53 |
C myTime - Simulation time |
54 |
C myIter - Simulation timestep number |
55 |
INTEGER myThid |
56 |
_RL myTime |
57 |
INTEGER myIter |
58 |
|
59 |
|
60 |
C !LOCAL VARIABLES: |
61 |
C === Local arrays === |
62 |
C tair[01] :: Temp. for air temperature |
63 |
C qair[01] :: Temp. for air specific humidity |
64 |
C rain[01] :: Temp. for rain |
65 |
C solar[01] :: Temp. for incoming solar radition |
66 |
C flw[01] :: Temp. for downward longwave flux |
67 |
C uwind[01] :: Temp. for zonal wind speed |
68 |
C vwind[01] :: Temp. for meridional wind speed |
69 |
C wspeed[01] :: Temp. for wind speed |
70 |
C tauxLocal[01] :: Temp. for meridional wind stress |
71 |
C tauyLocal[01] : : Temp. for zonal wind stress |
72 |
C runoff[01] :: Temp. for runoff |
73 |
c qnetch[01] :: Temp for qnet (cheating) |
74 |
c empch[01] :: Temp for empmr (cheating) |
75 |
c cloud[01] :: Temp for cloud |
76 |
c snow[01] :: Temp for snow |
77 |
C [01] :: End points for interpolation |
78 |
C Above use static heap storage to allow exchange. |
79 |
C aWght, bWght :: Interpolation weights |
80 |
COMMON /BULKFFIELDS/ |
81 |
& tair0, qair0, rain0, solar0, |
82 |
& flw0, uwind0, vwind0, runoff0, |
83 |
& taux0Local, tauy0Local, wspeed0, |
84 |
& qnetch0, empch0, cloud0, snow0, |
85 |
& tair1, qair1, rain1, solar1, |
86 |
& flw1, uwind1, vwind1, runoff1, |
87 |
& taux1Local, tauy1Local, wspeed1, |
88 |
& qnetch1,empch1, cloud1,snow1, |
89 |
& sss0Local, sss1Local, sst0Local, sst1Local |
90 |
|
91 |
_RS tair0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
92 |
_RS tair1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
93 |
_RS qair0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
94 |
_RS qair1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
95 |
_RS rain0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
96 |
_RS rain1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
97 |
_RS solar0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
98 |
_RS solar1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
99 |
_RS flw0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
100 |
_RS flw1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
101 |
_RS uwind0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
102 |
_RS uwind1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
103 |
_RS vwind0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
104 |
_RS vwind1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
105 |
_RS runoff0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
106 |
_RS runoff1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
107 |
_RS taux0Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
108 |
_RS taux1Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
109 |
_RS tauy0Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
110 |
_RS tauy1Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
111 |
_RS wspeed0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
112 |
_RS wspeed1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
113 |
_RS qnetch0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
114 |
_RS qnetch1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
115 |
_RS empch0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
116 |
_RS empch1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
117 |
_RS cloud0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
118 |
_RS cloud1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
119 |
_RS snow0 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
120 |
_RS snow1 (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
121 |
_RS SST0Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
122 |
_RS SSS0Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
123 |
_RS SST1Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
124 |
_RS SSS1Local (1-OLx:sNx+OLx,1-OLy:sNy+OLy,nSx,nSy) |
125 |
|
126 |
|
127 |
|
128 |
INTEGER bi,bj,i,j,intime0,intime1 |
129 |
_RL aWght,bWght,rdt |
130 |
INTEGER nForcingPeriods,Imytm,Ifprd,Ifcyc,Iftm |
131 |
|
132 |
#ifdef ALLOW_BULK_FORCE |
133 |
|
134 |
IF ( periodicExternalForcing ) THEN |
135 |
|
136 |
C First call requires that we initialize everything to zero for safety |
137 |
IF ( myIter .EQ. nIter0 ) THEN |
138 |
CALL LEF_ZERO( tair0 ,myThid ) |
139 |
CALL LEF_ZERO( qair0 ,myThid ) |
140 |
CALL LEF_ZERO( rain0 ,myThid ) |
141 |
CALL LEF_ZERO( solar0,myThid ) |
142 |
CALL LEF_ZERO( flw0 ,myThid ) |
143 |
CALL LEF_ZERO( uwind0,myThid ) |
144 |
CALL LEF_ZERO( vwind0,myThid ) |
145 |
CALL LEF_ZERO( runoff0,myThid ) |
146 |
CALL LEF_ZERO( wspeed0,myThid ) |
147 |
CALL LEF_ZERO( qnetch0,myThid ) |
148 |
CALL LEF_ZERO( empch0,myThid ) |
149 |
CALL LEF_ZERO( cloud0,myThid ) |
150 |
CALL LEF_ZERO( snow0,myThid ) |
151 |
CALL LEF_ZERO( tair1 ,myThid ) |
152 |
CALL LEF_ZERO( qair1 ,myThid ) |
153 |
CALL LEF_ZERO( rain1 ,myThid ) |
154 |
CALL LEF_ZERO( solar1,myThid ) |
155 |
CALL LEF_ZERO( flw1 ,myThid ) |
156 |
CALL LEF_ZERO( uwind1,myThid ) |
157 |
CALL LEF_ZERO( vwind0,myThid ) |
158 |
CALL LEF_ZERO( runoff1,myThid ) |
159 |
CALL LEF_ZERO( wspeed1,myThid ) |
160 |
CALL LEF_ZERO( qnetch1,myThid ) |
161 |
CALL LEF_ZERO( empch1,myThid ) |
162 |
CALL LEF_ZERO( cloud1,myThid ) |
163 |
CALL LEF_ZERO( snow1,myThid ) |
164 |
if (readwindstress) then |
165 |
CALL LEF_ZERO( taux0Local ,myThid ) |
166 |
CALL LEF_ZERO( tauy0Local ,myThid ) |
167 |
CALL LEF_ZERO( taux1Local ,myThid ) |
168 |
CALL LEF_ZERO( tauy1Local ,myThid ) |
169 |
endif |
170 |
if (readsurface) then |
171 |
CALL LEF_ZERO( sst0Local ,myThid ) |
172 |
CALL LEF_ZERO( sst0Local ,myThid ) |
173 |
CALL LEF_ZERO( sss1Local ,myThid ) |
174 |
CALL LEF_ZERO( sss1Local ,myThid ) |
175 |
endif |
176 |
|
177 |
ENDIF |
178 |
|
179 |
C Now calculate whether it is time to update the forcing arrays |
180 |
rdt=1. _d 0 / deltaTclock |
181 |
nForcingPeriods= |
182 |
& int(externForcingCycle/externForcingPeriod+0.5) |
183 |
Imytm=int(myTime*rdt+0.5) |
184 |
Ifprd=int(externForcingPeriod*rdt+0.5) |
185 |
Ifcyc=int(externForcingCycle*rdt+0.5) |
186 |
Iftm=mod( Imytm+Ifcyc-Ifprd/2 ,Ifcyc) |
187 |
|
188 |
intime0=int(Iftm/Ifprd) |
189 |
intime1=mod(intime0+1,nForcingPeriods) |
190 |
aWght=float( Iftm-Ifprd*intime0 )/float( Ifprd ) |
191 |
bWght=1.-aWght |
192 |
|
193 |
intime0=intime0+1 |
194 |
intime1=intime1+1 |
195 |
|
196 |
IF ( |
197 |
& Iftm-Ifprd*(intime0-1) .EQ. 0 |
198 |
& .OR. myIter .EQ. nIter0 |
199 |
& ) THEN |
200 |
|
201 |
_BEGIN_MASTER(myThid) |
202 |
|
203 |
C If the above condition is met then we need to read in |
204 |
C data for the period ahead and the period behind myTime. |
205 |
c WRITE(*,*) |
206 |
c & 'S/R EXTERNAL_FIELDS_LOAD: Reading new data', |
207 |
c & myTime,myIter |
208 |
WRITE(*,*) |
209 |
& 'S/R EXTERNAL_FIELDS_LOAD' |
210 |
IF ( AirTempFile .NE. ' ' ) THEN |
211 |
CALL READ_REC_XY_RS( AirTempFile,tair0,intime0, |
212 |
& myIter,myThid ) |
213 |
CALL READ_REC_XY_RS( AirTempFile,tair1,intime1, |
214 |
& myIter,myThid ) |
215 |
ENDIF |
216 |
IF ( AirHumidityFile .NE. ' ' ) THEN |
217 |
CALL READ_REC_XY_RS( AirhumidityFile,qair0,intime0, |
218 |
& myIter,myThid ) |
219 |
CALL READ_REC_XY_RS( AirhumidityFile,qair1,intime1, |
220 |
& myIter,myThid ) |
221 |
ENDIF |
222 |
IF ( RainFile .NE. ' ' ) THEN |
223 |
CALL READ_REC_XY_RS( RainFile,rain0,intime0, |
224 |
& myIter,myThid ) |
225 |
CALL READ_REC_XY_RS( RainFile,rain1,intime1, |
226 |
& myIter,myThid ) |
227 |
ENDIF |
228 |
IF ( SolarFile .NE. ' ' ) THEN |
229 |
CALL READ_REC_XY_RS( SolarFile,solar0,intime0, |
230 |
& myIter,myThid ) |
231 |
CALL READ_REC_XY_RS( SolarFile,solar1,intime1, |
232 |
& myIter,myThid ) |
233 |
ENDIF |
234 |
IF ( LongwaveFile .NE. ' ' ) THEN |
235 |
CALL READ_REC_XY_RS( LongwaveFile,flw0,intime0, |
236 |
& myIter,myThid ) |
237 |
CALL READ_REC_XY_RS( LongwaveFile,flw1,intime1, |
238 |
& myIter,myThid ) |
239 |
ENDIF |
240 |
IF ( UwindFile .NE. ' ' ) THEN |
241 |
CALL READ_REC_XY_RS( UWindFile,uwind0,intime0, |
242 |
& myIter,myThid ) |
243 |
CALL READ_REC_XY_RS( UWindFile,uwind1,intime1, |
244 |
& myIter,myThid ) |
245 |
ENDIF |
246 |
IF ( VwindFile .NE. ' ' ) THEN |
247 |
CALL READ_REC_XY_RS( VWindFile,vwind0,intime0, |
248 |
& myIter,myThid ) |
249 |
CALL READ_REC_XY_RS( VWindFile,vwind1,intime1, |
250 |
& myIter,myThid ) |
251 |
ENDIF |
252 |
IF ( RunoffFile .NE. ' ' ) THEN |
253 |
CALL READ_REC_XY_RS( RunoffFile,runoff0,intime0, |
254 |
& myIter,myThid ) |
255 |
CALL READ_REC_XY_RS( RunoffFile,runoff1,intime1, |
256 |
& myIter,myThid ) |
257 |
ENDIF |
258 |
|
259 |
IF ( WSpeedFile .NE. ' ' ) THEN |
260 |
CALL READ_REC_XY_RS( WSpeedFile,wspeed0,intime0, |
261 |
& myIter,myThid ) |
262 |
CALL READ_REC_XY_RS( WSpeedFile,wspeed1,intime1, |
263 |
& myIter,myThid ) |
264 |
ENDIF |
265 |
|
266 |
|
267 |
IF ( QnetFile .NE. ' ' ) THEN |
268 |
CALL READ_REC_XY_RS( QnetFile,qnetch0,intime0, |
269 |
& myIter,myThid ) |
270 |
CALL READ_REC_XY_RS( QnetFile,qnetch1,intime1, |
271 |
& myIter,myThid ) |
272 |
ENDIF |
273 |
|
274 |
IF ( EmPFile .NE. ' ' ) THEN |
275 |
CALL READ_REC_XY_RS( EmpFile,empch0,intime0, |
276 |
& myIter,myThid ) |
277 |
CALL READ_REC_XY_RS( EmpFile,empch1,intime1, |
278 |
& myIter,myThid ) |
279 |
ENDIF |
280 |
|
281 |
IF ( CloudFile .NE. ' ' ) THEN |
282 |
CALL READ_REC_XY_RS( CloudFile,cloud0,intime0, |
283 |
& myIter,myThid ) |
284 |
CALL READ_REC_XY_RS( CloudFile,cloud1,intime1, |
285 |
& myIter,myThid ) |
286 |
ENDIF |
287 |
|
288 |
IF ( SnowFile .NE. ' ' ) THEN |
289 |
CALL READ_REC_XY_RS( SnowFile,snow0,intime0, |
290 |
& myIter,myThid ) |
291 |
CALL READ_REC_XY_RS( SnowFile,snow1,intime1, |
292 |
& myIter,myThid ) |
293 |
ENDIF |
294 |
|
295 |
|
296 |
if (readwindstress) then |
297 |
IF ( zonalWindFile .NE. ' ' ) THEN |
298 |
CALL READ_REC_XY_RS( zonalWindFile,taux0Local,intime0, |
299 |
& myIter,myThid ) |
300 |
CALL READ_REC_XY_RS( zonalWindFile,taux1Local,intime1, |
301 |
& myIter,myThid ) |
302 |
ENDIF |
303 |
IF ( meridWindFile .NE. ' ' ) THEN |
304 |
CALL READ_REC_XY_RS( meridWindFile,tauy0Local,intime0, |
305 |
& myIter,myThid ) |
306 |
CALL READ_REC_XY_RS( meridWindFile,tauy1Local,intime1, |
307 |
& myIter,myThid ) |
308 |
ENDIF |
309 |
endif |
310 |
if (readsurface) then |
311 |
IF ( thetaClimFile .NE. ' ' ) THEN |
312 |
CALL READ_REC_XY_RS( thetaClimFile,SST0Local,intime0, |
313 |
& myIter,myThid ) |
314 |
CALL READ_REC_XY_RS( thetaClimFile,SST1Local,intime1, |
315 |
& myIter,myThid ) |
316 |
ENDIF |
317 |
IF ( saltClimFile .NE. ' ' ) THEN |
318 |
CALL READ_REC_XY_RS( saltClimFile,SSS0Local,intime0, |
319 |
& myIter,myThid ) |
320 |
CALL READ_REC_XY_RS( saltClimFile,SSS1Local,intime1, |
321 |
& myIter,myThid ) |
322 |
ENDIF |
323 |
endif |
324 |
|
325 |
_END_MASTER(myThid) |
326 |
C |
327 |
_EXCH_XY_R4(tair0 , myThid ) |
328 |
_EXCH_XY_R4(tair1 , myThid ) |
329 |
_EXCH_XY_R4(qair0 , myThid ) |
330 |
_EXCH_XY_R4(qair1 , myThid ) |
331 |
_EXCH_XY_R4(rain0, myThid ) |
332 |
_EXCH_XY_R4(rain1, myThid ) |
333 |
_EXCH_XY_R4(solar0, myThid ) |
334 |
_EXCH_XY_R4(solar1, myThid ) |
335 |
_EXCH_XY_R4(flw0, myThid ) |
336 |
_EXCH_XY_R4(flw1, myThid ) |
337 |
_EXCH_XY_R4(uwind0, myThid ) |
338 |
_EXCH_XY_R4(uwind1, myThid ) |
339 |
_EXCH_XY_R4(vwind0, myThid ) |
340 |
_EXCH_XY_R4(vwind1, myThid ) |
341 |
CXXXX CALL EXCH_UV_XY_RS(uwind0, vwind0, .TRUE., myThid) |
342 |
CXXXX CALL EXCH_UV_XY_RS(uwind1, vwind1, .TRUE., myThid) |
343 |
_EXCH_XY_R4(runoff0, myThid ) |
344 |
_EXCH_XY_R4(runoff1, myThid ) |
345 |
_EXCH_XY_R4(wspeed0, myThid ) |
346 |
_EXCH_XY_R4(wspeed1, myThid ) |
347 |
_EXCH_XY_R4(qnetch0, myThid ) |
348 |
_EXCH_XY_R4(qnetch1, myThid ) |
349 |
_EXCH_XY_R4(empch0, myThid ) |
350 |
_EXCH_XY_R4(empch1, myThid ) |
351 |
_EXCH_XY_R4(cloud0, myThid ) |
352 |
_EXCH_XY_R4(cloud1, myThid ) |
353 |
_EXCH_XY_R4(snow0 , myThid ) |
354 |
_EXCH_XY_R4(snow1 , myThid ) |
355 |
if (readwindstress) then |
356 |
c _EXCH_XY_R4(taux0Local , myThid ) |
357 |
c _EXCH_XY_R4(taux1Local , myThid ) |
358 |
c _EXCH_XY_R4(tauy0Local , myThid ) |
359 |
c _EXCH_XY_R4(tauy1Local , myThid ) |
360 |
CALL EXCH_UV_XY_RS(taux0Local, tauy0Local, .TRUE., myThid) |
361 |
CALL EXCH_UV_XY_RS(taux1Local, tauy1Local, .TRUE., myThid) |
362 |
endif |
363 |
if (readsurface) then |
364 |
_EXCH_XY_R4(SST0Local , myThid ) |
365 |
_EXCH_XY_R4(SST1Local , myThid ) |
366 |
_EXCH_XY_R4(SSS0Local , myThid ) |
367 |
_EXCH_XY_R4(SSS1Local , myThid ) |
368 |
endif |
369 |
C |
370 |
ENDIF |
371 |
|
372 |
C-- Interpolate TAIR, QAIR, RAIN, SOLAR |
373 |
DO bj = myByLo(myThid), myByHi(myThid) |
374 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
375 |
DO j=1-Oly,sNy+Oly |
376 |
DO i=1-Olx,sNx+Olx |
377 |
cswdblkf -- QQQQQ check if tair is K or C ------ |
378 |
c -- dasilva data in C, ncep data in K --- |
379 |
TAIR(i,j,bi,bj) = bWght*tair0(i,j,bi,bj) |
380 |
& +aWght*tair1(i,j,bi,bj) !+273.15 |
381 |
cswdblkf -- QQQQQ set to kg.kg??? --- |
382 |
c -- dasilva data in g, ncep in kg --- |
383 |
QAIR(i,j,bi,bj) =( bWght*qair0(i,j,bi,bj) |
384 |
& +aWght*qair1(i,j,bi,bj) ) |
385 |
RAIN(i,j,bi,bj) = bWght*rain0(i,j,bi,bj) |
386 |
& +aWght*rain1(i,j,bi,bj) |
387 |
SOLAR(i,j,bi,bj) = bWght*solar0(i,j,bi,bj) |
388 |
& +aWght*solar1(i,j,bi,bj) |
389 |
FLW(i,j,bi,bj) = bWght*flw0(i,j,bi,bj) |
390 |
& +aWght*flw1(i,j,bi,bj) |
391 |
UWIND(i,j,bi,bj) = bWght*uwind0(i,j,bi,bj) |
392 |
& +aWght*uwind1(i,j,bi,bj) |
393 |
VWIND(i,j,bi,bj) = bWght*vwind0(i,j,bi,bj) |
394 |
& +aWght*vwind1(i,j,bi,bj) |
395 |
RUNOFF(i,j,bi,bj) = bWght*runoff0(i,j,bi,bj) |
396 |
& +aWght*runoff1(i,j,bi,bj) |
397 |
WSPEED(i,j,bi,bj) = bWght*wspeed0(i,j,bi,bj) |
398 |
& +aWght*wspeed1(i,j,bi,bj) |
399 |
QNETCH(i,j,bi,bj) = bWght*qnetch0(i,j,bi,bj) |
400 |
& +aWght*qnetch1(i,j,bi,bj) |
401 |
EMPCH(i,j,bi,bj) = bWght*empch0(i,j,bi,bj) |
402 |
& +aWght*empch1(i,j,bi,bj) |
403 |
CLOUD(i,j,bi,bj) = bWght*cloud0(i,j,bi,bj) |
404 |
& +aWght*cloud1(i,j,bi,bj) |
405 |
#ifdef ALLOW_THERM_SEAICE |
406 |
SNOW(i,j,bi,bj) = bWght*snow0(i,j,bi,bj) |
407 |
& +aWght*snow1(i,j,bi,bj) |
408 |
#endif |
409 |
if (readwindstress) then |
410 |
fu(i,j,bi,bj) = bWght*taux0Local(i,j,bi,bj) |
411 |
& +aWght*taux1Local(i,j,bi,bj) |
412 |
fv(i,j,bi,bj) = bWght*tauy0Local(i,j,bi,bj) |
413 |
& +aWght*tauy1Local(i,j,bi,bj) |
414 |
endif |
415 |
if (readsurface) then |
416 |
SST(i,j,bi,bj) = bWght*SST0Local(i,j,bi,bj) |
417 |
& +aWght*SST1Local(i,j,bi,bj) |
418 |
SSS(i,j,bi,bj) = bWght*SSS0Local(i,j,bi,bj) |
419 |
& +aWght*SSS1Local(i,j,bi,bj) |
420 |
endif |
421 |
ENDDO |
422 |
ENDDO |
423 |
ENDDO |
424 |
ENDDO |
425 |
|
426 |
_EXCH_XY_R8(tair , myThid ) |
427 |
_EXCH_XY_R8(qair , myThid ) |
428 |
_EXCH_XY_R8(rain, myThid ) |
429 |
_EXCH_XY_R8(solar, myThid ) |
430 |
_EXCH_XY_R8(flw, myThid ) |
431 |
_EXCH_XY_R8(uwind, myThid ) |
432 |
_EXCH_XY_R8(vwind, myThid ) |
433 |
_EXCH_XY_R8(runoff, myThid ) |
434 |
_EXCH_XY_R8(wspeed, myThid ) |
435 |
_EXCH_XY_R8(qnetch, myThid ) |
436 |
_EXCH_XY_R8(empch, myThid ) |
437 |
if (readwindstress) then |
438 |
c _EXCH_XY_R8(fu , myThid ) |
439 |
c _EXCH_XY_R8(fv , myThid ) |
440 |
CALL EXCH_UV_XY_RS(fu, fv, .TRUE., myThid) |
441 |
endif |
442 |
if (readsurface) then |
443 |
_EXCH_XY_R8(SST , myThid ) |
444 |
_EXCH_XY_R8(SSS , myThid ) |
445 |
endif |
446 |
|
447 |
|
448 |
|
449 |
C-- Diagnostics |
450 |
IF (myThid.EQ.1 .AND. myTime.LT.62208000.) THEN |
451 |
write(*,'(a,1p5e12.4,2i6,2e12.4)') |
452 |
& 'time,TAIR,QAIR,RAIN,SOLAR,i0,i1,a,b = ', |
453 |
& myTime, |
454 |
& TAIR(1,sNy,1,1),QAIR(1,sNy,1,1), |
455 |
& RAIN(1,sNy,1,1),SOLAR(1,sNy,1,1), |
456 |
& intime0,intime1,aWght,bWght |
457 |
write(*,'(a,1p4e12.4,2e12.4)') |
458 |
& 'time,tair0,tair1,TAIR = ', |
459 |
& myTime, |
460 |
& tair0(1,sNy,1,1),tair1(1,sNy,1,1),TAIR(1,sNy,1,1), |
461 |
& aWght,bWght |
462 |
ENDIF |
463 |
|
464 |
C endif for periodicForcing |
465 |
ENDIF |
466 |
|
467 |
#endif |
468 |
c end ifdef ALLOW_BULK_FORCE |
469 |
|
470 |
RETURN |
471 |
END |
472 |
|