Changeset 5060 for LMDZ6/trunk/libf/phylmd/coare_cp.F90
- Timestamp:
- Jul 16, 2024, 4:57:48 PM (2 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/coare_cp.F90
r4722 r5060 1 real function psit_30(zet) 2 3 real, intent(in) :: zet 4 5 if(zet<0) then 6 x=(1.-(15*zet))**.5 7 psik=2*log((1+x)/2) 8 x=(1.-(34.15*zet))**.3333 9 psic=1.5*log((1.+x+x*x)/3.)-sqrt(3.)*atan((1.+2.*x)/sqrt(3.))+4.*atan(1.)/sqrt(3.) 10 f=zet*zet/(1+zet*zet) 11 psit_30=(1-f)*psik+f*psic 12 13 else 14 c=min(50.,.35*zet) 15 psit_30=-((1.+2./3.*zet)**1.5+.6667*(zet-14.28)/exp(c)+8.525) 1 module coare_cp_mod 2 implicit none 3 private 4 public psit_30, psiuo, coare_cp 5 6 contains 7 8 real function psit_30(zet) 9 implicit none 10 real, intent(in) :: zet 11 12 real :: x, psik, psic, f, c 13 14 if(zet<0) then 15 x=(1.-(15.*zet))**.5 16 psik=2.*log((1.+x)/2) 17 x=(1.-(34.15*zet))**.3333 18 psic=1.5*log((1.+x+x*x)/3.)-sqrt(3.)*atan((1.+2.*x)/sqrt(3.))+4.*atan(1.)/sqrt(3.) 19 f=zet*zet/(1.+zet*zet) 20 psit_30=(1.-f)*psik+f*psic 21 else 22 c=min(50.,.35*zet) 23 psit_30=-((1.+2./3.*zet)**1.5+.6667*(zet-14.28)/exp(c)+8.525) 24 endif 25 26 end function psit_30 27 28 real function psiuo(zet) 29 implicit none 30 real, intent(in) :: zet 31 32 real :: x, psik, psic, f, c 33 34 if (zet<0) then 35 x=(1.-15.*zet)**.25 36 psik=2.*log((1.+x)/2.)+log((1.+x*x)/2.)-2.*atan(x)+2.*atan(1.) 37 x=(1.-10.15*zet)**.3333 38 psic=1.5*log((1.+x+x*x)/3.)-sqrt(3.)*atan((1.+2.*x)/sqrt(3.))+4.*atan(1.)/sqrt(3.) 39 f=zet*zet/(1+zet*zet) 40 psiuo=(1-f)*psik+f*psic 41 else 42 c=min(50.,.35*zet) 43 psiuo=-((1.+1.0*zet)**1.0+.667*(zet-14.28)/exp(c)+8.525) 16 44 endif 17 end FUNCTION psit_30 18 19 real function psiuo(zet) 20 21 real, intent(in) :: zet 22 23 if (zet<0) then 24 25 x=(1.-15.*zet)**.25 26 psik=2.*log((1.+x)/2.)+log((1.+x*x)/2.)-2.*atan(x)+2.*atan(1.) 27 x=(1.-10.15*zet)**.3333 28 psic=1.5*log((1.+x+x*x)/3.)-sqrt(3.)*atan((1.+2.*x)/sqrt(3.))+4.*atan(1.)/sqrt(3.) 29 f=zet*zet/(1+zet*zet) 30 psiuo=(1-f)*psik+f*psic 31 else 32 c=min(50.,.35*zet) 33 psiuo=-((1+1.0*zet)**1.0+.667*(zet-14.28)/exp(c)+8.525) 34 endif 35 END FUNCTION psiuo 36 37 38 real function gen_q1(ts,p,dq) 39 40 real, intent(in) :: ts,p,dq 41 real es,qs 42 43 es = 6.112*exp(17.502*(ts-273.15)/(ts-32.18))*.98*(1.0007+3.46e-8*p) 44 qs = es*62.197/(p-37.8*es) 45 46 q1 = dq + qs 47 48 end function gen_q1 49 50 45 46 end function psiuo 51 47 52 48 … … 61 57 !version with shortened iteration modified Rt and Rq 62 58 !uses wave information wave period in s and wave ht in m 63 !no wave, standard coare 2.6 charnock: jwave=0 59 !no wave, standard coare 2.6 charnock: jwave=0 64 60 !Oost et al. zo=50/2/pi L (u*/c)**4.5 if jwave=1 65 61 !taylor and yelland zo=1200 h*(L/h)**4.5 jwave=2 … … 104 100 real old_usr, old_tsr, old_qsr,tmp 105 101 106 real, external :: psit_30, psiuo,grv102 real, external :: grv 107 103 integer i,j,k 108 104 !---------------- Rajout pour prendre en compte différent Z0 --------------------------------! … … 113 109 !--------------------------------------------------------------------------------------------- 114 110 115 Ribcu=-zu/zi/.004/Beta**3 116 cpa=1004.67 111 Ribcu=-zu/zi/.004/Beta**3 112 cpa=1004.67 117 113 118 114 t_c = t - 273.15 119 115 120 116 121 Le=(2.501-.00237*(t_c-dt))*1e6 122 123 124 visa=1.326e-5*(1+6.542e-3*(t_c)+8.301e-6*t_c**2-4.84e-9*t_c**3) 125 126 127 cpv=cpa*(1+0.84*Q) 128 rhoa=P/(Rgas*t*(1+0.61*Q)) 129 130 131 132 133 134 135 ug=.2 136 137 ut=sqrt(du*du+ug*ug) 117 Le=(2.501-.00237*(t_c-dt))*1e6 118 119 120 visa=1.326e-5*(1+6.542e-3*(t_c)+8.301e-6*t_c**2-4.84e-9*t_c**3) 121 122 123 cpv=cpa*(1+0.84*Q) 124 rhoa=P/(Rgas*t*(1+0.61*Q)) 125 126 127 128 129 130 131 ug=.2 132 133 ut=sqrt(du*du+ug*ug) 138 134 ut=MAX(ut , 0.1 * MIN(10.,zu) ) 139 135 140 u10=ut*log(10/1e-4)/log(zu/1e-4) 136 u10=ut*log(10/1e-4)/log(zu/1e-4) 141 137 usr=.035*u10 ! turbulent friction velocity (m/s), including gustiness 142 138 zom10=0.011*usr*usr/grav+0.11*visa/usr ! roughness length for u (smith 88) 143 Cd10=(von/log(10/zom10))**2 139 Cd10=(von/log(10/zom10))**2 144 140 ! zoh10=0.40*visa/usr+1.4e-5 145 ! Ch10=((von**2)/((log(10/zom10))*(log(10/zoh10)))) !ammener à devenir ca 146 Ch10=0.00115 147 Ct10=Ch10/sqrt(Cd10) 141 ! Ch10=((von**2)/((log(10/zom10))*(log(10/zoh10)))) !ammener à devenir ca 142 Ch10=0.00115 143 Ct10=Ch10/sqrt(Cd10) 148 144 zot10=10/exp(von/Ct10) ! roughness length for t 149 Cd=(von/log(zu/zom10))**2 150 Ct=von/log(zt/zot10) 151 CC=von*Ct/Cd 145 Cd=(von/log(zu/zom10))**2 146 Ct=von/log(zt/zot10) 147 CC=von*Ct/Cd 152 148 153 149 ut0 = ut … … 155 151 156 152 ut = ut0 157 Ribu=grav*zu/t*(dt+.61*t*dq)/ut**2 158 159 if (Ribu .LT. 0) then160 zetu=CC*Ribu/(1+Ribu/Ribcu) 161 else 162 zetu=CC*Ribu*(1+27/9*Ribu/CC) 153 Ribu=grav*zu/t*(dt+.61*t*dq)/ut**2 154 155 if (Ribu < 0) then 156 zetu=CC*Ribu/(1+Ribu/Ribcu) 157 else 158 zetu=CC*Ribu*(1+27/9*Ribu/CC) 163 159 endif 164 160 165 L10=zu/zetu 166 167 ! if (zetu .GT. 50) then 168 ! nits=1 161 L10=zu/zetu 162 163 ! if (zetu .GT. 50) then 164 ! nits=1 169 165 ! endif 170 166 171 167 usr=ut*von/(log(zu/zom10)-psiuo(zetu)) 172 tsr=dt*von*fdg/(log(zt/zot10)-psit_30(zt/L10)) 173 qsr=dq*von*fdg/(log(zq/zot10)-psit_30(zq/L10)) 168 tsr=dt*von*fdg/(log(zt/zot10)-psit_30(zt/L10)) 169 qsr=dq*von*fdg/(log(zq/zot10)-psit_30(zq/L10)) 174 170 ! tkt=.001 175 171 176 172 ! charnock constant - lin par morceau - constant 177 173 if ( ut <= 10. ) then 178 charn=0.011 174 charn=0.011 179 175 else 180 if (ut .GT.18) then176 if (ut > 18) then 181 177 charn=0.018 182 178 else 183 charn=0.011+(ut-10)/(18-10)*(0.018-0.011) 179 charn=0.011+(ut-10)/(18-10)*(0.018-0.011) 184 180 endif 185 181 endif … … 192 188 193 189 !*************** bulk loop ************ 194 do i=1, nits 190 do i=1, nits 195 191 196 192 zet=von*grav*zu/t*(tsr*(1+0.61*Q)+.61*t*qsr)/(usr*usr)/(1+0.61*Q) … … 200 196 ! ELSE IF (NGRVWAVES==1) THEN 201 197 ! zom = (50./(2.*pi))*ZLWAVE*(usr/ZCWAVE)**4.5 & 202 ! + 0.11*visa/usr !Oost et al. 2002 198 ! + 0.11*visa/usr !Oost et al. 2002 203 199 ! ELSE IF (NGRVWAVES==2) THEN 204 200 ! zom = 1200.*ZHWAVE*(ZHWAVE/ZLWAVE)**4.5 & 205 ! + 0.11*visa/usr !Taulor and Yelland 2001 206 ! ENDIF 207 208 zom=charn*usr*usr/grav+0.11*visa/usr 209 210 rr=zom*usr/visa 211 L=zu/zet 201 ! + 0.11*visa/usr !Taulor and Yelland 2001 202 ! ENDIF 203 204 zom=charn*usr*usr/grav+0.11*visa/usr 205 206 rr=zom*usr/visa 207 L=zu/zet 212 208 zoq=min(1.15e-4,5.5e-5/rr**.6) ! a modifier 213 209 zot=zoq ! a modifier 214 ! zot=0.40*visa/usr+1.4e-5 210 ! zot=0.40*visa/usr+1.4e-5 215 211 216 212 old_usr = usr … … 218 214 old_qsr = qsr 219 215 220 usr=ut*von/(log(zu/zom)-psiuo(zu/L)) 221 tsr=dt*von*fdg/(log(zt/zot)-psit_30(zt/L)) 222 qsr=dq*von*fdg/(log(zq/zoq)-psit_30(zq/L)) 223 224 Bf=-grav/t*usr*(tsr+.61*t*qsr) 225 226 if (Bf .GT. 0) then227 ug=Beta*(Bf*zi)**.333 228 else 229 ug=.2 216 usr=ut*von/(log(zu/zom)-psiuo(zu/L)) 217 tsr=dt*von*fdg/(log(zt/zot)-psit_30(zt/L)) 218 qsr=dq*von*fdg/(log(zq/zoq)-psit_30(zq/L)) 219 220 Bf=-grav/t*usr*(tsr+.61*t*qsr) 221 222 if (Bf > 0) then 223 ug=Beta*(Bf*zi)**.333 224 else 225 ug=.2 230 226 endif 231 227 232 ut=sqrt(du*du+ug*ug) 228 ut=sqrt(du*du+ug*ug) 233 229 ut=MAX(ut , 0.1 * MIN(10.,zu) ) 234 230 … … 237 233 238 234 ! coeffs(m1,m2,m3,m4,m5,1)=rhoa*usr*usr*du/ut !stress 239 ! coeffs(m1,m2,m3,m4,m5,2)=rhoa*cpa*usr*tsr 240 ! coeffs(m1,m2,m3,m4,m5,3)=rhoa*Le*usr*qsr 235 ! coeffs(m1,m2,m3,m4,m5,2)=rhoa*cpa*usr*tsr 236 ! coeffs(m1,m2,m3,m4,m5,3)=rhoa*Le*usr*qsr 241 237 242 238 tmp = (von/(log(zu/zom)-psiuo(zu/L)) ) * ut / du … … 249 245 rugosh = zot 250 246 251 252 247 end subroutine coare_cp 248 249 end module coare_cp_mod
Note: See TracChangeset
for help on using the changeset viewer.