Changeset 2456
- Timestamp:
- Feb 16, 2021, 12:51:00 AM (4 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/co2cloud.F90
r2447 r2456 162 162 pcondicea(ngrid,nlay), & ! Rate of condensation/sublimation of co2 ice in layers 163 163 pdtcloudco2(ngrid,nlay), & ! Tendency on temperature due to latent heat 164 riceco2(ngrid,nlay), & ! Ice mass mean radius (m) r_c in Montmessin et al. (2004)165 164 rsedcloudco2(ngrid,nlay) ! Cloud sedimentation radius 166 165 … … 168 167 rdust(ngrid,nlay) ! Dust geometric mean radius (m) 169 168 169 double precision, intent(out) :: & 170 riceco2(ngrid,nlay) ! Ice mass mean radius (m) r_c in Montmessin et al. (2004) 170 171 !----------------------------------------------------------------------------------------------------------------------! 171 172 ! Local: … … 265 266 ! ---Extinction coefficients at 1 micron of CO2 particles 266 267 vrat_cld, &! Volume ratio 267 n_derf, &! derf( (rb_cldco2(1)- dlog(riceco2(ig,l))) *dev2)268 n_derf, &! derf( (rb_cldco2(1)-log(riceco2(ig,l))) *dev2) 268 269 Qtemp, &! mean value in the interval during the interpolation 269 270 ltemp1(var_dim_qext), &! abs(radv(:)-rb_cldco2(i)) … … 678 679 679 680 ! density of co2 ice 680 call density_co2_ice( ztsed(ig,l), rho_ice_co2T(ig,l))681 call density_co2_ice(dble(ztsed(ig,l)), rho_ice_co2T(ig,l)) 681 682 682 683 ! assure positive value of co2_ice mmr, ccnco2 number, ccnco2 mass … … 687 688 ! Get density cloud and co2 ice particle radius 688 689 if (Niceco2.ne.0d0) then 689 call updaterice_microco2( Niceco2, Qccnco2, Nccnco2, tauscaling(ig), riceco2(ig,l), rhocloudco2t(ig,l))690 call updaterice_microco2(dble(Niceco2), dble(Qccnco2), dble(Nccnco2), tauscaling(ig), riceco2(ig,l), rhocloudco2t(ig,l)) 690 691 else 691 692 riceco2(ig,l) = 0. … … 836 837 837 838 ! Compute particle size 838 call updaterice_microco2( Niceco2, Qccnco2, Nccnco2, tauscaling(ig), riceco2(ig,l), rhocloudco2(ig,l))839 call updaterice_microco2(dble(Niceco2), dble(Qccnco2), dble(Nccnco2), tauscaling(ig), riceco2(ig,l), rhocloudco2(ig,l)) 839 840 840 841 ! Compute opacities … … 843 844 Qext1bins2(ig,l) = 0. 844 845 else 845 n_derf = derf( (rb_cldco2(1)- dlog(riceco2(ig,l))) *dev2)846 n_derf = derf( (rb_cldco2(1)-log(riceco2(ig,l))) *dev2) 846 847 Qext1bins2(ig,l) = 0. 847 848 … … 849 850 n_aer(i) = -0.5 * Nccnco2*tauscaling(ig) * n_derf 850 851 851 n_derf = derf((rb_cldco2(i+1)- dlog(riceco2(ig,l))) *dev2)852 n_derf = derf((rb_cldco2(i+1)-log(riceco2(ig,l))) *dev2) 852 853 n_aer(i) = n_aer(i) + (0.5 * Nccnco2*tauscaling(ig) * n_derf) 853 854 -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod4micro.F90
r2447 r2456 374 374 !----------------------------------------------------------------------------------------------------------------------! 375 375 ! Available CO2 tracer in layer 1 at end of timestep (kg/m2) 376 #ifndef MESOSCALE 376 377 availco2 = pq(ig,1,igcm_co2) * ( (ap(1)-ap(2)) + (bp(1)-bp(2)) * (pplev(ig,1)/g - zcondices(ig)*ptimestep) ) 378 #else 379 availco2 = pq(ig,1,igcm_co2) 380 PRINT*, "MESOSCALE: CO2 tracer AT FIRST LEVEL IS NOT CORRECTED FROM SIGMA LEVELS" 381 #endif 377 382 if ( zcondices(ig) * ptimestep>availco2 ) then 378 383 zcondices(ig) = availco2/ptimestep … … 438 443 zmflux(1) = - zcondices(ig) - zfallice(ig) 439 444 do l = 1, nlayer 445 #ifndef MESOSCALE 440 446 zmflux(l+1) = zmflux(l) - zcondicea(ig,l) & 441 #ifndef MESOSCALE442 447 + (bp(l)-bp(l+1)) * (-pdpsrf(ig)/g) 443 448 ! zmflux set to 0 if very low to avoid: top layer is disappearing in v1ld … … 446 451 end if 447 452 #else 453 zmflux(l+1) = zmflux(l) - zcondicea(ig,l) 448 454 if (abs(zmflux(l+1))<1E-13) then 449 455 zmflux(l+1) = 0. 450 456 end if 457 PRINT*, "MESOSCALE: FLUX THROUGH SIGMA LEVELS from dPS HAVE TO BE IMPLEMENTED" 451 458 #endif 452 459 end do … … 455 462 !----------------------------------------------------------------------------------------------------------------------! 456 463 do l = 1, nlayer 464 #ifndef MESOSCALE 457 465 masse(l) = (pplev(ig,l) - pplev(ig,l+1) + (bp(l)-bp(l+1))*pdpsrf(ig)*ptimestep)/g 466 #else 467 masse(l) = (pplev(ig,l) - pplev(ig,l+1))/g 468 PRINT*, "MESOSCALE: MASS OF EACH LAYER IS NOT CORRECTED AT END OF TIMESTEP (from SIGMA LEVELS and dPS)" 469 #endif 458 470 end do 459 471 !----------------------------------------------------------------------------------------------------------------------! -
trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90
r2447 r2456 214 214 riceco2(ngrid,nlay), &! CO2 ice mean radius (m) 215 215 vrat_cld, &! Volume ratio 216 Proba, &! 1.0 - dexp(-1.*microtimestep*rate(i))217 Probah2o, &! 1.0 - dexp(-1.*microtimestep*rateh2o(i))216 Proba, &! 1.0 - exp(-1.*microtimestep*rate(i)) 217 Probah2o, &! 1.0 - exp(-1.*microtimestep*rateh2o(i)) 218 218 mtemp(nbinco2_cld), &! sum(meteor(lebon1:lebon2,ibin)) 219 219 pression_meteor(nlev_meteor), &! pressure from meteoritic flux input file … … 338 338 339 339 !T-dependant CO2 ice density 340 call density_co2_ice( zt(ig,l), rho_ice_co2T(ig,l))340 call density_co2_ice(dble(zt(ig,l)), rho_ice_co2T(ig,l)) 341 341 342 342 vo2co2 = m0co2 / dble(rho_ice_co2T(ig,l)) … … 355 355 No = zq(ig,l,igcm_dust_number) * tauscaling(ig) 356 356 357 Mo = (4./3.) * pi * rho_dust * No * rdust(ig,l)**3 * dexp(9.*nuiceco2_ref/2.)357 Mo = (4./3.) * pi * rho_dust * No * rdust(ig,l)**3 *exp(9.*nuiceco2_ref/2.) 358 358 359 359 if (No > threshold) then 360 Rn = - dlog(rdust(ig,l))360 Rn = -log(rdust(ig,l)) 361 361 362 362 Rm = Rn - 3. * sigma_iceco2 * sigma_iceco2 … … 398 398 No = zq(ig,l,igcm_ccn_number) * tauscaling(ig) + threshold 399 399 400 Rn = - dlog(rice(ig,l))400 Rn = -log(rice(ig,l)) 401 401 402 402 Rm = Rn - 3. * sigma_ice * sigma_ice … … 427 427 428 428 do i = 1, nbinco2_cld 429 Proba = 1.0 - dexp(-1.*microtimestep*rate(i))429 Proba = 1.0 - exp(-1.*microtimestep*rate(i)) 430 430 dN = dN + n_aer(i) * Proba 431 431 dM = dM + m_aer(i) * Proba … … 434 434 if (co2useh2o) then 435 435 do i = 1, nbinco2_cld 436 Probah2o = 1.0 - dexp(-1.*microtimestep*rateh2o(i))436 Probah2o = 1.0 - exp(-1.*microtimestep*rateh2o(i)) 437 437 dNh2o = dNh2o + n_aer_h2oice(i) * Probah2o 438 438 dMh2o = dMh2o + m_aer_h2oice(i) * Probah2o … … 492 492 if (zq(ig,l,igcm_ccnco2_number) * tauscaling(ig) + threshold >= 1) then 493 493 494 call updaterice_microco2( zq(ig,l,igcm_co2_ice), zq(ig,l,igcm_ccnco2_mass), zq(ig,l,igcm_ccnco2_number), &494 call updaterice_microco2(dble(zq(ig,l,igcm_co2_ice)), dble(zq(ig,l,igcm_ccnco2_mass)), dble(zq(ig,l,igcm_ccnco2_number)), & 495 495 tauscaling(ig), riceco2(ig,l), rhocloudco2(ig,l)) 496 496 -
trunk/LMDZ.MARS/libf/phymars/nuclea.F
r1268 r2456 87 87 88 88 nh2o = ph2o / kbz / temp 89 rstar = 2. * sig(temp) * vo1 / (rgp*temp* dlog(sat))89 rstar = 2. * sig(temp) * vo1 / (rgp*temp*log(sat)) 90 90 gstar = 4. * nav * pi * (rstar * rstar * rstar) / (3.*vo1) 91 91 … … 124 124 & * ( nh2o*rad_cld(i) ) 125 125 & / ( zefshape * nus * m0 ) 126 & * dexp (deltaf))126 & * exp (deltaf)) 127 127 endif 128 128 -
trunk/LMDZ.MARS/libf/phymars/nucleaco2.F
r2156 r2456 58 58 59 59 nco2 = pco2 / kbz / temp 60 rstar = 2. * sigco2 * vo2co2 / (kbz*temp* dlog(sat))60 rstar = 2. * sigco2 * vo2co2 / (kbz*temp*log(sat)) 61 61 gstar = 4. * pi * (rstar * rstar * rstar) / (3.*vo2co2) 62 62 … … 97 97 & * ( nco2*rad_cldco2(i) ) 98 98 & / ( zefshapeco2 * nusco2 * m0co2 ) 99 & * dexp (deltaf))99 & * exp (deltaf)) 100 100 101 101 … … 133 133 & * ( nco2*rad_h2oice(i) ) 134 134 & / ( zefshapeco2 * nusco2 * m0co2 ) 135 & * dexp (deltaf))135 & * exp (deltaf)) 136 136 endif 137 137 endif -
trunk/LMDZ.MARS/libf/phymars/tcondco2.F90
r2362 r2456 17 17 integer:: ig,l 18 18 19 A= dlog(1.382d12)19 A=log(1.382d12) 20 20 B=-3182.48 21 21 qco2=0. … … 23 23 DO ig=1,ngrid 24 24 pco2 = q(ig,l) * (mmean(ig,l)/44.01) * p(ig,l) 25 tcond(ig,l)=B/( dlog(pco2)-A)25 tcond(ig,l)=B/(log(pco2)-A) 26 26 enddo 27 27 enddo
Note: See TracChangeset
for help on using the changeset viewer.