[4] | 1 | subroutine flx(hi2,thsfc,tair,qair,fsens,flat,qsfc, |
---|
| 2 | & zchu1,zchu2,uair2,zref) |
---|
| 3 | ! inputs :hi2(m),thsfc(K),qsfc(kg/kg),tair(K),qair(kg/kg),uair(m/s),zref(m) |
---|
| 4 | ! outputs:fsens (W/m^2), flat (W/m^2) |
---|
| 5 | !--- Computes turbulent fluxes of sensible and latent heat (z=10m). |
---|
| 6 | !--- Based on Andreas, E.L., 1987: A Theory for the Scalar Roughness |
---|
| 7 | !--- and the Scalar Transfer Coefficients over Snow and Sea Ice, |
---|
| 8 | !--- Boundary Layer Meteorology, v.38, 159-184. |
---|
| 9 | ! |
---|
| 10 | implicit double precision (a-h,o-z) |
---|
| 11 | ! implicit real (a-h,o-z) |
---|
| 12 | integer ii |
---|
| 13 | !--- Constants: |
---|
| 14 | !real aw,cp,cw2,epsi,epss,epsw,gd,grav,hilead,pci,one |
---|
| 15 | ! real pcs,pi,qb2,qi,rd,rv,qs,qs0,rho2,rhoice,rhosf,rhosm,rhow |
---|
| 16 | ! real sigma,t0, ai2, bi, ts2, ta2 |
---|
| 17 | ! |
---|
| 18 | !real alphae,alphah2,alrs,CEN,CHN2,cte,ctf |
---|
| 19 | ! real kn,L2,lnztz0,lnzqz0,nu,psih2,psim2,psiq,uair |
---|
| 20 | ! real qair,qsfc,Ri2,Rstar,sqrtCD,tair,thsfc,uair,usave,ustar |
---|
| 21 | ! real Ri2,Rstar,sqrtCD,usave,ustar |
---|
| 22 | ! double precision tair,thsfc,uair2,hi2,qair,fsens,flat,qsfc |
---|
| 23 | ! double precision zchu1,zchu2,CH2,CE2,CD,CDN |
---|
| 24 | ! real u_data,x2,z0,zeta,zq2,zref,zt |
---|
| 25 | dimension b0t(3),b1t(3),b2t(3), b0q(3),b1q(3),b2q(3) |
---|
| 26 | real lv,kn,L2,lnztz0,lnzqz0,nu |
---|
| 27 | |
---|
| 28 | !!! include 'const.cmn' |
---|
| 29 | ! |
---|
| 30 | !--- Values of coefficients for polynomials, Table I, p.177 |
---|
| 31 | data b0t/1.250, 0.149, 0.317/ |
---|
| 32 | data b1t/0.000,-0.550,-0.565/ |
---|
| 33 | data b2t/0.000, 0.000,-0.183/ |
---|
| 34 | data b0q/1.610, 0.351, 0.396/ |
---|
| 35 | data b1q/0.000,-0.628,-0.512/ |
---|
| 36 | data b2q/0.000, 0.000,-0.180/ |
---|
| 37 | !--03/08/2001 |
---|
| 38 | uair=uair2 |
---|
| 39 | !--- Constants |
---|
| 40 | kn=0.4 |
---|
| 41 | nu=1.461e-5 |
---|
| 42 | alphah2=1.0 |
---|
| 43 | alphae=1.0 |
---|
| 44 | ai2 = 21.8746 |
---|
| 45 | bi =-265.5 |
---|
| 46 | grav = 9.81 ! gravitational acceleration (m/s2) |
---|
| 47 | lv = 2.501e+6 ! latent heat of vaporization (J/kg) |
---|
| 48 | rho2 = 1.275 ! density of dry air (kg/m3) |
---|
| 49 | cp = 1005. ! heat capacity of dry air (J/kg.K) |
---|
| 50 | zref = 10. ! (m) |
---|
| 51 | !--- cst rajoutees le 02/08/2001--- |
---|
| 52 | one = 1.d0 |
---|
| 53 | pi = 4.0 * dtan(one) |
---|
| 54 | !--- get surface sphum |
---|
| 55 | ts2=thsfc-273.16 |
---|
| 56 | qsfc = 0.622*6.11/1013.*exp(min(ai2*ts2/(ts2-bi),10.)) |
---|
| 57 | ! |
---|
| 58 | |
---|
| 59 | if(uair.le.0.) then |
---|
| 60 | fsens=0. |
---|
| 61 | flat=0. |
---|
| 62 | ctf=0. |
---|
| 63 | cte=0. |
---|
| 64 | return |
---|
| 65 | |
---|
| 66 | else if (uair.lt.0.5) then |
---|
| 67 | !TEA save value (will linearly interpolate down from 0.5 m/s) |
---|
| 68 | usave = uair |
---|
| 69 | uair = 0.5 |
---|
| 70 | else |
---|
| 71 | usave = -1. |
---|
| 72 | endif |
---|
| 73 | ! |
---|
| 74 | Ri2=grav*zref*(tair-thsfc)/(tair*uair*uair) |
---|
| 75 | ! |
---|
| 76 | !--- Thickness dependent roughness length (Guest & Davidson 1991 JGR) |
---|
| 77 | if(hi2.lt.0.01) then |
---|
| 78 | z0=8.0e-4 |
---|
| 79 | elseif(hi2.ge.0.01.and.hi2.le.0.10) then |
---|
| 80 | z0=4.5e-4 |
---|
| 81 | elseif(hi2.gt.0.10.and.hi2.le.0.30) then |
---|
| 82 | z0=2.4e-3 |
---|
| 83 | elseif(hi2.gt.0.30.and.hi2.le.2.00) then |
---|
| 84 | z0=1.3e-3 |
---|
| 85 | elseif(hi2.gt.2.00) then |
---|
| 86 | z0=2.0e-3 |
---|
| 87 | endif |
---|
| 88 | ! |
---|
| 89 | !--- Using reference height of 10 m, get u* from uair and z0 using (1) |
---|
| 90 | ! |
---|
| 91 | ustar = uair * kn / dlog(zref/z0) |
---|
| 92 | ! |
---|
| 93 | !--- Get roughness Reynolds number R* = u* z0 / v (p.163) |
---|
| 94 | ! |
---|
| 95 | Rstar = ustar * z0 / nu |
---|
| 96 | ! |
---|
| 97 | !--- Get ln(zT/z0) and ln(zQ/z0) from (53) and Table I Andreas (p.177) |
---|
| 98 | ! |
---|
| 99 | if(Rstar.le.0.135) then |
---|
| 100 | ii=1 |
---|
| 101 | elseif(Rstar.gt.0.135.and.Rstar.lt.2.5) then |
---|
| 102 | ii=2 |
---|
| 103 | elseif(Rstar.ge.2.5) then |
---|
| 104 | ii=3 |
---|
| 105 | endif |
---|
| 106 | |
---|
| 107 | alrs=dlog(Rstar) |
---|
| 108 | lnztz0 = b0t(ii) + b1t(ii)*alrs + b2t(ii)*alrs*alrs |
---|
| 109 | lnzqz0 = b0q(ii) + b1q(ii)*alrs + b2q(ii)*alrs*alrs |
---|
| 110 | zt = z0*exp(lnztz0) ! Roughness length for temperature |
---|
| 111 | zq2 = z0*exp(lnzqz0) ! Roughness length for q |
---|
| 112 | |
---|
| 113 | ! |
---|
| 114 | !--- Get neutral drag coefficient CD from (10) Andreas p. 162 |
---|
| 115 | ! |
---|
| 116 | CDN = kn**2 / (dlog(zref/z0))**2 |
---|
| 117 | ! |
---|
| 118 | !--- Get neutral CH2 and CE2 from (11), (12) using alphah2=alphae=1.0 |
---|
| 119 | !(p.162) |
---|
| 120 | ! |
---|
| 121 | sqrtCD = CDN**0.5 |
---|
| 122 | CHN2 = alphah2*kn*sqrtCD / (kn/sqrtCD - lnztz0) |
---|
| 123 | CEN = alphae*kn*sqrtCD / (kn/sqrtCD - lnzqz0) |
---|
| 124 | ! |
---|
| 125 | !--- Correct for stability dependence |
---|
| 126 | if(tair.eq.thsfc) then |
---|
| 127 | ! Neutral case |
---|
| 128 | CD=CDN |
---|
| 129 | CH2=CHN2 |
---|
| 130 | CE2=CEN |
---|
| 131 | go to 9 |
---|
| 132 | endif |
---|
| 133 | ! |
---|
| 134 | !--- Obukhov length (Stull 1988, eq.9.7.5k, p.386) |
---|
| 135 | L2 = ustar*tair*uair / (kn*grav*(tair-thsfc)) |
---|
| 136 | zeta = zref/L2 |
---|
| 137 | ! |
---|
| 138 | !--- Stability functions (Liu et al 1979, p.1723) become negative for |
---|
| 139 | !--- low wind speeds, now using stability parameters f(RiB) from |
---|
| 140 | !--- Louis (1979) and Louis et al. (1981) |
---|
| 141 | !--- (Note A&M and Stull use different sign conventions for psim2) |
---|
| 142 | !--- Monin-Obukhov similarity theory applied to the surface layer |
---|
| 143 | !--- works only when the winds are NOT calm and u* is not zero |
---|
| 144 | ! |
---|
| 145 | if(Ri2.gt.0.) then ! Stable surface layer case |
---|
| 146 | psim2 = -7.*zeta |
---|
| 147 | psih2 = psim2 |
---|
| 148 | psiq = psih2 |
---|
| 149 | else if(Ri2.lt.0.) then ! Unstable surface layer case |
---|
| 150 | x2=(1.-16.*zeta)**0.25 |
---|
| 151 | psim2 = 2.*dlog((1.+x2)/2.) + dlog((1.+x2*x2)/2.) - |
---|
| 152 | & 2.*dtan(x2)+ pi/2. |
---|
| 153 | psih2 = 2.*dlog((1.+x2*x2)/2.) |
---|
| 154 | psiq = psih2 |
---|
| 155 | endif |
---|
| 156 | |
---|
| 157 | ! |
---|
| 158 | !--- Get transfer coefficients from Andreas & Murphy (2.14-2.15) |
---|
| 159 | ! |
---|
| 160 | CD = kn**2 / (dlog(zref/z0)-psim2)**2 |
---|
| 161 | sqrtCD = CD**0.5 |
---|
| 162 | CH2 = alphah2*kn*sqrtCD / (kn/sqrtCD - lnztz0-(psih2-psim2)) |
---|
| 163 | CE2 = alphae*kn*sqrtCD / (kn/sqrtCD - lnzqz0-(psiq-psim2)) |
---|
| 164 | !---test 10 /08/2001 |
---|
| 165 | CH2 =0.00175 |
---|
| 166 | CE2 =0.00175 |
---|
| 167 | ! |
---|
| 168 | !--- For ECMWF or NCEP analyses, convert 10 m winds to 2 m winds |
---|
| 169 | ! |
---|
| 170 | 9 u_data = uair ! Save wind speed at 10 m |
---|
| 171 | ! |
---|
| 172 | fsens=rho2*cp*CH2*uair*(thsfc-tair) ! This line used to be numbered |
---|
| 173 | flat= rho2*lv*CE2*uair*(qsfc-qair) ! for goto 9 |
---|
| 174 | 100 format(8f15.9) |
---|
| 175 | ! |
---|
| 176 | !---03/08/2001 calcul de zrchu---- |
---|
| 177 | ! |
---|
| 178 | zchu1=rho2*cp*CH2*uair |
---|
| 179 | zchu2=rho2*lv*CE2*uair |
---|
| 180 | uair = u_data ! Return wind speed to 10 m value |
---|
| 181 | ctf=CH2 |
---|
| 182 | cte=CE2 |
---|
| 183 | ! |
---|
| 184 | !TEA linearly interpolate |
---|
| 185 | if (usave.gt.0.) then |
---|
| 186 | fsens = fsens*(usave/uair) |
---|
| 187 | flat = flat*(usave/uair) |
---|
| 188 | ctf = ctf*(usave/uair) |
---|
| 189 | cte = cte*(usave/uair) |
---|
| 190 | endif |
---|
| 191 | !--- restrict flat to non-negative values |
---|
| 192 | ! test du 10/08/2001 |
---|
| 193 | ! flat = max(flat,0.) |
---|
| 194 | return |
---|
| 195 | end |
---|