53 |
|
|
54 |
#ifdef ALLOW_AIM |
#ifdef ALLOW_AIM |
55 |
C == Local variables == |
C == Local variables == |
56 |
C i,j,k,I2 - Loop counters |
C i,j,k,I2,k - Loop counters |
57 |
INTEGER i,j,I2 |
INTEGER i,j,I2,k |
58 |
_RL SDEP1, IDEP2, SDEP2, SWWIL2, RSW, soilw_0, soilw_1 |
_RL SDEP1, IDEP2, SDEP2, SWWIL2, RSW, soilw_0, soilw_1 |
59 |
_RL RSD, alb_land, tFreez |
_RL RSD, alb_land, oceTfreez |
60 |
c _RL DALB, alb_sea |
c _RL DALB, alb_sea |
61 |
|
|
62 |
C_EqCh: start |
C_EqCh: start |
70 |
tYear = 0.25 _d 0 - 10. _d 0/365. _d 0 |
tYear = 0.25 _d 0 - 10. _d 0/365. _d 0 |
71 |
C_EqCh: end |
C_EqCh: end |
72 |
|
|
73 |
|
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
74 |
|
C- Set Land-sea mask (in [0,1]) from aim_landFr to fMask1: |
75 |
|
DO j=1,sNy |
76 |
|
DO i=1,sNx |
77 |
|
I2 = i+(j-1)*sNx |
78 |
|
fMask1(I2,1,myThid) = aim_landFr(i,j,bi,bj) |
79 |
|
ENDDO |
80 |
|
ENDDO |
81 |
|
|
82 |
IF (aim_useFMsurfBC) THEN |
IF (aim_useFMsurfBC) THEN |
83 |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
C---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
84 |
|
|
85 |
C-- Compute surface forcing at present time (linear Interp in time) |
C-- Compute surface forcing at present time (linear Interp in time) |
86 |
C using F.Molteni surface BC form ; fields needed are: |
C using F.Molteni surface BC form ; fields needed are: |
87 |
C 1. Land sea mask |
C 1. Sea Surface temperatures (in situ Temp. [K]) |
88 |
C 2. Sea Surface temperatures (in situ Temp. [K]) |
C 2. Land Surface temperatures (in situ Temp. [K]) |
89 |
C 3. Land Surface temperatures (in situ Temp. [K]) |
C 3. Soil moisture (between 0-1) |
90 |
C 4. Soil moisture (between 0-1) |
C 4. Snow depth, Sea Ice : used to compute albedo (=> local arrays) |
91 |
C 5. Snow depth, Sea Ice : used to compute albedo (=> local arrays) |
C 5. Albedo (between 0-1) |
|
C 6. Albedo (between 0-1) |
|
|
|
|
|
C- Set Land-sea mask (in [0,1]) from aim_landFr to fMask1: |
|
|
DO j=1,sNy |
|
|
DO i=1,sNx |
|
|
I2 = i+(j-1)*sNx |
|
|
fMask1(I2,1,myThid) = aim_landFr(i,j,bi,bj) |
|
|
ENDDO |
|
|
ENDDO |
|
92 |
|
|
93 |
C- Surface Temperature: |
C- Surface Temperature: |
94 |
DO j=1,sNy |
DO j=1,sNy |
139 |
|
|
140 |
IF (aim_splitSIOsFx) THEN |
IF (aim_splitSIOsFx) THEN |
141 |
C- Split Ocean and Sea-Ice surf. temp. ; remove ice-fraction < 1 % |
C- Split Ocean and Sea-Ice surf. temp. ; remove ice-fraction < 1 % |
142 |
tFreez = celsius2K - 1.9 _d 0 |
c oceTfreez = tFreeze - 1.9 _d 0 |
143 |
|
oceTfreez = celsius2K - 1.9 _d 0 |
144 |
DO J=1,NGP |
DO J=1,NGP |
145 |
sti1(J,myThid) = sst1(J,myThid) |
sti1(J,myThid) = sst1(J,myThid) |
146 |
IF ( oice1(J) .GT. 1. _d -2 ) THEN |
IF ( oice1(J) .GT. 1. _d -2 ) THEN |
147 |
sst1(J,myThid) = MAX(sst1(J,myThid),tFreez) |
sst1(J,myThid) = MAX(sst1(J,myThid),oceTfreez) |
148 |
sti1(J,myThid) = sst1(J,myThid) |
sti1(J,myThid) = sst1(J,myThid) |
149 |
& +(sti1(J,myThid)-sst1(J,myThid))/oice1(J) |
& +(sti1(J,myThid)-sst1(J,myThid))/oice1(J) |
150 |
ELSE |
ELSE |
188 |
C 2. Sea Surface temperatures (in situ Temp. [K]) |
C 2. Sea Surface temperatures (in situ Temp. [K]) |
189 |
C 3. Land Surface temperatures (in situ Temp. [K]) |
C 3. Land Surface temperatures (in situ Temp. [K]) |
190 |
C 4. Soil moisture (between 0-1) |
C 4. Soil moisture (between 0-1) |
|
C 5. Land sea mask (infer from exact zeros in soil moisture) |
|
191 |
C Snow depth, Sea Ice (<- no need for now) |
C Snow depth, Sea Ice (<- no need for now) |
192 |
|
|
193 |
C Set surface albedo data (in [0,1]) from aim_albedo to alb1 : |
C Set surface albedo data (in [0,1]) from aim_albedo to alb1 : |
262 |
ENDDO |
ENDDO |
263 |
ENDIF |
ENDIF |
264 |
|
|
|
C- Set Land-sea mask (in [0,1]) |
|
|
C from aim_landFr to fMask1 (aim_useFMsurfBC) |
|
|
C or from where soil moisture is exactly zero (aim_useMMsurfFc) |
|
|
IF (aim_useMMsurfFc) THEN |
|
|
DO J=1,NGP |
|
|
fMask1(J,1,myThid) = 1. |
|
|
IF ( soilw1(J,myThid).EQ.0. ) fMask1(J,1,myThid) = 0. |
|
|
ENDDO |
|
|
ELSE |
|
|
DO j=1,sNy |
|
|
DO i=1,sNx |
|
|
I2 = i+(j-1)*sNx |
|
|
fMask1(I2,1,myThid) = 0. |
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
|
|
|
265 |
C- Set Snow depth and Sea Ice |
C- Set Snow depth and Sea Ice |
266 |
C (not needed here since albedo is loaded from file) |
C (not needed here since albedo is loaded from file) |
267 |
DO j=1,sNy |
DO j=1,sNy |
277 |
|
|
278 |
#ifdef COMPONENT_MODULE |
#ifdef COMPONENT_MODULE |
279 |
IF ( useCoupler ) THEN |
IF ( useCoupler ) THEN |
280 |
IF ( useImportSST ) THEN |
C-- take surface data from the ocean component |
281 |
DO j=1,sNy |
C to replace MxL fields (if use sea-ice) or directly AIM SST |
282 |
DO i=1,sNx |
CALL ATM_APPLY_IMPORT( |
283 |
|
I aim_landFr, |
284 |
c IF ( SSTocn(I,J,bi,bj) .NE. 0. ) THEN |
U sst1(1,mythid), oice1, |
285 |
IF ( aim_landFr(i,j,bi,bj) .LT. 1. ) THEN |
I myTime, myIter, bi, bj, myThid ) |
|
I2 = i+(j-1)*sNx |
|
|
C-- take SST from the ocean compon where Sea-Ice fraction is zero |
|
|
IF ( oice1(I2).EQ.0. ) THEN |
|
|
sst1(I2,myThid) = SSTocn(i,j,bi,bj)+celsius2K |
|
|
ELSEIF ( SSTocn(i,j,bi,bj).GE. -1. _d 0) THEN |
|
|
C-- take SST from the ocean compon if clearly warmer than freezing |
|
|
C then reset sea-ice fraction |
|
|
sst1(I2,myThid) = SSTocn(i,j,bi,bj)+celsius2K |
|
|
oice1(I2) = 0. |
|
|
ENDIF |
|
|
ENDIF |
|
|
|
|
|
ENDDO |
|
|
ENDDO |
|
|
ENDIF |
|
286 |
ENDIF |
ENDIF |
287 |
#endif /* COMPONENT_MODULE */ |
#endif /* COMPONENT_MODULE */ |
288 |
|
|
296 |
ENDIF |
ENDIF |
297 |
#endif /* ALLOW_LAND */ |
#endif /* ALLOW_LAND */ |
298 |
|
|
299 |
|
#ifdef ALLOW_THSICE |
300 |
|
IF (useThSIce) THEN |
301 |
|
C- Use thermo. sea-ice model output instead of prescribed Temp & albedo |
302 |
|
CALL AIM_SICE2AIM( |
303 |
|
I aim_landFr, |
304 |
|
U sst1(1,mythid), oice1, |
305 |
|
O sti1(1,mythid), alb1(1,3,myThid), |
306 |
|
I myTime, myIter, bi, bj, myThid ) |
307 |
|
ENDIF |
308 |
|
#endif /* ALLOW_THSICE */ |
309 |
|
|
310 |
C-- set the sea-ice & open ocean fraction : |
C-- set the sea-ice & open ocean fraction : |
311 |
DO J=1,NGP |
DO J=1,NGP |
312 |
fMask1(J,3,myThid) =(1. _d 0 - fMask1(J,1,myThid)) |
fMask1(J,3,myThid) =(1. _d 0 - fMask1(J,1,myThid)) |
322 |
& + fMask1(J,3,myThid)*alb1(J,3,myThid) |
& + fMask1(J,3,myThid)*alb1(J,3,myThid) |
323 |
ENDDO |
ENDDO |
324 |
|
|
325 |
|
C-- initialize surf. temp. change to zero: |
326 |
|
DO k=1,3 |
327 |
|
DO J=1,NGP |
328 |
|
dTsurf(J,k,myThid) = 0. |
329 |
|
ENDDO |
330 |
|
ENDDO |
331 |
|
|
332 |
IF (.NOT.aim_splitSIOsFx) THEN |
IF (.NOT.aim_splitSIOsFx) THEN |
333 |
DO J=1,NGP |
DO J=1,NGP |
334 |
fMask1(J,3,myThid) = 0. _d 0 |
fMask1(J,3,myThid) = 0. _d 0 |