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