Changeset 3527 for trunk/LMDZ.COMMON/libf/evolution/NS_fast_subs_mars.F90
- Timestamp:
- Nov 20, 2024, 3:53:19 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/NS_fast_subs_mars.F90
r3526 r3527 1 module thermalmodelparam_mars 1 MODULE fast_subs_mars 2 3 implicit none 4 2 5 ! parameters for thermal model 3 6 ! they are only used in the subroutines below … … 8 11 real(8), parameter :: emiss0 = 1. ! emissivity of dry surface 9 12 integer, parameter :: EQUILTIME =15 ! [Mars years] 10 end module thermalmodelparam_mars 11 12 13 14 integer, parameter :: NMAX = 1000 15 16 CONTAINS 13 17 !***************************************************** 14 18 ! Subroutines for fast method … … 25 29 ! latitude [degree] 26 30 !************************************************************************* 27 use miscparameters, only : d2r, NMAX, icedensity28 use allinterfaces, except_this_one => icelayer_mars31 use ice_table_mod, only: rho_ice 32 use fast_subs_univ, only: icechanges 29 33 !use omp_lib 30 34 implicit none … … 53 57 Diff = 4e-4*600./p0(k) 54 58 fracIR = 0.04*p0(k)/600.; fracDust = 0.02*p0(k)/600. 55 B = Diff*bigstep*86400.*365.24/(porosity*icedensity) 59 B = Diff*bigstep*86400.*365.24/(porosity*927.) 60 !B = Diff*bigstep*86400.*365.24/(porosity*rho_ice(Tb(),'h2o')) 56 61 57 62 typeT = -9 … … 140 145 ! Tb>0 initializes temperatures with Tb 141 146 !*********************************************************************** 142 use miscparameters 143 use thermalmodelparam_mars 144 use allinterfaces, except_this_one => ajsub_mars 147 use fast_subs_univ, only: depths_avmeth, equildepth 148 use constants_marspem_mod, only: sols_per_my, sec_per_sol 145 149 implicit none 146 150 integer, intent(IN) :: nz, typeT … … 166 170 real(8) Tsurf, Tco2frost, albedo, Fsurf, m, dE, emiss, T(NMAX) 167 171 real(8) Told(nz), Fsurfold, Tsurfold, Tmean0, avrho2 168 real(8) rhosatav0, rhosatav(nz), rlow 169 real(8), external :: psv, tfrostco2 172 real(8) rhosatav0, rhosatav(nz), rlow 170 173 171 tmax = EQUILTIME*sols peryear174 tmax = EQUILTIME*sols_per_my 172 175 nsteps = int(tmax/dt) ! calculate total number of timesteps 173 176 … … 207 210 do n=0,nsteps-1 208 211 time = (n+1)*dt ! time at n+1 209 tdays = time*(marsDay/earthDay) ! parenthesis may improve roundoff212 ! tdays = time*(sec_per_sol/earthDay) ! parenthesis may improve roundoff 210 213 ! call generalorbit(tdays,a,ecc,omega,eps,marsLs,marsDec,marsR) 211 214 ! HA = 2.*pi*mod(time,1.d0) ! hour angle … … 217 220 Told(1:nz) = T(1:nz) 218 221 if (m<=0. .or. Tsurf>Tco2frost) then 219 ! call conductionQ(nz,z,dt* marsDay,Qn,Qnp1,T,ti,rhocv,emiss, &222 ! call conductionQ(nz,z,dt*sec_per_sol,Qn,Qnp1,T,ti,rhocv,emiss, & 220 223 ! & Tsurf,Fgeotherm,Fsurf) 221 224 endif 222 225 if (Tsurf<Tco2frost .or. m>0.) then ! CO2 condensation 223 226 T(1:nz) = Told(1:nz) 224 !call conductionT(nz,z,dt* marsDay,T,Tsurfold,Tco2frost,ti, &227 !call conductionT(nz,z,dt*sec_per_sol,T,Tsurfold,Tco2frost,ti, & 225 228 !& rhocv,Fgeotherm,Fsurf) 226 229 Tsurf = Tco2frost 227 230 ! dE = (- Qn - Qnp1 + Fsurfold + Fsurf + & 228 231 ! & emiss*sigSB*(Tsurfold**4+Tsurf**4)/2. 229 m = m + dt* marsDay*dE/Lco2frost232 m = m + dt*sec_per_sol*dE/Lco2frost 230 233 endif 231 234 if (Tsurf>Tco2frost .or. m<=0.) then … … 238 241 !Qn=Qnp1 239 242 240 if (time>=tmax-sols peryear) then243 if (time>=tmax-sols_per_my) then 241 244 Tmean1 = Tmean1 + Tsurf 242 245 Tmean3 = Tmean3 + T(nz) … … 301 304 tfrostco2 = 3182.48/(23.3494+log(100./p)) 302 305 end function 306 307 !======================================================================= 308 309 real*8 function psv(T) 310 ! saturation vapor pressure of H2O ice [Pascal] 311 ! input is temperature [Kelvin] 312 implicit none 313 real*8 T 314 315 !-----parametrization 1 316 ! real*8 DHmelt,DHvap,DHsub,R,pt,Tt,C 317 ! parameter (DHmelt=6008.,DHvap=45050.) 318 ! parameter (DHsub=DHmelt+DHvap) ! sublimation enthalpy [J/mol] 319 ! parameter (R=8.314,pt=6.11e2,Tt=273.16) 320 ! C = (DHsub/R)*(1./T - 1./Tt) 321 ! psv = pt*exp(-C) 322 323 !-----parametrization 2 324 ! eq. (2) in Murphy & Koop, Q. J. R. Meteor. Soc. 131, 1539 (2005) 325 ! differs from parametrization 1 by only 0.1% 326 real*8 A,B 327 parameter (A=-6143.7, B=28.9074) 328 psv = exp(A/T+B) ! Clapeyron 329 330 !-----parametrization 3 331 ! eq. (7) in Murphy & Koop, Q. J. R. Meteor. Soc. 131, 1539 (2005) 332 ! psv = exp(9.550426 - 5723.265/T + 3.53068*log(T) - 0.00728332*T) 333 334 end function psv 335 336 END MODULE fast_subs_mars
Note: See TracChangeset
for help on using the changeset viewer.