100 |
C 1.1 Wind components |
C 1.1 Wind components |
101 |
C |
C |
102 |
DO J=1,NGP |
DO J=1,NGP |
|
c_jmc IF ( NLEVxyU(J) .GT. 0 ) THEN |
|
|
c_jmc U0(J) = FWIND0*UA(J,NLEVxyU(J)) |
|
|
c_jmc ENDIF |
|
|
c_jmc IF ( NLEVxyV(J) .GT. 0 ) THEN |
|
|
c_jmc V0(J) = FWIND0*VA(J,NLEVxyV(J)) |
|
|
c_jmc ENDIF |
|
|
c---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
|
C-- Note(jmc): If we interpolate U,V from C_grid to A_grid (center of the mesh) |
|
|
C the above distinction between NLEVxy_Upt,Vpt is no longer valid ! |
|
|
C same thing (again) few lines below. |
|
|
c---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
|
|
IF ( NLEVxy(J,myThid) .GT. 0 ) THEN |
|
|
U0(J) = FWIND0*UA(J,NLEVxy(J,myThid)) |
|
|
V0(J) = FWIND0*VA(J,NLEVxy(J,myThid)) |
|
|
ELSE |
|
103 |
U0(J) = 0.0 |
U0(J) = 0.0 |
104 |
V0(J) = 0.0 |
V0(J) = 0.0 |
105 |
|
IF ( NLEVxyU(J,myThid) .GT. 0 ) THEN |
106 |
|
U0(J) = FWIND0*UA(J,NLEVxyU(J,myThid)) |
107 |
|
ENDIF |
108 |
|
IF ( NLEVxyV(J,myThid) .GT. 0 ) THEN |
109 |
|
V0(J) = FWIND0*VA(J,NLEVxyV(J,myThid)) |
110 |
ENDIF |
ENDIF |
|
C U0(J) = UA(J,5) |
|
|
C V0(J) = VA(J,5) |
|
111 |
ENDDO |
ENDDO |
112 |
C |
C |
113 |
C 1.2 Temperature |
C 1.2 Temperature |
194 |
C |
C |
195 |
C 2.1 Wind stress |
C 2.1 Wind stress |
196 |
C |
C |
197 |
DO J=1,NGP |
c_jmc DO J=1,NGP |
198 |
c_jmc IF ( NLEVxyu(J) .GT. 0 ) THEN |
c_jmc IF ( NLEVxyu(J) .GT. 0 ) THEN |
199 |
c_jmc USTR(J,1) = -CDL*DENVV(J,3)*UA(J,NLEVxyu(J)) |
c_jmc USTR(J,1) = -CDL*DENVV(J,3)*UA(J,NLEVxyu(J)) |
200 |
c_jmc USTR(J,2) = -CDS*DENVV(J,3)*UA(J,NLEVxyu(J)) |
c_jmc USTR(J,2) = -CDS*DENVV(J,3)*UA(J,NLEVxyu(J)) |
203 |
c_jmc VSTR(J,1) = -CDL*DENVV(J,3)*VA(J,NLEVxyv(J)) |
c_jmc VSTR(J,1) = -CDL*DENVV(J,3)*VA(J,NLEVxyv(J)) |
204 |
c_jmc VSTR(J,2) = -CDS*DENVV(J,3)*VA(J,NLEVxyv(j)) |
c_jmc VSTR(J,2) = -CDS*DENVV(J,3)*VA(J,NLEVxyv(j)) |
205 |
c_jmc ENDIF |
c_jmc ENDIF |
|
C-- cf Note(jmc) above. |
|
|
IF ( NLEVxy(J,myThid) .GT. 0 ) THEN |
|
|
USTR(J,1) = -CDL*DENVV(J,3)*UA(J,NLEVxy(J,myThid)) |
|
|
USTR(J,2) = -CDS*DENVV(J,3)*UA(J,NLEVxy(J,myThid)) |
|
|
VSTR(J,1) = -CDL*DENVV(J,3)*VA(J,NLEVxy(J,myThid)) |
|
|
VSTR(J,2) = -CDS*DENVV(J,3)*VA(J,NLEVxy(J,myThid)) |
|
|
ELSE |
|
|
USTR(J,1) = 0. |
|
|
USTR(J,2) = 0. |
|
|
VSTR(J,1) = 0. |
|
|
VSTR(J,2) = 0. |
|
|
ENDIF |
|
|
ENDDO |
|
206 |
c---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
c---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
207 |
c Compute surface drag term (= C_drag*|V| ) to allow direct computation |
C Compute surface drag term (= C_drag*|V| ) to allow direct computation |
208 |
c of surface stress on C-grid. |
C of surface stress on C-grid. |
209 |
c add Land + Sea contributions ; Convert to surface pressure level |
C add Land + Sea contributions ; Convert to surface pressure level |
210 |
DO J=1,NGP |
DO J=1,NGP |
211 |
IF ( NLEVxy(J,myThid) .GT. 0 ) THEN |
IF ( NLEVxy(J,myThid) .GT. 0 ) THEN |
212 |
DRAG(J) = ( CDS+FMASK(J)*(CDL-CDS) ) |
DRAG(J) = ( CDS+FMASK(J)*(CDL-CDS) ) * DENVV(J,3) |
|
& * DENVV(J,3) * GRDSIG(NLEVxy(J,myThid)) |
|
213 |
ELSE |
ELSE |
214 |
DRAG(J) = 0. |
DRAG(J) = 0. |
215 |
ENDIF |
ENDIF |
216 |
ENDDO |
ENDDO |
217 |
|
C - Notes: |
218 |
|
C because of a different mapping between the Drag and the Wind (A/C-grid) |
219 |
|
C the surface stress is computed later, in "External Forcing", |
220 |
|
C => USTR,VSTR is no longer used. only here for diagnostic of old version. |
221 |
|
DO J=1,NGP |
222 |
|
USTR(J,3) = 0. |
223 |
|
VSTR(J,3) = 0. |
224 |
|
IF ( NLEVxyU(J,myThid) .GT. 0 ) |
225 |
|
& USTR(J,3) = -DRAG(J)*UA(J,NLEVxyU(J,myThid)) |
226 |
|
IF ( NLEVxyV(J,myThid) .GT. 0 ) |
227 |
|
& VSTR(J,3) = -DRAG(J)*VA(J,NLEVxyV(J,myThid)) |
228 |
|
ENDDO |
229 |
c---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
c---+----1----+----2----+----3----+----4----+----5----+----6----+----7-|--+----| |
230 |
C |
C |
231 |
C 2.2 Sensible heat flux (from clim. TS over land) |
C 2.2 Sensible heat flux (from clim. TS over land) |
302 |
CALL SHTORH (0,NGP,TSEA ,PSA,1. _d 0,QDUMMY,RDUMMY,QSAT0(1,2),myThid) |
CALL SHTORH (0,NGP,TSEA ,PSA,1. _d 0,QDUMMY,RDUMMY,QSAT0(1,2),myThid) |
303 |
|
|
304 |
DO J=1,NGP |
DO J=1,NGP |
305 |
Cdj EVAP(J,1) = CHL*DENVV(J,1)*MAX(0. _d 0,SWAV(J)*QSAT0(J,1)-Q0(J)) |
Cdj EVAP(J,1) = CHL*DENVV(J,1)*MAX(0. _d 0,SWAV(J)*QSAT0(J,1)-Q0(J)) |
306 |
c_jmc: EVAP(J,1)=CHL*DENVV(J,1)*MIN(1. _d 0,SWAV(J))*(QSAT0(J,1)-Q0(J)) |
EVAP(J,1)=CHL*DENVV(J,1)*MIN(1. _d 0,SWAV(J))*(QSAT0(J,1)-Q0(J)) |
|
EVAP(J,1)=CHL*DENVV(J,1)*MAX(0. _d 0,SWAV(J)*(QSAT0(J,1)-Q0(J))) |
|
307 |
cdj try new scheme : assume that the net heat flux on land is zero |
cdj try new scheme : assume that the net heat flux on land is zero |
308 |
cdj at all time and at all points (this is equivalent |
cdj at all time and at all points (this is equivalent |
309 |
cdj to say that the land has a zero heat capacity) |
cdj to say that the land has a zero heat capacity) |
310 |
cdj EVAP(J,1) = SSR(J)-SLR(J)-SHF(J,1) |
cdj EVAP(J,1) = SSR(J)-SLR(J)-SHF(J,1) |
311 |
c_jmc: EVAP(J,2) = CHS*DENVV(J,2)*(QSAT0(J,2)-Q0(J)) |
EVAP(J,2) = CHS*DENVV(J,2)*(QSAT0(J,2)-Q0(J)) |
312 |
EVAP(J,2) = CHS*DENVV(J,2)*MAX(0. _d 0,QSAT0(J,2)-Q0(J)) |
C - test(jmc): only positive evaporation : |
313 |
|
c EVAP(J,1)=CHL*DENVV(J,1)*MAX(0. _d 0,SWAV(J)*(QSAT0(J,1)-Q0(J))) |
314 |
|
c EVAP(J,2)=CHS*DENVV(J,2)*MAX(0. _d 0,QSAT0(J,2)-Q0(J)) |
315 |
ENDDO |
ENDDO |
316 |
|
|
317 |
|
|
318 |
C-- 3. Weighted average of fluxes according to land-sea mask |
C-- 3. Weighted average of fluxes according to land-sea mask |
319 |
|
|
320 |
DO J=1,NGP |
DO J=1,NGP |
321 |
USTR(J,3) = USTR(J,2)+FMASK(J)*(USTR(J,1)-USTR(J,2)) |
c_jmc USTR(J,3) = USTR(J,2)+FMASK(J)*(USTR(J,1)-USTR(J,2)) |
322 |
VSTR(J,3) = VSTR(J,2)+FMASK(J)*(VSTR(J,1)-VSTR(J,2)) |
c_jmc VSTR(J,3) = VSTR(J,2)+FMASK(J)*(VSTR(J,1)-VSTR(J,2)) |
323 |
SHF(J,3) = SHF(J,2)+FMASK(J)*( SHF(J,1)- SHF(J,2)) |
SHF(J,3) = SHF(J,2)+FMASK(J)*( SHF(J,1)- SHF(J,2)) |
324 |
EVAP(J,3) = EVAP(J,2)+FMASK(J)*(EVAP(J,1)-EVAP(J,2)) |
EVAP(J,3) = EVAP(J,2)+FMASK(J)*(EVAP(J,1)-EVAP(J,2)) |
325 |
cdj |
cdj |