SURFEX v8.1
General documentation of Surfex
coare30_flux.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE coare30_flux (S,PZ0SEA,PTA,PEXNA,PRHOA,PSST,PEXNS,PQA, &
7  PVMOD,PZREF,PUREF,PPS,PQSAT,PSFTH,PSFTQ,PUSTAR,PCD,PCDN,PCH,PCE,PRI,&
8  PRESA,PRAIN,PZ0HSEA)
9 ! #######################################################################
10 !
11 !
12 !!**** *COARE25_FLUX*
13 !!
14 !! PURPOSE
15 !! -------
16 ! Calculate the surface fluxes of heat, moisture, and momentum over
17 ! sea surface with bulk algorithm COARE3.0.
18 !
19 !!** METHOD
20 !! ------
21 ! transfer coefficients were obtained using a dataset which combined COARE
22 ! data with those from three other ETL field experiments, and reanalysis of
23 ! the HEXMAX data (DeCosmos et al. 1996).
24 ! ITERMAX=3
25 ! Take account of the surface gravity waves on the velocity roughness and
26 ! hence the momentum transfer coefficient
27 ! NGRVWAVES=0 no gravity waves action (Charnock) !default value
28 ! NGRVWAVES=1 wave age parameterization of Oost et al. 2002
29 ! NGRVWAVES=2 model of Taylor and Yelland 2001
30 !
31 !! EXTERNAL
32 !! --------
33 !!
34 !! IMPLICIT ARGUMENTS
35 !! ------------------
36 !!
37 !! REFERENCE
38 !! ---------
39 !! Fairall et al (2003), J. of Climate, vol. 16, 571-591
40 !! Fairall et al (1996), JGR, 3747-3764
41 !! Gosnell et al (1995), JGR, 437-442
42 !! Fairall et al (1996), JGR, 1295-1308
43 !!
44 !! AUTHOR
45 !! ------
46 !! C. Lebeaupin *Météo-France* (adapted from C. Fairall's code)
47 !!
48 !! MODIFICATIONS
49 !! -------------
50 !! Original 1/06/2006
51 !! B. Decharme 06/2009 limitation of Ri
52 !! B. Decharme 09/2012 Bug in Ri calculation and limitation of Ri in surface_ri.F90
53 !! B. Decharme 06/2013 bug in z0 (output) computation
54 !! J.Escobar 06/2013 for REAL4/8 add EPSILON management
55 !! C. Lebeaupin 03/2014 bug if PTA=PSST and PEXNA=PEXNS: set a minimum value
56 !! add abort if no convergence
57 !-------------------------------------------------------------------------------
58 !
59 !* 0. DECLARATIONS
60 ! ------------
61 !
62 !
63 USE modd_seaflux_n, ONLY : seaflux_t
64 !
65 USE modd_csts, ONLY : xkarman, xg, xstefan, xrd, xrv, xpi, &
66  xlvtt, xcl, xcpd, xcpv, xrholw, xtt, &
67  xp00
68 USE modd_surf_atm, ONLY : xvz0cm
69 !
72 !
73 USE modi_surface_ri
74 USE modi_wind_threshold
76 !
77 USE mode_thermos
78 !
79 !
80 USE modi_abor1_sfx
81 !
82 !
83 USE yomhook ,ONLY : lhook, dr_hook
84 USE parkind1 ,ONLY : jprb
85 !
86 IMPLICIT NONE
87 !
88 !* 0.1 declarations of arguments
89 !
90 !
91 !
92 TYPE(seaflux_t), INTENT(INOUT) :: S
93 !
94 REAL, DIMENSION(:), INTENT(IN) :: PTA ! air temperature at atm. level (K)
95 REAL, DIMENSION(:), INTENT(IN) :: PQA ! air humidity at atm. level (kg/kg)
96 REAL, DIMENSION(:), INTENT(IN) :: PEXNA ! Exner function at atm. level
97 REAL, DIMENSION(:), INTENT(IN) :: PRHOA ! air density at atm. level
98 REAL, DIMENSION(:), INTENT(IN) :: PVMOD ! module of wind at atm. wind level (m/s)
99 REAL, DIMENSION(:), INTENT(IN) :: PZREF ! atm. level for temp. and humidity (m)
100 REAL, DIMENSION(:), INTENT(IN) :: PUREF ! atm. level for wind (m)
101 REAL, DIMENSION(:), INTENT(IN) :: PSST ! Sea Surface Temperature (K)
102 REAL, DIMENSION(:), INTENT(IN) :: PEXNS ! Exner function at sea surface
103 REAL, DIMENSION(:), INTENT(IN) :: PPS ! air pressure at sea surface (Pa)
104 REAL, DIMENSION(:), INTENT(IN) :: PRAIN !precipitation rate (kg/s/m2)
105 !
106 REAL, DIMENSION(:), INTENT(INOUT) :: PZ0SEA! roughness length over the ocean
107 !
108 ! surface fluxes : latent heat, sensible heat, friction fluxes
109 REAL, DIMENSION(:), INTENT(OUT) :: PSFTH ! heat flux (W/m2)
110 REAL, DIMENSION(:), INTENT(OUT) :: PSFTQ ! water flux (kg/m2/s)
111 REAL, DIMENSION(:), INTENT(OUT) :: PUSTAR! friction velocity (m/s)
112 !
113 ! diagnostics
114 REAL, DIMENSION(:), INTENT(OUT) :: PQSAT ! humidity at saturation
115 REAL, DIMENSION(:), INTENT(OUT) :: PCD ! heat drag coefficient
116 REAL, DIMENSION(:), INTENT(OUT) :: PCDN ! momentum drag coefficient
117 REAL, DIMENSION(:), INTENT(OUT) :: PCH ! neutral momentum drag coefficient
118 REAL, DIMENSION(:), INTENT(OUT) :: PCE !transfer coef. for latent heat flux
119 REAL, DIMENSION(:), INTENT(OUT) :: PRI ! Richardson number
120 REAL, DIMENSION(:), INTENT(OUT) :: PRESA ! aerodynamical resistance
121 REAL, DIMENSION(:), INTENT(OUT) :: PZ0HSEA ! heat roughness length
122 !
123 !
124 !* 0.2 declarations of local variables
125 !
126 REAL, DIMENSION(SIZE(PTA)) :: ZVMOD ! wind intensity
127 REAL, DIMENSION(SIZE(PTA)) :: ZPA ! Pressure at atm. level
128 REAL, DIMENSION(SIZE(PTA)) :: ZTA ! Temperature at atm. level
129 REAL, DIMENSION(SIZE(PTA)) :: ZQASAT ! specific humidity at saturation at atm. level (kg/kg)
130 !
131 REAL, DIMENSION(SIZE(PTA)) :: ZO ! rougness length ref
132 REAL, DIMENSION(SIZE(PTA)) :: ZWG ! gustiness factor (m/s)
133 !
134 REAL, DIMENSION(SIZE(PTA)) :: ZDU,ZDT,ZDQ,ZDUWG !differences
135 !
136 REAL, DIMENSION(SIZE(PTA)) :: ZUSR !velocity scaling parameter "ustar" (m/s) = friction velocity
137 REAL, DIMENSION(SIZE(PTA)) :: ZTSR !temperature sacling parameter "tstar" (degC)
138 REAL, DIMENSION(SIZE(PTA)) :: ZQSR !humidity scaling parameter "qstar" (kg/kg)
139 !
140 REAL, DIMENSION(SIZE(PTA)) :: ZU10,ZT10 !vertical profils (10-m height)
141 REAL, DIMENSION(SIZE(PTA)) :: ZVISA !kinematic viscosity of dry air
142 REAL, DIMENSION(SIZE(PTA)) :: ZO10,ZOT10 !roughness length at 10m
143 REAL, DIMENSION(SIZE(PTA)) :: ZCD,ZCT,ZCC
144 REAL, DIMENSION(SIZE(PTA)) :: ZCD10,ZCT10 !transfer coef. at 10m
145 REAL, DIMENSION(SIZE(PTA)) :: ZRIBU,ZRIBCU
146 REAL, DIMENSION(SIZE(PTA)) :: ZETU,ZL10
147 !
148 REAL, DIMENSION(SIZE(PTA)) :: ZCHARN !Charnock number depends on wind module
149 REAL, DIMENSION(SIZE(PTA)) :: ZTWAVE,ZHWAVE,ZCWAVE,ZLWAVE !to compute gravity waves' impact
150 !
151 REAL, DIMENSION(SIZE(PTA)) :: ZZL,ZZTL!,ZZQL !Obukhovs stability
152  !param. z/l for u,T,q
153 REAL, DIMENSION(SIZE(PTA)) :: ZRR
154 REAL, DIMENSION(SIZE(PTA)) :: ZOT,ZOQ !rougness length ref
155 REAL, DIMENSION(SIZE(PTA)) :: ZPUZ,ZPTZ,ZPQZ !PHI funct. for u,T,q
156 !
157 REAL, DIMENSION(SIZE(PTA)) :: ZBF !constants to compute gustiness factor
158 !
159 REAL, DIMENSION(SIZE(PTA)) :: ZTAU !momentum flux (W/m2)
160 REAL, DIMENSION(SIZE(PTA)) :: ZHF !sensible heat flux (W/m2)
161 REAL, DIMENSION(SIZE(PTA)) :: ZEF !latent heat flux (W/m2)
162 REAL, DIMENSION(SIZE(PTA)) :: ZWBAR !diag for webb correction but not used here after
163 REAL, DIMENSION(SIZE(PTA)) :: ZTAUR !momentum flux due to rain (W/m2)
164 REAL, DIMENSION(SIZE(PTA)) :: ZRF !sensible heat flux due to rain (W/m2)
165 REAL, DIMENSION(SIZE(PTA)) :: ZCHN,ZCEN !neutral coef. for heat and vapor
166 !
167 REAL, DIMENSION(SIZE(PTA)) :: ZLV !latent heat constant
168 !
169 REAL, DIMENSION(SIZE(PTA)) :: ZTAC,ZDQSDT,ZDTMP,ZDWAT,ZALFAC ! for precipitation impact
170 REAL, DIMENSION(SIZE(PTA)) :: ZXLR ! vaporisation heat at a given temperature
171 REAL, DIMENSION(SIZE(PTA)) :: ZCPLW ! specific heat for water at a given temperature
172 !
173 REAL, DIMENSION(SIZE(PTA)) :: ZUSTAR2 ! square of friction velocity
174 !
175 REAL, DIMENSION(SIZE(PTA)) :: ZDIRCOSZW! orography slope cosine (=1 on water!)
176 REAL, DIMENSION(SIZE(PTA)) :: ZAC ! Aerodynamical conductance
177 !
178 !
179 INTEGER, DIMENSION(SIZE(PTA)) :: ITERMAX ! maximum number of iterations
180 !
181 REAL :: ZRVSRDM1,ZRDSRV,ZR2 ! thermodynamic constants
182 REAL :: ZBETAGUST !gustiness factor
183 REAL :: ZZBL !atm. boundary layer depth (m)
184 REAL :: ZVISW !m2/s kinematic viscosity of water
185 REAL :: ZS !height of rougness length ref
186 REAL :: ZCH10 !transfer coef. at 10m
187 !
188 INTEGER :: J, JLOOP !loop indice
189 REAL(KIND=JPRB) :: ZHOOK_HANDLE
190 !
191 !-------------------------------------------------------------------------------
192 !
193 ! 1. Initializations
194 ! ---------------
195 !
196 ! 1.1 Constants and parameters
197 !
198 IF (lhook) CALL dr_hook('COARE30_FLUX',0,zhook_handle)
199 !
200 zrvsrdm1 = xrv/xrd-1. ! 0.607766
201 zrdsrv = xrd/xrv ! 0.62198
202 zr2 = 1.-zrdsrv ! pas utilisé dans cette routine
203 zbetagust = 1.2 ! value based on TOGA-COARE experiment
204 zzbl = 600. ! Set a default value for boundary layer depth
205 zs = 10. ! Standard heigth =10m
206 zch10 = 0.00115
207 !
208 zvisw = 1.e-6
209 !
210 ! 1.2 Array initialization by undefined values
211 !
212 psfth(:)=xundef
213 psftq(:)=xundef
214 pustar(:)=xundef
215 !
216 pcd(:) = xundef
217 pcdn(:) = xundef
218 pch(:) = xundef
219 pce(:) =xundef
220 pri(:) = xundef
221 !
222 presa(:)=xundef
223 !
224 !-------------------------------------------------------------------------------
225 ! 2. INITIAL GUESS FOR THE ITERATIVE METHOD
226 ! -------------------------------------
227 !
228 ! 2.0 Temperature
229 !
230 ! Set a non-zero value for the temperature gradient
231 !
232 WHERE((pta(:)*pexns(:)/pexna(:)-psst(:))==0.)
233  zta(:)=pta(:)-1e-3
234 ELSEWHERE
235  zta(:)=pta(:)
236 ENDWHERE
237 
238 ! 2.1 Wind and humidity
239 !
240 ! Sea surface specific humidity
241 !
242 pqsat(:)=qsat_seawater(psst(:),pps(:))
243 !
244 ! Set a minimum value to wind
245 !
246 zvmod(:) = wind_threshold(pvmod(:),puref(:))
247 !
248 ! Specific humidity at saturation at the atm. level
249 !
250 zpa(:) = xp00* (pexna(:)**(xcpd/xrd))
251 zqasat(:) = qsat(zta(:),zpa(:))
252 !
253 !
254 zo(:) = 0.0001
255 zwg(:) = 0.
256 IF (s%LPWG) zwg(:) = 0.5
257 !
258 zcharn(:) = 0.011
259 !
260 DO j=1,SIZE(pta)
261  !
262  ! 2.2 initial guess
263  !
264  zdu(j) = zvmod(j) !wind speed difference with surface current(=0) (m/s)
265  !initial guess for gustiness factor
266  zdt(j) = -(zta(j)/pexna(j)) + (psst(j)/pexns(j)) !potential temperature difference
267  zdq(j) = pqsat(j)-pqa(j) !specific humidity difference
268  !
269  zduwg(j) = sqrt(zdu(j)**2+zwg(j)**2) !wind speed difference including gustiness ZWG
270  !
271  ! 2.3 initialization of neutral coefficients
272  !
273  zu10(j) = zduwg(j)*log(zs/zo(j))/log(puref(j)/zo(j))
274  zusr(j) = 0.035*zu10(j)
275  zvisa(j) = 1.326e-5*(1.+6.542e-3*(zta(j)-xtt)+&
276  8.301e-6*(zta(j)-xtt)**2-4.84e-9*(zta(j)-xtt)**3) !Andrea (1989) CRREL Rep. 89-11
277  !
278  zo10(j) = zcharn(j)*zusr(j)*zusr(j)/xg+0.11*zvisa(j)/zusr(j)
279  zcd(j) = (xkarman/log(puref(j)/zo10(j)))**2 !drag coefficient
280  zcd10(j)= (xkarman/log(zs/zo10(j)))**2
281  zct10(j)= zch10/sqrt(zcd10(j))
282  zot10(j)= zs/exp(xkarman/zct10(j))
283  !
284  !-------------------------------------------------------------------------------
285  ! Grachev and Fairall (JAM, 1997)
286  zct(j) = xkarman/log(pzref(j)/zot10(j)) !temperature transfer coefficient
287  zcc(j) = xkarman*zct(j)/zcd(j) !z/L vs Rib linear coef.
288  !
289  zribcu(j) = -puref(j)/(zzbl*0.004*zbetagust**3) !saturation or plateau Rib
290  !ZRIBU(J) =-XG*PUREF(J)*(ZDT(J)+ZRVSRDM1*(ZTA(J)-XTT)*ZDQ)/&
291  ! &((ZTA(J)-XTT)*ZDUWG(J)**2)
292  zribu(j) = -xg*puref(j)*(zdt(j)+zrvsrdm1*zta(j)*zdq(j))/&
293  (zta(j)*zduwg(j)**2)
294  !
295  IF (zribu(j)<0.) THEN
296  zetu(j) = zcc(j)*zribu(j)/(1.+zribu(j)/zribcu(j)) !Unstable G and F
297  ELSE
298  zetu(j) = zcc(j)*zribu(j)/(1.+27./9.*zribu(j)/zcc(j))!Stable
299  ENDIF
300  !
301  zl10(j) = puref(j)/zetu(j) !MO length
302  !
303 ENDDO
304 !
305 ! First guess M-O stability dependent scaling params. (u*,T*,q*) to estimate ZO and z/L (ZZL)
306 zusr(:) = zduwg(:)*xkarman/(log(puref(:)/zo10(:))-psifctu(puref(:)/zl10(:)))
307 ztsr(:) = -zdt(:)*xkarman/(log(pzref(:)/zot10(:))-psifctt(pzref(:)/zl10(:)))
308 zqsr(:) = -zdq(:)*xkarman/(log(pzref(:)/zot10(:))-psifctt(pzref(:)/zl10(:)))
309 !
310 zzl(:) = 0.0
311 !
312 DO j=1,SIZE(pta)
313  !
314  IF (zetu(j)>50.) THEN
315  itermax(j) = 1
316  ELSE
317  itermax(j) = 3 !number of iterations
318  ENDIF
319  !
320  !then modify Charnork for high wind speeds Chris Fairall's data
321  IF (zduwg(j)>10.) zcharn(j) = 0.011 + (0.018-0.011)*(zduwg(j)-10.)/(18.-10.)
322  IF (zduwg(j)>18.) zcharn(j) = 0.018
323  !
324  ! 3. ITERATIVE LOOP TO COMPUTE USR, TSR, QSR
325  ! -------------------------------------------
326  !
327  zhwave(j) = 0.018*zvmod(j)*zvmod(j)*(1.+0.015*zvmod(j))
328  ztwave(j) = 0.729*zvmod(j)
329  zcwave(j) = xg*ztwave(j)/(2.*xpi)
330  zlwave(j) = ztwave(j)*zcwave(j)
331  !
332 ENDDO
333 !
334 
335 !
336 DO jloop=1,maxval(itermax) ! begin of iterative loop
337  !
338  DO j=1,SIZE(pta)
339  !
340  IF (jloop.GT.itermax(j)) cycle
341  !
342  IF (s%NGRVWAVES==0) THEN
343  zo(j) = zcharn(j)*zusr(j)*zusr(j)/xg + 0.11*zvisa(j)/zusr(j) !Smith 1988
344  ELSE IF (s%NGRVWAVES==1) THEN
345  zo(j) = (50./(2.*xpi))*zlwave(j)*(zusr(j)/zcwave(j))**4.5 &
346  + 0.11*zvisa(j)/zusr(j) !Oost et al. 2002
347  ELSE IF (s%NGRVWAVES==2) THEN
348  zo(j) = 1200.*zhwave(j)*(zhwave(j)/zlwave(j))**4.5 &
349  + 0.11*zvisa(j)/zusr(j) !Taulor and Yelland 2001
350  ENDIF
351  !
352  zrr(j) = zo(j)*zusr(j)/zvisa(j)
353  zoq(j) = min(1.15e-4 , 5.5e-5/zrr(j)**0.6)
354  zot(j) = zoq(j)
355  !
356  zzl(j) = xkarman * xg * puref(j) * &
357  ( ztsr(j)*(1.+zrvsrdm1*pqa(j)) + zrvsrdm1*zta(j)*zqsr(j) ) / &
358  ( zta(j)*zusr(j)*zusr(j)*(1.+zrvsrdm1*pqa(j)) )
359  zztl(j)= zzl(j)*pzref(j)/puref(j) ! for T
360 ! ZZQL(J)=ZZL(J)*PZREF(J)/PUREF(J) ! for Q
361  ENDDO
362  !
363  zpuz(:) = psifctu(zzl(:))
364  zptz(:) = psifctt(zztl(:))
365  !
366  DO j=1,SIZE(pta)
367  !
368  ! ZPQZ(J)=PSIFCTT(ZZQL(J))
369  zpqz(j) = zptz(j)
370  !
371  ! 3.1 scale parameters
372  !
373  zusr(j) = zduwg(j)*xkarman/(log(puref(j)/zo(j)) -zpuz(j))
374  ztsr(j) = -zdt(j) *xkarman/(log(pzref(j)/zot(j))-zptz(j))
375  zqsr(j) = -zdq(j) *xkarman/(log(pzref(j)/zoq(j))-zpqz(j))
376  !
377  ! 3.2 Gustiness factor (ZWG)
378  !
379  IF(s%LPWG) THEN
380  zbf(j) = -xg/zta(j)*zusr(j)*(ztsr(j)+zrvsrdm1*zta(j)*zqsr(j))
381  IF (zbf(j)>0.) THEN
382  zwg(j) = zbetagust*(zbf(j)*zzbl)**(1./3.)
383  ELSE
384  zwg(j) = 0.2
385  ENDIF
386  ENDIF
387  zduwg(j) = sqrt(zvmod(j)**2 + zwg(j)**2)
388  !
389  ENDDO
390  !
391 ENDDO
392 !-------------------------------------------------------------------------------
393 !
394 ! 4. COMPUTE transfer coefficients PCD, PCH, ZCE and SURFACE FLUXES
395 ! --------------------------------------------------------------
396 !
397 ztau(:) = xundef
398 zhf(:) = xundef
399 zef(:) = xundef
400 !
401 zwbar(:) = 0.
402 ztaur(:) = 0.
403 zrf(:) = 0.
404 !
405 DO j=1,SIZE(pta)
406  !
407  !
408  ! 4. transfert coefficients PCD, PCH and PCE
409  ! and neutral PCDN, ZCHN, ZCEN
410  !
411  pcd(j) = (zusr(j)/zduwg(j))**2.
412  pch(j) = zusr(j)*ztsr(j)/(zduwg(j)*(zta(j)*pexns(j)/pexna(j)-psst(j)))
413  pce(j) = zusr(j)*zqsr(j)/(zduwg(j)*(pqa(j)-pqsat(j)))
414  !
415  pcdn(j) = (xkarman/log(zs/zo(j)))**2.
416  zchn(j) = (xkarman/log(zs/zo(j)))*(xkarman/log(zs/zot(j)))
417  zcen(j) = (xkarman/log(zs/zo(j)))*(xkarman/log(zs/zoq(j)))
418  !
419  zlv(j) = xlvtt + (xcpv-xcl)*(psst(j)-xtt)
420  !
421  ! 4. 2 surface fluxes
422  !
423  IF (abs(pcdn(j))>1.e-2) THEN !!!! secure COARE3.0 CODE
424  write(*,*) 'pb PCDN in COARE30: ',pcdn(j)
425  write(*,*) 'point: ',j,"/",SIZE(pta)
426  write(*,*) 'roughness: ', zo(j)
427  write(*,*) 'ustar: ',zusr(j)
428  write(*,*) 'wind: ',zduwg(j)
429  CALL abor1_sfx('COARE30: PCDN too large -> no convergence')
430  ELSE
431  ztsr(j) = -ztsr(j)
432  zqsr(j) = -zqsr(j)
433  ztau(j) = -prhoa(j)*zusr(j)*zusr(j)*zvmod(j)/zduwg(j)
434  zhf(j) = prhoa(j)*xcpd*zusr(j)*ztsr(j)
435  zef(j) = prhoa(j)*zlv(j)*zusr(j)*zqsr(j)
436  !
437  ! 4.3 Contributions to surface fluxes due to rainfall
438  !
439  ! SB: a priori, le facteur ZRDSRV=XRD/XRV est introduit pour
440  ! adapter la formule de Clausius-Clapeyron (pour l'air
441  ! sec) au cas humide.
442  IF (s%LPRECIP) THEN
443  !
444  ! heat surface fluxes
445  !
446  ztac(j) = zta(j)-xtt
447  !
448  zxlr(j) = xlvtt + (xcpv-xcl)* ztac(j) ! latent heat of rain vaporization
449  zdqsdt(j)= zqasat(j) * zxlr(j) / (xrd*zta(j)**2) ! Clausius-Clapeyron relation
450  zdtmp(j) = (1.0 + 3.309e-3*ztac(j) -1.44e-6*ztac(j)*ztac(j)) * & !heat diffusivity
451  0.02411 / (prhoa(j)*xcpd)
452  !
453  zdwat(j) = 2.11e-5 * (xp00/zpa(j)) * (zta(j)/xtt)**1.94 ! water vapour diffusivity from eq (13.3)
454  ! ! of Pruppacher and Klett (1978)
455  zalfac(j)= 1.0 / (1.0 + & ! Eq.11 in GoF95
456  zrdsrv*zdqsdt(j)*zxlr(j)*zdwat(j)/(zdtmp(j)*xcpd)) ! ZALFAC=wet-bulb factor (sans dim)
457  zcplw(j) = 4224.8482 + ztac(j) * &
458  ( -4.707 + ztac(j) * &
459  (0.08499 + ztac(j) * &
460  (1.2826e-3 + ztac(j) * &
461  (4.7884e-5 - 2.0027e-6* ztac(j))))) ! specific heat
462  !
463  zrf(j) = prain(j) * zcplw(j) * zalfac(j) * & !Eq.12 in GoF95 !SIGNE?
464  (psst(j) - zta(j) + (pqsat(j)-pqa(j))*zxlr(j)/xcpd )
465  !
466  ! Momentum flux due to rainfall
467  !
468  ztaur(j)=-0.85*(prain(j) *zvmod(j)) !pp3752 in FBR96
469  !
470  ENDIF
471  !
472  ! 4.4 Webb correction to latent heat flux
473  !
474  zwbar(j)=- (1./zrdsrv)*zusr(j)*zqsr(j) / (1.0+(1./zrdsrv)*pqa(j)) &
475  - zusr(j)*ztsr(j)/zta(j) ! Eq.21*rhoa in FBR96
476  !
477  ! 4.5 friction velocity which contains correction du to rain
478  !
479  zustar2(j)= - (ztau(j) + ztaur(j)) / prhoa(j)
480  pustar(j) = sqrt(zustar2(j))
481  !
482  ! 4.6 Total surface fluxes
483  !
484  psfth(j) = zhf(j) + zrf(j)
485  psftq(j) = zef(j) / zlv(j)
486  !
487  ENDIF
488 ENDDO
489 !-------------------------------------------------------------------------------
490 !
491 ! 5. FINAL STEP : TOTAL SURFACE FLUXES AND DERIVED DIAGNOSTICS
492 ! -----------
493 ! 5.1 Richardson number
494 !
495 !
496 zdircoszw(:) = 1.
497  CALL surface_ri(psst,pqsat,pexns,pexna,zta,zqasat,&
498  pzref,puref,zdircoszw,pvmod,pri )
499 !
500 ! 5.2 Aerodynamical conductance and resistance
501 !
502 zac(:) = pch(:)*zvmod(:)
503 presa(:) = 1. / max(zac(:),xsurf_epsilon)
504 !
505 ! 5.3 Z0 and Z0H over sea
506 !
507 pz0sea(:) = zcharn(:) * zustar2(:) / xg + xvz0cm * pcd(:) / pcdn(:)
508 !
509 pz0hsea(:) = pz0sea(:)
510 !
511 IF (lhook) CALL dr_hook('COARE30_FLUX',1,zhook_handle)
512 !
513 !-------------------------------------------------------------------------------
514 !
515 END SUBROUTINE coare30_flux
real, save xcpd
Definition: modd_csts.F90:63
real function, dimension(size(pwind)) wind_threshold(PWIND, PUREF)
subroutine surface_ri(PTG, PQS, PEXNS, PEXNA, PTA, PQA, PZREF, PUREF, PDIRCOSZW, PVMOD, PRI)
Definition: surface_ri.F90:8
real, save xstefan
Definition: modd_csts.F90:59
real, save xlvtt
Definition: modd_csts.F90:70
real, save xpi
Definition: modd_csts.F90:43
real, save xkarman
Definition: modd_csts.F90:48
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:7
real, parameter xundef
real, save xrd
Definition: modd_csts.F90:62
real, save xg
Definition: modd_csts.F90:55
integer, parameter jprb
Definition: parkind1.F90:32
real, parameter xsurf_epsilon
real, save xrv
Definition: modd_csts.F90:62
real, save xcpv
Definition: modd_csts.F90:63
real, save xcl
Definition: modd_csts.F90:65
logical lhook
Definition: yomhook.F90:15
real, save xrholw
Definition: modd_csts.F90:64
real, save xtt
Definition: modd_csts.F90:66
real, save xp00
Definition: modd_csts.F90:57
subroutine coare30_flux(S, PZ0SEA, PTA, PEXNA, PRHOA, PSST, PEXNS, PQA, PVMOD, PZREF, PUREF, PPS, PQSAT, PSFTH, PSFTQ, PUSTAR, PCD, PCDN, PCH, PCE, PRI, PRESA, PRAIN, PZ0HSEA)
Definition: coare30_flux.F90:9