Changeset 1816
- Timestamp:
- Nov 2, 2017, 4:40:47 PM (7 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r1720 r1816 2470 2470 - Some cleaning of the CO2 ice clouds routine has been done. Not perfect yet! 2471 2471 2472 == 02/10/2017 == JA 2473 - Update for CO2 clouds scheme. 2474 - Several bugs have been corrected, further cleaning performed. 2475 - The main routine of co2 clouds is co2cloud.F. Please read its comments if interested. 2476 2477 -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F
r1754 r1816 4 4 & nq,tau,tauscaling,rdust,rice,riceco2,nuice, 5 5 & rsedcloudco2,rhocloudco2, 6 & rsedcloud,rhocloud,pzlev,pdqs_sedco2) 6 & rsedcloud,rhocloud,pzlev,pdqs_sedco2, 7 & pdu,pu) 7 8 ! to use 'getin' 8 9 use dimradmars_mod, only: naerkind … … 10 11 USE ioipsl_getincom 11 12 USE updaterad 12 use conc_mod, only: mmean 13 use conc_mod, only: mmean,rnew 13 14 use tracer_mod, only: nqmx, igcm_co2, igcm_co2_ice, 14 15 & igcm_dust_mass, igcm_dust_number,igcm_h2o_ice, … … 18 19 & rho_ice_co2,r3n_q,rho_ice,nuice_sed 19 20 20 21 21 IMPLICIT NONE 22 23 22 24 23 #include "datafile.h" 25 24 #include "callkeys.h" 26 25 #include "microphys.h" 27 28 26 29 27 c======================================================================= … … 33 31 c due to timescales smaller than the GCM integration timestep. 34 32 c microphysics subroutine is improvedCO2clouds.F 35 c 33 c the microphysics time step is a fraction of the physical one 34 c the integer imicroco2 must be set in callphys.def 35 c 36 36 c The co2 clouds tracers (co2_ice, ccn mass and concentration) are 37 37 c sedimented at each microtimestep. pdqs_sedco2 keeps track of the … … 43 43 c 44 44 c 07/2017 J.Audouard 45 c Several logicals can be set to .true. in callphys.def 45 c Several logicals and integer must be set to .true. in callphys.def 46 c uf not, default values are .false. 46 47 c co2clouds=.true. call this routine 47 48 c co2useh2o=.true. allow the use of water ice particles as CCN for CO2 … … 49 50 c CLFvaryingCO2=.true. allows a subgrid temperature distribution 50 51 c of amplitude spantCO2(=integer in callphys.def) 52 c imicroco2=50 51 53 c 54 c The subgrid Temperature distribution is modulated (0 or 1) by Spiga et 55 c al. (GRL 2012) Saturation Index to account for GW propagation or 56 c dissipation upwards. 57 c 58 c 4D and column opacities are computed using Qext values at 1µm. 52 59 c======================================================================= 53 60 … … 69 76 REAL pdt(ngrid,nlay) ! tendence temperature des autres param. 70 77 real,intent(in) :: pzlev(ngrid,nlay+1) ! altitude at the boundaries of the layers 71 72 78 real pq(ngrid,nlay,nq) ! traceur (kg/kg) 73 79 real pdq(ngrid,nlay,nq) ! tendance avant condensation (kg/kg.s-1) … … 75 81 real rice(ngrid,nlay) ! Water Ice mass mean radius (m) 76 82 ! used for nucleation of CO2 on ice-coated ccns 77 DOUBLE PRECISION rho_ice_co2T(ngrid,nlay) 83 DOUBLE PRECISION rho_ice_co2T(ngrid,nlay) !T-dependant CO2 ice density 84 DOUBLE PRECISION :: myT ! temperature scalar for co2 density computation 78 85 REAL tau(ngrid,naerkind) ! Column dust optical depth at each point 79 86 REAL tauscaling(ngrid) ! Convertion factor for dust amount … … 86 93 REAL pdtcloudco2(ngrid,nlay) ! tendence temperature due 87 94 ! a la chaleur latente 88 89 95 DOUBLE PRECISION riceco2(ngrid,nlay) ! Ice mass mean radius (m) 90 96 ! (r_c in montmessin_2004) … … 94 100 real rhocloudco2(ngrid,nlay) ! Cloud density (kg.m-3) 95 101 real rhocloudco2t(ngrid,nlay) ! Cloud density (kg.m-3) 96 real pdqs_sedco2(ngrid) ! CO2 flux at the surface 102 real pdqs_sedco2(ngrid) ! CO2 flux at the surface 103 97 104 c local: 98 105 c ------ … … 101 108 real rhocloud(ngrid,nlay) ! Cloud density (kg.m-3) 102 109 ! for ice radius computation 103 104 REAl ccntyp 105 110 106 111 ! for time loop 107 112 INTEGER microstep ! time subsampling step variable 108 INTEGER imicro ! time subsampling for coupled water microphysics & sedimentation109 SAVE imicro 113 INTEGER imicroco2 ! time subsampling for coupled water microphysics & sedimentation 114 SAVE imicroco2 110 115 REAL microtimestep ! integration timestep for coupled water microphysics & sedimentation 111 116 SAVE microtimestep … … 125 130 INTEGER iq,ig,l,i 126 131 LOGICAL,SAVE :: firstcall=.true. 127 DOUBLE PRECISION Nccnco2, Niceco2,Nco2,mdustJA,ndustJA 128 DOUBLE PRECISION Qccnco2 129 real :: beta 132 DOUBLE PRECISION Nccnco2, Niceco2,Nco2,Qccnco2 133 real :: beta ! for sedimentation 130 134 131 135 real epaisseur (ngrid,nlay) ! Layer thickness (m) 132 136 real masse (ngrid,nlay) ! Layer mass (kg.m-2) 133 double precision diff,diff0 134 real tempo_traceur_t(ngrid,nlay) 137 real tempo_traceur_t(ngrid,nlay) ! tracers with real-time value in microtimeloop 135 138 real tempo_traceurs(ngrid,nlay,nq) 136 real sav_trac(ngrid,nlay,nq) 139 real sav_trac(ngrid,nlay,nq) !For sedimentation tendancy 137 140 real pdqsed(ngrid,nlay,nq) 138 REAL lw !Latent heat of sublimation (J.kg-1) 139 REAL,save :: l0,l1,l2,l3,l4 !Coeffs for lw 140 141 DOUBLE PRECISION,allocatable,save :: memdMMccn(:,:) ! Nb particules intégré 142 DOUBLE PRECISION,allocatable,save :: memdMMh2o(:,:) 143 DOUBLE PRECISION,allocatable,save :: memdNNccn(:,:) 144 DOUBLE PRECISION :: myT 145 ! What we need for Qext reading and tau computation 141 142 DOUBLE PRECISION,allocatable,save :: memdMMccn(:,:) !memory of h2o particles 143 DOUBLE PRECISION,allocatable,save :: memdMMh2o(:,:) !only if co2useh2o=.true. 144 DOUBLE PRECISION,allocatable,save :: memdNNccn(:,:) !Nb particules H2O intégré 145 146 ! What we need for Qext reading and tau computation : size distribution 146 147 DOUBLE PRECISION vrat_cld ! Volume ratio 147 148 DOUBLE PRECISION rb_cldco2(nbinco2_cld+1) ! boundary values of each rad_cldco2 bin (m) 148 149 SAVE rb_cldco2 149 DOUBLE PRECISION, PARAMETER :: rmin_cld = 1.e-11 ! Minimum radius (m) 150 DOUBLE PRECISION, PARAMETER :: rmax_cld = 3.e-6 ! Maximum radius (m) 151 DOUBLE PRECISION, PARAMETER :: rbmin_cld =1.e-12 152 ! Minimum boundary radius (m) 153 DOUBLE PRECISION, PARAMETER :: rbmax_cld = 5.e-6 ! Maximum boundary radius (m) 154 150 DOUBLE PRECISION, PARAMETER :: rmin_cld = 1.e-9 ! Minimum radius (m) 151 DOUBLE PRECISION, PARAMETER :: rmax_cld = 5.e-6 ! Maximum radius (m) 152 DOUBLE PRECISION, PARAMETER :: rbmin_cld =1.e-10! Minimum boundary radius (m) 153 DOUBLE PRECISION, PARAMETER :: rbmax_cld = 2.e-4 ! Maximum boundary radius (m) 155 154 DOUBLE PRECISION dr_cld(nbinco2_cld) ! width of each rad_cldco2 bin (m) 156 155 DOUBLE PRECISION vol_cld(nbinco2_cld) ! particle volume for each bin (m3) 157 156 REAL sigma_iceco2 ! Variance of the ice and CCN distributions 158 159 logical :: file_ok 157 logical :: file_ok !Qext file reading 160 158 double precision :: radv(10000),Qextv1mic(10000) 161 159 double precision :: Qext1bins(100),Qtemp … … 163 161 integer :: nelem,lebon1,lebon2,uQext 164 162 save Qext1bins 165 character(len=100) scanline166 163 DOUBLE PRECISION n_aer(nbinco2_cld),Rn,No,n_derf,dev2 167 164 DOUBLE PRECISION Qext1bins2(ngrid,nlay) … … 173 170 REAL :: zq(ngrid, nlay,nq) 174 171 175 REAL :: tcond(ngrid,nlay)172 DOUBLE PRECISION :: tcond(ngrid,nlay) !CO2 condensation temperature 176 173 REAL :: zqvap(ngrid,nlay) 177 REAL :: zqice(ngrid,nlay)174 REAL :: zqice(ngrid,nlay) 178 175 REAL :: spant,zdelt ! delta T for the temperature distribution 179 REAL :: zteff(ngrid, nlay)! effective temperature in the cloud,neb 180 REAL :: pqeff(ngrid, nlay, nq)! effective tracers quantities in the cloud 181 REAL :: cloudfrac(ngrid,nlay) ! cloud fraction 182 REAL :: mincloud ! min cloud frac 176 REAL :: zteff(ngrid, nlay)! effective temperature in the cloud,neb 177 REAL :: pqeff(ngrid, nlay, nq)! effective tracers quantities in the cloud 178 REAL :: cloudfrac(ngrid,nlay) ! cloud fraction 179 REAL :: mincloud ! min cloud frac 180 DOUBLE PRECISION:: rho,zu,NN,gradT !For Saturation Index computation 181 REAL :: pdu(ngrid,nlay),pu(ngrid,nlay) !Wind field zu=pu+pdu*ptimestep 182 DOUBLE PRECISION :: SatIndex(ngrid,nlay),SatIndexmap(ngrid) 183 183 184 c logical :: CLFvaryingCO2 184 185 c ** un petit test de coherence … … 197 198 write(*,*) "time subsampling for microphysic ?" 198 199 #ifdef MESOSCALE 199 imicro = 2200 imicroco2 = 2 200 201 #else 201 imicro = 30202 imicroco2 = 30 202 203 #endif 203 call getin("imicro ",imicro)204 write(*,*)"imicro = ",imicro204 call getin("imicroco2",imicroco2) 205 write(*,*)"imicroco2 = ",imicroco2 205 206 206 microtimestep = ptimestep/real(imicro )207 microtimestep = ptimestep/real(imicroco2) 207 208 write(*,*)"Physical timestep is",ptimestep 208 209 write(*,*)"CO2 Microphysics timestep is",microtimestep 209 210 210 ! Values for latent heat computation 211 l0=595594d0 212 l1=903.111d0 213 l2=-11.5959d0 214 l3=0.0528288d0 215 l4=-0.000103183d0 216 c$$$ 217 c$$$ if (meteo_flux_number .ne. 0) then 218 c$$$ 219 c$$$ write(*,*) "Warning ! Meteoritic flux of dust is turned on" 220 c$$$ write(*,*) "Dust mass = ",meteo_flux_mass 221 c$$$ write(*,*) "Dust number = ",meteo_flux_number 222 c$$$ write(*,*) "Are added at the z-level (km)",meteo_alt 223 c$$$ write(*,*) "Every timestep in co2cloud.F" 224 c$$$ endif 225 211 226 212 if (.not. allocated(memdMMccn)) allocate(memdMMccn(ngrid,nlay)) 227 213 if (.not. allocated(memdNNccn)) allocate(memdNNccn(ngrid,nlay)) … … 289 275 ltemp2=abs(radv(:)-rb_cldco2(i+1)) 290 276 lebon1=minloc(ltemp1,DIM=1) 291 lebon2=min loc(ltemp2,DIM=1)277 lebon2=min(minloc(ltemp2,DIM=1),10000) 292 278 nelem=lebon2-lebon1+1. 293 279 Qtemp=0d0 294 280 do l=0,nelem 295 Qtemp=Qtemp+Qextv1mic( lebon1+l) !mean value in the interval281 Qtemp=Qtemp+Qextv1mic(min(lebon1+l,10000)) !mean value in the interval 296 282 enddo 297 283 Qtemp=Qtemp/nelem … … 320 306 write(*,*) "for the CO2 microphysics " 321 307 endif 308 322 309 firstcall=.false. 323 310 ENDIF ! of IF (firstcall) … … 330 317 subpdqcloudco2(1:ngrid,1:nlay,1:nq) = 0 331 318 subpdtcloudco2(1:ngrid,1:nlay) = 0 332 c$$$333 c$$$ call WRITEDIAGFI(ngrid,"pzlay","pzlay","km",3,334 c$$$ & pzlay)335 c$$$ call WRITEDIAGFI(ngrid,"pplay","pplay","Pa",3,336 c$$$ & pplay)337 319 338 320 wq(:,:)=0 … … 353 335 enddo 354 336 355 !CLFvaryingCO2=.true.356 357 337 c------------------------------------------------------------------- 358 338 c 0. Representation of sub-grid water ice clouds 359 c------------------ 339 c------------------------------------------------------------------- 360 340 IF (CLFvaryingCO2) THEN 341 361 342 spant=spantCO2 ! delta T for the temprature distribution 362 343 mincloud=0.1 ! min cloudfrac when there is ice 363 ! IF (flagcloudco2) THEN 364 ! write(*,*) "CLFCO2 Delta T", spant 365 ! write(*,*) "CLFCO2 mincloud", mincloud 366 ! flagcloudco2=.false. 367 ! END IF 344 zteff(:,:)=pt(:,:) 345 cloudfrac(:,:)=mincloud 368 346 369 347 c-----Tendencies … … 382 360 zqvap=zq(:,:,igcm_co2) 383 361 zqice=zq(:,:,igcm_co2_ice) 384 !! AS : this routine is not present? 385 ! CALL tcondco2(ngrid,nlay,pplay,zqvap,tcond) 362 363 364 call WRITEDIAGFI(ngrid,"pzlev","pzlev","km",3, 365 & pzlev) 366 call WRITEDIAGFI(ngrid,"pzlay","pzlay","km",3, 367 & pzlay) 368 call WRITEDIAGFI(ngrid,"pplay","pplay","Pa",3, 369 & pplay) 370 371 DO l=12,26 372 ! layers 12 --> 26 ~ 12->85 km 373 DO ig=1,ngrid 374 ! Calcul de N^2 static stability 375 gradT=(zt(ig,l+1)-zt(ig,l))/(pzlev(ig,l+1)-pzlev(ig,l)) 376 NN=sqrt(g/zt(iq,l)*(max(gradT,-g/cpp)+g/cpp)) 377 !calcul of wind field 378 zu=pu(ig,l) + pdu(ig,l)*ptimestep 379 ! calcul of background density 380 rho=pplay(ig,l)/(rnew(ig,l)*zt(ig,l)) 381 !saturation index 382 SatIndex(ig,l)=sqrt(7.5e-7*150.e3/(2.*pi)*NN/(rho*zu*zu*zu)) 383 enddo 384 enddo 385 !Then compute Satindex map 386 ! layers 12 --> 26 ~ 12->85 km 387 DO ig=1,ngrid 388 SatIndexmap(ig)=maxval(SatIndex(ig,12:26)) 389 enddo 390 391 call WRITEDIAGFI(ngrid,"SatIndexmap","SatIndexmap","km",2, 392 & SatIndexmap) 393 394 !Modulate the DeltaT by GW propagation index : 395 ! Saturation index S in Spiga 2012 paper 396 !Assuming like in the paper, 397 !GW phase speed (stationary waves) c=0 m.s-1 398 !lambdaH =150 km 399 !Fo=7.5e-7 J.m-3 400 401 CALL tcondco2(ngrid,nlay,pplay,zqvap,tcond) 386 402 ! A tester: CALL tcondco2(ngrid,nlay,pplay,zqvap,tcond) 387 403 zdelt=spant 388 DO l=1,nlay 389 DO ig=1,ngrid 390 IF (tcond(ig,l) .ge. (zt(ig,l)+zdelt)) THEN !Toute la fraction est saturée 404 DO ig=1,ngrid 405 406 if (SatIndexmap(ig) .le. 0.1) THEN 407 DO l=1,nlay-1 408 409 IF (tcond(ig,l) .ge. (zt(ig,l)+zdelt) 410 & .or. tcond(ig,l) .le. 0 ) THEN !Toute la fraction est saturée 391 411 zteff(ig,l)=zt(ig,l) 392 412 cloudfrac(ig,l)=1. … … 397 417 cloudfrac(ig,l)=(tcond(ig,l)-zt(ig,l)+zdelt)/ 398 418 & (2.0*zdelt) 399 zteff(ig,l)=(tcond(ig,l)+zt(ig,l)-zdelt)/2. !Ja Temperature moyenne de la fraction nuageuse 400 401 END IF 419 zteff(ig,l)=(tcond(ig,l)+zt(ig,l)-zdelt)/2. !Temperature moyenne de la fraction nuageuse 420 END IF !ig if (tcond(ig,l) ... 402 421 zteff(ig,l)=zteff(ig,l)-pdt(ig,l)*ptimestep 403 422 IF (cloudfrac(ig,l).le. mincloud) THEN 404 423 cloudfrac(ig,l)=mincloud 405 ELSE IF (cloudfrac(ig,l).g e. 1) THEN424 ELSE IF (cloudfrac(ig,l).gt. 1) THEN 406 425 cloudfrac(ig,l)=1. 407 426 END IF 408 427 ENDDO 409 ENDDO 428 ELSE 429 !SatIndex not favorable for GW : leave pt untouched 430 zteff(ig,l)=pt(ig,l) 431 cloudfrac(ig,l)=mincloud 432 END IF ! of if(SatIndexmap... 433 ENDDO 410 434 ! Totalcloud frac of the column missing here 411 435 c----------------------- … … 417 441 END DO 418 442 END DO 419 END IF ! end if (CLFvaryingco2)-------------------------------------------- 420 c 1. Tendencies: 421 c------------------ 422 423 c------ Effective tracers quantities in the cloud fraction 424 IF (CLFvaryingCO2) THEN 425 pqeff(:,:,:)=pq(:,:,:) ! prevent from buggs (A. Pottier) 426 427 c pqeff(:,:,igcm_ccn_mass) =pq(:,:,igcm_ccn_mass)/ 428 c & cloudfrac(:,:) 429 c pqeff(:,:,igcm_ccn_number)= 430 c & pq(:,:,igcm_ccn_number)/cloudfrac(:,:) 431 c pqeff(:,:,igcm_h2o_ice)= pq(:,:,igcm_h2o_ice)/ 432 c & cloudfrac(:,:) 433 pqeff(:,:,igcm_ccnco2_mass) =pq(:,:,igcm_ccnco2_mass)/ 434 & cloudfrac(:,:) 435 pqeff(:,:,igcm_ccnco2_number)= 436 & pq(:,:,igcm_ccnco2_number)/cloudfrac(:,:) 437 pqeff(:,:,igcm_co2_ice)= pq(:,:,igcm_co2_ice)/ 438 & cloudfrac(:,:) 439 440 ELSE 441 pqeff(:,:,:)=pq(:,:,:) 442 c pqeff(:,:,igcm_ccn_mass)= pq(:,:,igcm_ccn_mass) 443 c pqeff(:,:,igcm_ccn_number)= pq(:,:,igcm_ccn_number) 444 c pqeff(:,:,igcm_h2o_ice)= pq(:,:,igcm_h2o_ice) 445 c pqeff(:,:,igcm_ccnco2_mass)= pq(:,:,igcm_ccnco2_mass) 446 c pqeff(:,:,igcm_ccnco2_number)= pq(:,:,igcm_ccnco2_number) 447 c pqeff(:,:,igcm_co2_ice)= pq(:,:,igcm_co2_ice) 448 END IF 449 tempo_traceur_t(1:ngrid,1:nlay)=zteff(1:ngrid,1:nlay) 450 tempo_traceurs(1:ngrid,1:nlay,1:nq)=pqeff(1:ngrid,1:nlay,1:nq) 451 443 END IF ! end if (CLFvaryingco2) 452 444 c------------------------------------------------------------------ 453 c Time subsampling for microphysics 445 c microtimestep timeloop for microphysics: 446 c 0.Stepped entry for tendancies 447 c 1.Compute sedimentation and update tendancies 448 c 2.Call co2clouds microphysics 449 c 3.Update tendancies 454 450 c------------------------------------------------------------------ 455 DO microstep=1,imicro 451 DO microstep=1,imicroco2 456 452 c------ Temperature tendency subpdt 457 ! Each microtimestep we give the cloud scheme a stepped entry subpdt instead of pdt458 453 ! If imicro=1 subpdt is the same as pdt 459 DO l=1,nlay 460 DO ig=1,ngrid 461 462 subpdt(ig,l) = subpdt(ig,l) 463 & + pdt(ig,l) ! At each micro timestep we add pdt in order to have a stepped entry 464 subpdq(ig,l,igcm_dust_mass) = 465 & subpdq(ig,l,igcm_dust_mass) 466 & + pdq(ig,l,igcm_dust_mass) 467 subpdq(ig,l,igcm_dust_number) = 468 & subpdq(ig,l,igcm_dust_number) 469 & + pdq(ig,l,igcm_dust_number) 470 subpdq(ig,l,igcm_ccnco2_mass) = 471 & subpdq(ig,l,igcm_ccnco2_mass) 472 & + pdq(ig,l,igcm_ccnco2_mass) 473 subpdq(ig,l,igcm_ccnco2_number) = 474 & subpdq(ig,l,igcm_ccnco2_number) 475 & + pdq(ig,l,igcm_ccnco2_number) 476 subpdq(ig,l,igcm_co2_ice) = 477 & subpdq(ig,l,igcm_co2_ice) 478 & + pdq(ig,l,igcm_co2_ice) 479 subpdq(ig,l,igcm_co2) = 480 & subpdq(ig,l,igcm_co2) 481 & + pdq(ig,l,igcm_co2) 482 subpdq(ig,l,igcm_h2o_ice) = 483 & subpdq(ig,l,igcm_h2o_ice) 484 & + pdq(ig,l,igcm_h2o_ice) 485 subpdq(ig,l,igcm_ccn_mass) = 486 & subpdq(ig,l,igcm_ccn_mass) 487 & + pdq(ig,l,igcm_ccn_mass) 488 subpdq(ig,l,igcm_ccn_number) = 489 & subpdq(ig,l,igcm_ccn_number) 490 & + pdq(ig,l,igcm_ccn_number) 491 ENDDO 492 ENDDO 493 494 c add meteoritic flux of dust (old version) 495 cNew version (John Plane values) are added in improvedCO2clouds 496 !convert meteo_alt (in km) to z-level 497 !pzlay altitudes of the layers 498 c$$$!zlev altitudes (nlayl+1) of the boundaries 499 c$$$ if (meteo_flux_number .ge. 0) then 500 c$$$ do ig=1, ngrid 501 c$$$ l=1 502 c$$$ do while ( (((meteo_alt .ge. pplev(ig,l)) .and. 503 c$$$ & (meteo_alt .le. pplev(ig,l+1))) .eq. .false.) 504 c$$$ & .and. (l .lt. nlay) ) 505 c$$$ l=l+1 506 c$$$ enddo 507 c$$$ meteo_lvl=l 508 c$$$ subpdq(ig,meteo_lvl,igcm_dust_mass)= 509 c$$$ & subpdq(ig,meteo_lvl,igcm_dust_mass) 510 c$$$ & +meteo_flux_mass 511 c$$$ subpdq(ig,meteo_lvl,igcm_dust_number)= 512 c$$$ & subpdq(ig,meteo_lvl,igcm_dust_number) 513 c$$$ & +meteo_flux_number 514 c$$$ enddo 515 c$$$ endif 516 c------------------------------------------------------------------- 517 c 2. Main call to the cloud schemes: 518 c------------------------------------------------ 519 CALL improvedCO2clouds(ngrid,nlay,microtimestep, 520 & pplay,pzlev,zteff,subpdt, 521 & pqeff,subpdq,subpdqcloudco2,subpdtcloudco2, 522 & nq,tauscaling,memdMMccn,memdMMh2o,memdNNccn) 523 c------------------------------------------------------------------- 524 c 3. Updating tendencies after cloud scheme: 525 c----------------------------------------------- 526 DO l=1,nlay 454 DO l=1,nlay 527 455 DO ig=1,ngrid 528 subpdt(ig,l) = 529 & subpdt(ig,l) + subpdtcloudco2(ig,l)530 subpdq(ig,l,igcm_dust_mass) = 456 subpdt(ig,l) = subpdt(ig,l) 457 & + pdt(ig,l) ! At each micro timestep we add pdt in order to have a stepped entry 458 subpdq(ig,l,igcm_dust_mass) = 531 459 & subpdq(ig,l,igcm_dust_mass) 532 & + subpdqcloudco2(ig,l,igcm_dust_mass)533 subpdq(ig,l,igcm_dust_number) = 460 & + pdq(ig,l,igcm_dust_mass) 461 subpdq(ig,l,igcm_dust_number) = 534 462 & subpdq(ig,l,igcm_dust_number) 535 & + subpdqcloudco2(ig,l,igcm_dust_number) 536 subpdq(ig,l,igcm_ccnco2_mass) = 463 & + pdq(ig,l,igcm_dust_number) 464 465 subpdq(ig,l,igcm_ccnco2_mass) = 537 466 & subpdq(ig,l,igcm_ccnco2_mass) 538 & + subpdqcloudco2(ig,l,igcm_ccnco2_mass)539 subpdq(ig,l,igcm_ccnco2_number) = 467 & + pdq(ig,l,igcm_ccnco2_mass) 468 subpdq(ig,l,igcm_ccnco2_number) = 540 469 & subpdq(ig,l,igcm_ccnco2_number) 541 & + subpdqcloudco2(ig,l,igcm_ccnco2_number) 542 subpdq(ig,l,igcm_co2_ice) = 470 & + pdq(ig,l,igcm_ccnco2_number) 471 472 subpdq(ig,l,igcm_co2_ice) = 543 473 & subpdq(ig,l,igcm_co2_ice) 544 & + subpdqcloudco2(ig,l,igcm_co2_ice)545 subpdq(ig,l,igcm_co2) = 474 & + pdq(ig,l,igcm_co2_ice) 475 subpdq(ig,l,igcm_co2) = 546 476 & subpdq(ig,l,igcm_co2) 547 & + subpdqcloudco2(ig,l,igcm_co2) 548 subpdq(ig,l,igcm_h2o_ice) = 477 & + pdq(ig,l,igcm_co2) 478 479 subpdq(ig,l,igcm_h2o_ice) = 549 480 & subpdq(ig,l,igcm_h2o_ice) 550 & + subpdqcloudco2(ig,l,igcm_h2o_ice)551 subpdq(ig,l,igcm_ccn_mass) = 481 & + pdq(ig,l,igcm_h2o_ice) 482 subpdq(ig,l,igcm_ccn_mass) = 552 483 & subpdq(ig,l,igcm_ccn_mass) 553 & + subpdqcloudco2(ig,l,igcm_ccn_mass)554 subpdq(ig,l,igcm_ccn_number) = 484 & + pdq(ig,l,igcm_ccn_mass) 485 subpdq(ig,l,igcm_ccn_number) = 555 486 & subpdq(ig,l,igcm_ccn_number) 556 & + subpdqcloudco2(ig,l,igcm_ccn_number)487 & + pdq(ig,l,igcm_ccn_number) 557 488 ENDDO 558 489 ENDDO 559 560 !Sedimentation 561 !Update traceurs, compute rsed 490 c- Effective tracers quantities in the cloud fraction 491 IF (CLFvaryingCO2) THEN 492 pqeff(:,:,:)=pq(:,:,:) ! prevent from buggs (A. Pottier) 493 pqeff(:,:,igcm_ccnco2_mass) =pq(:,:,igcm_ccnco2_mass)/ 494 & cloudfrac(:,:) 495 pqeff(:,:,igcm_ccnco2_number)= 496 & pq(:,:,igcm_ccnco2_number)/cloudfrac(:,:) 497 pqeff(:,:,igcm_co2_ice)= pq(:,:,igcm_co2_ice)/ 498 & cloudfrac(:,:) 499 ELSE 500 pqeff(:,:,:)=pq(:,:,:) 501 END IF 562 502 503 c------------------------------------------------------ 504 c 1.SEDIMENTATION : update tracers, compute parameters, 505 c call to sedimentation routine, update tendancies 506 c------------------------------------------------------ 563 507 DO l=1, nlay 564 508 DO ig=1,ngrid … … 567 511 tempo_traceurs(ig,l,:)=pqeff(ig,l,:) 568 512 & +subpdq(ig,l,:)*microtimestep 569 570 513 rho_ice_co2T(ig,l)=1000.*(1.72391-2.53e-4* 571 514 & tempo_traceur_t(ig,l)-2.87e-6* … … 578 521 Qccnco2=max(tempo_traceurs(ig,l,igcm_ccnco2_mass), 579 522 & 1.e-30) 580 mdustJA= tempo_traceurs(ig,l,igcm_dust_mass) 581 ndustJA=tempo_traceurs(ig,l,igcm_dust_number) 582 if ((Nccnco2 .lt. tauscaling(ig)) .or. (Qccnco2 .lt. 583 & 1.e-30 *tauscaling(ig))) then 584 rdust(ig,l)=1.e-10 585 else 586 rdust(ig,l)=(3./4./pi/2500.*Qccnco2/Nccnco2)**(1./3.) 587 rdust(ig,l)=max(rdust(ig,l),1.e-10) 588 c rdust(ig,l)=min(rdust(ig,l),5.e-6) 589 end if 590 rhocloudco2t(ig,l) = (Niceco2 *rho_ice_co2 591 & + Qccnco2*tauscaling(ig)*rho_dust) 592 & / (Niceco2 + Qccnco2*tauscaling(ig)) 593 523 call updaterice_microco2(Niceco2, 524 & Qccnco2,Nccnco2, 525 & tauscaling(ig),riceco2(ig,l),rhocloudco2t(ig,l)) 526 if (Niceco2 .le. 1.e-25 527 & .or. Nccnco2*tauscaling(ig) .le. 1) THEN 528 riceco2(ig,l)=1.e-9 529 endif 594 530 rhocloudco2t(ig,l)=min(max(rhocloudco2t(ig,l) 595 531 & ,rho_ice_co2),rho_dust) 596 riceco2(ig,l)=(Niceco2*3.0/597 & (4.0*rho_ice_co2*pi*Nccnco2598 & *tauscaling(ig)) +rdust(ig,l)*rdust(ig,l)599 & *rdust(ig,l))**(1.0/3.0)600 riceco2(ig,l)=max(1.e-10,riceco2(ig,l))601 602 532 rsedcloudco2(ig,l)=max(riceco2(ig,l)* 603 533 & (1.+nuiceco2_sed)*(1.+nuiceco2_sed)*(1.+nuiceco2_sed), 604 & rdust(ig,l)) 605 534 & riceco2(ig,l)) 606 535 ENDDO 607 536 ENDDO 608 609 ! Gravitational sedimentation 610 537 ! Gravitational sedimentation 611 538 sav_trac(:,:,igcm_co2_ice)=tempo_traceurs(:,:,igcm_co2_ice) 612 539 sav_trac(:,:,igcm_ccnco2_mass)= 613 540 & tempo_traceurs(:,:,igcm_ccnco2_mass) 614 541 sav_trac(:,:,igcm_ccnco2_number)= 615 & tempo_traceurs(:,:,igcm_ccnco2_number) 616 617 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay,542 & tempo_traceurs(:,:,igcm_ccnco2_number) 543 !We save actualized tracer values to compute sedimentation tendancies 544 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, 618 545 & microtimestep,pplev,masse,epaisseur,tempo_traceur_t, 619 546 & rsedcloudco2,rhocloudco2t, 620 547 & tempo_traceurs(:,:,igcm_co2_ice),wq,beta) ! 3 traceurs 621 622 548 ! sedim at the surface of co2 ice : keep track of it for physiq_mod 623 549 do ig=1,ngrid 624 550 pdqs_sedco2(ig)=pdqs_sedco2(ig)+ wq(ig,1)/microtimestep 625 551 end do 626 627 552 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, 628 553 & microtimestep,pplev,masse,epaisseur,tempo_traceur_t, 629 554 & rsedcloudco2,rhocloudco2t, 630 555 & tempo_traceurs(:,:,igcm_ccnco2_mass),wq,beta) 631 632 556 call newsedim(ngrid,nlay,ngrid*nlay,ngrid*nlay, 633 557 & microtimestep,pplev,masse,epaisseur,tempo_traceur_t, 634 558 & rsedcloudco2,rhocloudco2t, 635 559 & tempo_traceurs(:,:,igcm_ccnco2_number),wq,beta) 636 637 DO l = 1, nlay !Compute tendencies 560 DO l = 1, nlay !Compute tendencies 638 561 DO ig=1,ngrid 639 562 pdqsed(ig,l,igcm_ccnco2_mass)= … … 648 571 ENDDO 649 572 ENDDO 650 !pdqsed est la tendance due a la sedimentation 651 652 DO l=1,nlay 573 !update subtimestep tendencies with sedimentation input 574 DO l=1,nlay 653 575 DO ig=1,ngrid 654 576 subpdq(ig,l,igcm_ccnco2_mass) = … … 663 585 ENDDO 664 586 ENDDO 665 587 c------------------------------------------------------ 588 c 2. Main call to the cloud schemes: 589 c------------------------------------------------------ 590 CALL improvedCO2clouds(ngrid,nlay,microtimestep, 591 & pplay,pplev,zteff,subpdt, 592 & pqeff,subpdq,subpdqcloudco2,subpdtcloudco2, 593 & nq,tauscaling,memdMMccn,memdMMh2o,memdNNccn) 594 c----------------------------------------------------- 595 c 3. Updating tendencies after cloud scheme: 596 c----------------------------------------------------- 597 DO l=1,nlay 598 DO ig=1,ngrid 599 subpdt(ig,l) = 600 & subpdt(ig,l) + subpdtcloudco2(ig,l) 601 602 subpdq(ig,l,igcm_dust_mass) = 603 & subpdq(ig,l,igcm_dust_mass) 604 & + subpdqcloudco2(ig,l,igcm_dust_mass) 605 subpdq(ig,l,igcm_dust_number) = 606 & subpdq(ig,l,igcm_dust_number) 607 & + subpdqcloudco2(ig,l,igcm_dust_number) 608 609 subpdq(ig,l,igcm_ccnco2_mass) = 610 & subpdq(ig,l,igcm_ccnco2_mass) 611 & + subpdqcloudco2(ig,l,igcm_ccnco2_mass) 612 subpdq(ig,l,igcm_ccnco2_number) = 613 & subpdq(ig,l,igcm_ccnco2_number) 614 & + subpdqcloudco2(ig,l,igcm_ccnco2_number) 615 616 subpdq(ig,l,igcm_co2_ice) = 617 & subpdq(ig,l,igcm_co2_ice) 618 & + subpdqcloudco2(ig,l,igcm_co2_ice) 619 subpdq(ig,l,igcm_co2) = 620 & subpdq(ig,l,igcm_co2) 621 & + subpdqcloudco2(ig,l,igcm_co2) 622 623 subpdq(ig,l,igcm_h2o_ice) = 624 & subpdq(ig,l,igcm_h2o_ice) 625 & + subpdqcloudco2(ig,l,igcm_h2o_ice) 626 subpdq(ig,l,igcm_ccn_mass) = 627 & subpdq(ig,l,igcm_ccn_mass) 628 & + subpdqcloudco2(ig,l,igcm_ccn_mass) 629 subpdq(ig,l,igcm_ccn_number) = 630 & subpdq(ig,l,igcm_ccn_number) 631 & + subpdqcloudco2(ig,l,igcm_ccn_number) 632 ENDDO 633 ENDDO 666 634 ENDDO ! of DO microstep=1,imicro 667 635 668 c------------------------------------------------ -------------------669 c 6.Compute final tendencies after time loop:636 c------------------------------------------------ 637 c Compute final tendencies after time loop: 670 638 c------------------------------------------------ 671 639 c CO2 flux at surface (kg.m-2.s-1) 672 640 do ig=1,ngrid 673 pdqs_sedco2(ig)=pdqs_sedco2(ig)/real(imicro )641 pdqs_sedco2(ig)=pdqs_sedco2(ig)/real(imicroco2) 674 642 enddo 675 676 643 c------ Temperature tendency pdtcloud 677 644 DO l=1,nlay 678 645 DO ig=1,ngrid 679 646 pdtcloudco2(ig,l) = 680 & subpdt(ig,l)/real(imicro )-pdt(ig,l)647 & subpdt(ig,l)/real(imicroco2)-pdt(ig,l) 681 648 ENDDO 682 649 ENDDO 683 684 650 c------ Tracers tendencies pdqcloud 685 651 DO l=1,nlay 686 DO ig=1,ngrid 687 688 pdqcloudco2(ig,l,igcm_co2_ice) = 689 & subpdq(ig,l,igcm_co2_ice)/real(imicro) 690 & - pdq(ig,l,igcm_co2_ice) 691 pdqcloudco2(ig,l,igcm_co2) = 692 & subpdq(ig,l,igcm_co2)/real(imicro) 693 & - pdq(ig,l,igcm_co2) 694 pdqcloudco2(ig,l,igcm_h2o_ice) = 695 & subpdq(ig,l,igcm_h2o_ice)/real(imicro) 696 & - pdq(ig,l,igcm_h2o_ice) 697 ENDDO 652 DO ig=1,ngrid 653 pdqcloudco2(ig,l,igcm_co2_ice) = 654 & subpdq(ig,l,igcm_co2_ice)/real(imicroco2) 655 & - pdq(ig,l,igcm_co2_ice) 656 pdqcloudco2(ig,l,igcm_co2) = 657 & subpdq(ig,l,igcm_co2)/real(imicroco2) 658 & - pdq(ig,l,igcm_co2) 659 pdqcloudco2(ig,l,igcm_h2o_ice) = 660 & subpdq(ig,l,igcm_h2o_ice)/real(imicroco2) 661 & - pdq(ig,l,igcm_h2o_ice) 662 ENDDO 698 663 ENDDO 699 700 DO l=1,nlay 701 DO ig=1,ngrid 702 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 703 & subpdq(ig,l,igcm_ccnco2_mass)/real(imicro) 704 & - pdq(ig,l,igcm_ccnco2_mass) 705 pdqcloudco2(ig,l,igcm_ccnco2_number) = 706 & subpdq(ig,l,igcm_ccnco2_number)/real(imicro) 707 & - pdq(ig,l,igcm_ccnco2_number) 708 pdqcloudco2(ig,l,igcm_ccn_mass) = 709 & subpdq(ig,l,igcm_ccn_mass)/real(imicro) 710 & - pdq(ig,l,igcm_ccn_mass) 711 pdqcloudco2(ig,l,igcm_ccn_number) = 712 & subpdq(ig,l,igcm_ccn_number)/real(imicro) 713 & - pdq(ig,l,igcm_ccn_number) 664 DO l=1,nlay 665 DO ig=1,ngrid 666 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 667 & subpdq(ig,l,igcm_ccnco2_mass)/real(imicroco2) 668 & - pdq(ig,l,igcm_ccnco2_mass) 669 pdqcloudco2(ig,l,igcm_ccnco2_number) = 670 & subpdq(ig,l,igcm_ccnco2_number)/real(imicroco2) 671 & - pdq(ig,l,igcm_ccnco2_number) 672 pdqcloudco2(ig,l,igcm_ccn_mass) = 673 & subpdq(ig,l,igcm_ccn_mass)/real(imicroco2) 674 & - pdq(ig,l,igcm_ccn_mass) 675 pdqcloudco2(ig,l,igcm_ccn_number) = 676 & subpdq(ig,l,igcm_ccn_number)/real(imicroco2) 677 & - pdq(ig,l,igcm_ccn_number) 678 ENDDO 679 ENDDO 680 DO l=1,nlay 681 DO ig=1,ngrid 682 pdqcloudco2(ig,l,igcm_dust_mass) = 683 & subpdq(ig,l,igcm_dust_mass)/real(imicroco2) 684 & - pdq(ig,l,igcm_dust_mass) 685 pdqcloudco2(ig,l,igcm_dust_number) = 686 & subpdq(ig,l,igcm_dust_number)/real(imicroco2) 687 & - pdq(ig,l,igcm_dust_number) 688 ENDDO 689 ENDDO 690 c-------Due to stepped entry, other processes tendencies can add up to negative values 691 c-------Therefore, enforce positive values and conserve mass 692 DO l=1,nlay 693 DO ig=1,ngrid 694 IF ((pqeff(ig,l,igcm_ccnco2_number) + 695 & ptimestep* (pdq(ig,l,igcm_ccnco2_number) + 696 & pdqcloudco2(ig,l,igcm_ccnco2_number)) 697 & .lt. 1.) 698 & .or. (pqeff(ig,l,igcm_ccnco2_mass) + 699 & ptimestep* (pdq(ig,l,igcm_ccnco2_mass) + 700 & pdqcloudco2(ig,l,igcm_ccnco2_mass)) 701 & .lt. 1.e-20)) THEN 702 pdqcloudco2(ig,l,igcm_ccnco2_number) = 703 & - pqeff(ig,l,igcm_ccnco2_number)/ptimestep 704 & - pdq(ig,l,igcm_ccnco2_number)+1. 705 pdqcloudco2(ig,l,igcm_dust_number) = 706 & -pdqcloudco2(ig,l,igcm_ccnco2_number) 707 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 708 & - pqeff(ig,l,igcm_ccnco2_mass)/ptimestep 709 & - pdq(ig,l,igcm_ccnco2_mass)+1.e-20 710 pdqcloudco2(ig,l,igcm_dust_mass) = 711 & -pdqcloudco2(ig,l,igcm_ccnco2_mass) 712 ENDIF 713 ENDDO 714 ENDDO 715 DO l=1,nlay 716 DO ig=1,ngrid 717 IF ( (pqeff(ig,l,igcm_dust_number) + 718 & ptimestep* (pdq(ig,l,igcm_dust_number) + 719 & pdqcloudco2(ig,l,igcm_dust_number)) .le. 1.) 720 & .or. (pqeff(ig,l,igcm_dust_mass)+ 721 & ptimestep* (pdq(ig,l,igcm_dust_mass) + 722 & pdqcloudco2(ig,l,igcm_dust_mass)) 723 & .le. 1.e-20)) then 724 pdqcloudco2(ig,l,igcm_dust_number) = 725 & - pqeff(ig,l,igcm_dust_number)/ptimestep 726 & - pdq(ig,l,igcm_dust_number)+1. 727 pdqcloudco2(ig,l,igcm_ccnco2_number) = 728 & -pdqcloudco2(ig,l,igcm_dust_number) 729 pdqcloudco2(ig,l,igcm_dust_mass) = 730 & - pqeff(ig,l,igcm_dust_mass)/ptimestep 731 & - pdq(ig,l,igcm_dust_mass) +1.e-20 732 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 733 & -pdqcloudco2(ig,l,igcm_dust_mass) 734 ENDIF 735 ENDDO 736 ENDDO 737 !pq+ptime*(pdq+pdqc)=1 ! pdqc=1-pq/ptime-pdq 738 DO l=1,nlay 739 DO ig=1,ngrid 740 IF (pqeff(ig,l,igcm_co2_ice) + ptimestep* 741 & (pdq(ig,l,igcm_co2_ice) + pdqcloudco2(ig,l,igcm_co2_ice)) 742 & .lt. 1.e-15) THEN 743 pdqcloudco2(ig,l,igcm_co2_ice) = 744 & - pqeff(ig,l,igcm_co2_ice)/ptimestep-pdq(ig,l,igcm_co2_ice) 745 pdqcloudco2(ig,l,igcm_co2) = -pdqcloudco2(ig,l,igcm_co2_ice) 746 ENDIF 747 IF (pqeff(ig,l,igcm_co2) + ptimestep* 748 & (pdq(ig,l,igcm_co2) + pdqcloudco2(ig,l,igcm_co2)) 749 & .lt. 0.1) THEN 750 pdqcloudco2(ig,l,igcm_co2) = 751 & - pqeff(ig,l,igcm_co2)/ptimestep - pdq(ig,l,igcm_co2) 752 pdqcloudco2(ig,l,igcm_co2_ice)= -pdqcloudco2(ig,l,igcm_co2) 753 ENDIF 714 754 ENDDO 715 755 ENDDO 716 756 717 718 DO l=1,nlay 719 DO ig=1,ngrid 720 pdqcloudco2(ig,l,igcm_dust_mass) = 721 & subpdq(ig,l,igcm_dust_mass)/real(imicro) 722 & - pdq(ig,l,igcm_dust_mass) 723 pdqcloudco2(ig,l,igcm_dust_number) = 724 & subpdq(ig,l,igcm_dust_number)/real(imicro) 725 & - pdq(ig,l,igcm_dust_number) 726 ENDDO 727 ENDDO 728 729 c------- Due to stepped entry, other processes tendencies can add up to negative values 730 c------- Therefore, enforce positive values and conserve mass 731 732 733 734 DO l=1,nlay 735 DO ig=1,ngrid 736 IF ((pqeff(ig,l,igcm_ccnco2_number) + 737 & ptimestep* (pdq(ig,l,igcm_ccnco2_number) + 738 & pdqcloudco2(ig,l,igcm_ccnco2_number)) 739 & .lt. 1.e-20) 740 & .or. (pqeff(ig,l,igcm_ccnco2_mass) + 741 & ptimestep* (pdq(ig,l,igcm_ccnco2_mass) + 742 & pdqcloudco2(ig,l,igcm_ccnco2_mass)) 743 & .lt. 1.e-30)) THEN 744 745 pdqcloudco2(ig,l,igcm_ccnco2_number) = 746 & - pqeff(ig,l,igcm_ccnco2_number)/ptimestep 747 & - pdq(ig,l,igcm_ccnco2_number)+1.e-20 748 pdqcloudco2(ig,l,igcm_dust_number) = 749 & -pdqcloudco2(ig,l,igcm_ccnco2_number) 750 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 751 & - pqeff(ig,l,igcm_ccnco2_mass)/ptimestep 752 & - pdq(ig,l,igcm_ccnco2_mass)+1.e-30 753 pdqcloudco2(ig,l,igcm_dust_mass) = 754 & -pdqcloudco2(ig,l,igcm_ccnco2_mass) 755 756 ENDIF 757 ENDDO 758 ENDDO 759 760 761 762 DO l=1,nlay 763 DO ig=1,ngrid 764 IF ( (pqeff(ig,l,igcm_dust_number) + 765 & ptimestep* (pdq(ig,l,igcm_dust_number) + 766 & pdqcloudco2(ig,l,igcm_dust_number)) .le. 1.e-30) 767 & .or. (pqeff(ig,l,igcm_dust_mass)+ 768 & ptimestep* (pdq(ig,l,igcm_dust_mass) + 769 & pdqcloudco2(ig,l,igcm_dust_mass)) 770 & .le. 1.e-30)) then 771 772 pdqcloudco2(ig,l,igcm_dust_number) = 773 & - pqeff(ig,l,igcm_dust_number)/ptimestep 774 & - pdq(ig,l,igcm_dust_number)+1.e-30 775 pdqcloudco2(ig,l,igcm_ccnco2_number) = 776 & -pdqcloudco2(ig,l,igcm_dust_number) 777 pdqcloudco2(ig,l,igcm_dust_mass) = 778 & - pqeff(ig,l,igcm_dust_mass)/ptimestep 779 & - pdq(ig,l,igcm_dust_mass) +1.e-30 780 pdqcloudco2(ig,l,igcm_ccnco2_mass) = 781 & -pdqcloudco2(ig,l,igcm_dust_mass) 782 783 ENDIF 784 ENDDO 785 ENDDO 786 !pq+ptime*(pdq+pdqc)=1 ! pdqc=1-pq/ptime-pdq 787 c$$$ 788 c$$$ 789 c$$$ DO l=1,nlay 790 c$$$ DO ig=1,ngrid 791 c$$$ IF (pq(ig,l,igcm_co2_ice) + ptimestep* 792 c$$$ & (pdq(ig,l,igcm_co2_ice) + pdqcloudco2(ig,l,igcm_co2_ice)) 793 c$$$ & .lt. 1.e-30) THEN 794 c$$$ pdqcloudco2(ig,l,igcm_co2_ice) = 795 c$$$ & - pq(ig,l,igcm_co2_ice)/ptimestep - pdq(ig,l,igcm_co2_ice) 796 c$$$ pdqcloudco2(ig,l,igcm_co2) = -pdqcloudco2(ig,l,igcm_co2_ice) 797 c$$$ !write(*,*) "WARNING CO2 ICE in co2cloud.F" 798 c$$$ 799 c$$$ ENDIF 800 c$$$ IF (pq(ig,l,igcm_co2) + ptimestep* 801 c$$$ & (pdq(ig,l,igcm_co2) + pdqcloudco2(ig,l,igcm_co2)) 802 c$$$ & .lt. 0.5) THEN 803 c$$$ pdqcloudco2(ig,l,igcm_co2) = 804 c$$$ & - pdq(ig,l,igcm_co2_ice) !- pdq(ig,l,igcm_co2) 805 c$$$c pdqcloudco2(ig,l,igcm_co2_ice) = -pdqcloudco2(ig,l,igcm_co2) 806 c$$$ pdqcloudco2(ig,l,igcm_co2_ice) = 807 c$$$ & - pq(ig,l,igcm_co2_ice)/ptimestep - pdq(ig,l,igcm_co2_ice) 808 c$$$ ! write(*,*) "WARNING CO2 in co2cloud.F" 809 c$$$ ENDIF 810 c$$$ ENDDO 811 c$$$ ENDDO 812 c$$$ 813 757 c Update clouds parameters values in the cloud fraction (for output) 814 758 DO l=1, nlay 815 759 DO ig=1,ngrid 816 760 817 c call updaterice_microco2(818 c & pq(ig,l,igcm_co2_ice) + ! ice mass819 c & (pdq(ig,l,igcm_co2_ice) + ! ice mass820 c & pdqcloudco2(ig,l,igcm_co2_ice))*ptimestep, ! ice mass821 c & pq(ig,l,igcm_ccnco2_mass) + ! ccn mass822 c & (pdq(ig,l,igcm_ccnco2_mass) + ! ccn mass823 c & pdqcloudco2(ig,l,igcm_ccnco2_mass))*ptimestep, ! ccn mass824 c & pq(ig,l,igcm_ccnco2_number) + ! ccn number825 c & (pdq(ig,l,igcm_ccnco2_number) + ! ccn number826 c & pdqcloudco2(ig,l,igcm_ccnco2_number))*ptimestep, ! ccn number827 c & tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l))828 c write(*,*) "in co2clouds, riceco2(ig,l)= ",riceco2(ig,l)829 761 Niceco2=pqeff(ig,l,igcm_co2_ice) + 830 762 & (pdq(ig,l,igcm_co2_ice) + … … 835 767 Nccnco2=max((pqeff(ig,l,igcm_ccnco2_number) + 836 768 & (pdq(ig,l,igcm_ccnco2_number) + 837 & pdqcloudco2(ig,l,igcm_ccnco2_number))*ptimestep) *838 & tauscaling(ig),1.e-30)769 & pdqcloudco2(ig,l,igcm_ccnco2_number))*ptimestep) 770 & ,1.e-30) 839 771 Qccnco2=max((pqeff(ig,l,igcm_ccnco2_mass) + 840 772 & (pdq(ig,l,igcm_ccnco2_mass) + 841 & pdqcloudco2(ig,l,igcm_ccnco2_mass))*ptimestep) *842 & tauscaling(ig),1.e-30)773 & pdqcloudco2(ig,l,igcm_ccnco2_mass))*ptimestep) 774 & ,1.e-30) 843 775 844 if (Nccnco2 .lt. 0.1) then845 rdust(ig,l)=1.e-10846 else847 848 rdust(ig,l)= Qccnco2849 & *0.75/pi/rho_dust850 & / Nccnco2851 rdust(ig,l)= rdust(ig,l)**(1./3.)852 rdust(ig,l)=max(1.e-10,rdust(ig,l))853 c rdust(ig,l)=min(5.e-6,rdust(ig,l))854 endif855 776 myT=zteff(ig,l)+(pdt(ig,l)+pdtcloudco2(ig,l))*ptimestep 856 777 rho_ice_co2T(ig,l)=1000.*(1.72391-2.53e-4* 857 778 & myT-2.87e-6* myT* myT) 858 779 rho_ice_co2=rho_ice_co2T(ig,l) 859 860 lw = l0 + l1 * myT + l2 *myT**2 + 861 & l3 * myT**3 + l4 * myT**4 !J.kg-1 862 863 riceco2(ig,l)=(Niceco2*3.0/ 864 & (4.0*rho_ice_co2*pi*Nccnco2) 865 & +rdust(ig,l)*rdust(ig,l) 866 & *rdust(ig,l) )**(1.0/3.0) 867 c & .or. (riceco2(ig,l) .le. rdust(ig,l)) 868 if ( (Niceco2 .le. 1.e-25).or. (Nccnco2 .le. 0.1) )THEN !anciennement 200 869 c riceco2(ig,l)=0. 870 871 c & .or. (Nccnco2 .le. 1.) 872 c endif 873 !Flux chaleur latente <0 quand sublimation 874 875 pdtcloudco2(ig,l)= pdtcloudco2(ig,l)-Niceco2*lw/cpp/ptimestep 876 c$$$ !NO CLOUD : RESET TRACERS AND CONSERVE MASS 877 c if (pq(ig,l,igcm_co2_ice)+(pdq(ig,l,igcm_co2_ice)+ 878 c & pdqcloudco2(ig,l,igcm_co2_ice))*ptimestep .le. 0.) then 879 c pdqcloudco2(ig,l,igcm_co2)=0. 880 c pdqcloudco2(ig,l,igcm_co2_ice)=0. 881 c else 882 pdqcloudco2(ig,l,igcm_co2_ice)=-1.*pqeff(ig,l,igcm_co2_ice) 883 & /ptimestep-pdq(ig,l,igcm_co2_ice) 884 pdqcloudco2(ig,l,igcm_co2)=-1.* 885 & pdqcloudco2(ig,l,igcm_co2_ice) 886 c endif 887 ! Reverse h2o ccn and ices into h2o tracers 888 if (memdMMccn(ig,l) .gt. 0) then 889 pdqcloudco2(ig,l,igcm_ccn_mass)=memdMMccn(ig,l)/ptimestep 890 else 891 memdMMccn(ig,l)=0. 892 pdqcloudco2(ig,l,igcm_ccn_mass)=0. 893 endif 894 if (memdNNccn(ig,l) .gt. 0) then 895 pdqcloudco2(ig,l,igcm_ccn_number)=memdNNccn(ig,l)/ptimestep 896 else 897 memdNNccn(ig,l)=0. 898 pdqcloudco2(ig,l,igcm_ccn_number)=0. 899 endif 900 if (memdMMh2o(ig,l) .gt. 0) then 901 pdqcloudco2(ig,l,igcm_h2o_ice)=memdMMh2o(ig,l)/ptimestep 902 else 903 memdMMh2o(ig,l)=0. 904 pdqcloudco2(ig,l,igcm_h2o_ice)=0. 905 endif 906 c if (pq(ig,l,igcm_ccnco2_mass)+(pdq(ig,l,igcm_ccnco2_mass)+ 907 c & pdqcloudco2(ig,l,igcm_ccnco2_mass))*ptimestep 908 c & .le. 1.e-30) then 909 c pdqcloudco2(ig,l,igcm_ccnco2_mass)=0. 910 c pdqcloudco2(ig,l,igcm_ccnco2_number)=0. 911 c pdqcloudco2(ig,l,igcm_co2)=0. 912 c pdqcloudco2(ig,l,igcm_co2_ice)=0. 913 c else 914 pdqcloudco2(ig,l,igcm_ccnco2_mass)= 915 & -1.*pqeff(ig,l,igcm_ccnco2_mass) 916 & /ptimestep-pdq(ig,l,igcm_ccnco2_mass) 917 c endif 918 c if (pq(ig,l,igcm_ccnco2_number)+ 919 c & (pdq(ig,l,igcm_ccnco2_number)+ 920 c & pdqcloudco2(ig,l,igcm_ccnco2_number)) 921 c & *ptimestep.le. 1.e-30) 922 c & then 923 c pdqcloudco2(ig,l,igcm_ccnco2_mass)=0. 924 c pdqcloudco2(ig,l,igcm_ccnco2_number)=0. 925 c pdqcloudco2(ig,l,igcm_co2)=0. 926 c pdqcloudco2(ig,l,igcm_co2_ice)=0. 927 c else 928 pdqcloudco2(ig,l,igcm_ccnco2_number)= 929 & -1.*pqeff(ig,l,igcm_ccnco2_number) 930 & /ptimestep-pdq(ig,l,igcm_ccnco2_number) 931 c endif 932 c if (pq(ig,l,igcm_dust_number)+ 933 c & (pdq(ig,l,igcm_dust_number)+ 934 c & pdqcloudco2(ig,l,igcm_dust_number)) 935 c & *ptimestep.le. 1.e-30) 936 c & then 937 c pdqcloudco2(ig,l,igcm_dust_number)=0. 938 c pdqcloudco2(ig,l,igcm_dust_mass)=0. 939 c else 940 pdqcloudco2(ig,l,igcm_dust_number)= 941 & pqeff(ig,l,igcm_ccnco2_number) 942 & /ptimestep+pdq(ig,l,igcm_ccnco2_number) 943 & -memdNNccn(ig,l)/ptimestep 944 c endif 945 c if (pq(ig,l,igcm_dust_mass)+ 946 c & (pdq(ig,l,igcm_dust_mass)+ 947 c & pdqcloudco2(ig,l,igcm_dust_mass)) 948 c & *ptimestep .le. 1.e-30) 949 c & then 950 c pdqcloudco2(ig,l,igcm_dust_number)=0. 951 c pdqcloudco2(ig,l,igcm_dust_mass)=0. 952 c else 953 pdqcloudco2(ig,l,igcm_dust_mass)= 954 & pqeff(ig,l,igcm_ccnco2_mass) 955 & /ptimestep+pdq(ig,l,igcm_ccnco2_mass) 956 & -(memdMMh2o(ig,l)+memdMMccn(ig,l))/ptimestep 957 c endif 958 memdMMccn(ig,l)=0. 959 memdMMh2o(ig,l)=0. 960 memdNNccn(ig,l)=0. 961 riceco2(ig,l)=0. 962 endif 780 c rho_ice_co2 is shared by tracer_mod and used in updaterice 781 c Compute particle size 782 call updaterice_microco2(Niceco2, 783 & Qccnco2,Nccnco2, 784 & tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l)) 785 786 if ( (Niceco2 .le. 1.e-25 .or. 787 & Nccnco2*tauscaling(ig) .le. 1.) )THEN 788 riceco2(ig,l)=0. 789 endif 963 790 c Compute opacities 964 No=Nccnco2 965 Rn=-log(riceco2(ig,l)) 966 n_derf = erf( (rb_cldco2(1)+Rn) *dev2) 967 Qext1bins2(ig,l)=0. 968 do i = 1, nbinco2_cld !Qext below 50 is negligible 969 n_aer(i) = -0.5 * No * n_derf !! this ith previously computed 970 n_derf = derf((rb_cldco2(i+1)+Rn) *dev2) 971 n_aer(i) = n_aer(i) + 0.5 * No * n_derf 972 Qext1bins2(ig,l)=Qext1bins2(ig,l)+Qext1bins(i)*n_aer(i) 973 enddo 974 !l'opacité de la case ig est la somme sur l de Qext1bins2 975 976 791 No=Nccnco2*tauscaling(ig) 792 Rn=-dlog(riceco2(ig,l)) 793 n_derf = derf( (rb_cldco2(1)+Rn) *dev2) 794 Qext1bins2(ig,l)=0. 795 do i = 1, nbinco2_cld 796 n_aer(i) = -0.5 * No * n_derf !! this ith previously computed 797 n_derf = derf((rb_cldco2(i+1)+Rn) *dev2) 798 n_aer(i) = n_aer(i) + 0.5 * No * n_derf 799 Qext1bins2(ig,l)=Qext1bins2(ig,l)+Qext1bins(i)*n_aer(i) 800 enddo 801 977 802 !update rice water 978 803 call updaterice_micro( … … 988 813 & tauscaling(ig),rice(ig,l),rhocloud(ig,l)) 989 814 990 991 815 call updaterdust( 992 816 & pqeff(ig,l,igcm_dust_mass) + ! dust mass … … 999 823 1000 824 ENDDO 1001 ENDDO 1002 tau1mic(:)=0. 1003 do l=1,nlay 1004 do ig=1,ngrid 1005 tau1mic(ig)=tau1mic(ig)+Qext1bins2(ig,l) 1006 enddo 1007 enddo 1008 1009 c$$$ 1010 c$$$ if (riceco2(725,22) .ge. 1.e-10) then 1011 c$$$ 1012 c$$$ write(*,*) 'DIAGJA co2 ',pqeff(725,22,igcm_co2) + 1013 c$$$ & (pdq(725,22,igcm_co2) + 1014 c$$$ & pdqcloudco2(725,22,igcm_co2))*ptimestep 1015 c$$$ write(*,*) 'DIAGJA co2_ice',pqeff(725,22,igcm_co2_ice) + 1016 c$$$ & (pdq(725,22,igcm_co2_ice) + 1017 c$$$ & pdqcloudco2(725,22,igcm_co2_ice))*ptimestep 1018 c$$$ 1019 c$$$ write(*,*) 'DIAGJA riceco2',riceco2(725,22) 1020 c$$$ write(*,*) 'DIAGJA T',zteff(725,22) + 1021 c$$$ & (pdt(725,22) + pdtcloudco2(725,22))*ptimestep 1022 c$$$ write(*,*) 'DIAG pdtcloud',pdtcloudco2(725,22)*ptimestep 1023 c$$$ write(*,*) 'DIAGJA ccnNco2',pqeff(725,22,igcm_ccnco2_number)+ 1024 c$$$ & (pdq(725,22,igcm_ccnco2_number) + 1025 c$$$ & pdqcloudco2(725,22,igcm_ccnco2_number))*ptimestep 1026 c$$$ 1027 c$$$ write(*,*) 'DIAGJA dustN',pqeff(725,22,igcm_dust_number) + 1028 c$$$ & (pdq(725,22,igcm_dust_number) + 1029 c$$$ & pdqcloudco2(725,22,igcm_dust_number))*ptimestep 1030 c$$$ ENDIF 1031 c$$$ 1032 1033 825 ENDDO 1034 826 1035 827 c A correction if a lot of subliming CO2 fills the 1st layer FF04/2005 1036 828 c ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 1037 829 c Then that should not affect the ice particle radius 1038 do ig=1,ngrid 1039 if(pdpsrf(ig)*ptimestep.gt.0.9*(pplev(ig,1)-pplev(ig,2)))then 1040 if(pdpsrf(ig)*ptimestep.gt.0.9*(pplev(ig,1)-pplev(ig,3))) 1041 & riceco2(ig,2)=riceco2(ig,3) 1042 riceco2(ig,1)=riceco2(ig,2) 830 831 do ig=1,ngrid 832 if(pdpsrf(ig)*ptimestep.gt.0.9*(pplev(ig,1)-pplev(ig,2)))then 833 if(pdpsrf(ig)*ptimestep.gt.0.9*(pplev(ig,1)-pplev(ig,3))) 834 & riceco2(ig,2)=riceco2(ig,3) 835 riceco2(ig,1)=riceco2(ig,2) 1043 836 end if 1044 837 end do 1045 838 1046 1047 DO l=1,nlay 839 DO l=1,nlay 1048 840 DO ig=1,ngrid 1049 841 rsedcloud(ig,l)=max(rice(ig,l)* … … 1071 863 & pdqcloudco2(ig,l,igcm_co2))*ptimestep)* 1072 864 & (mmean(ig,l)/44.01)*pplay(ig,l)/zqsatco2(ig,l) 1073 !write(*,*) "In CO2 pt,sat ",pt(ig,l),satuco2(ig,l)1074 865 enddo 1075 866 enddo … … 1097 888 & pdqcloudco2(ig,l,igcm_co2)*cloudfrac(ig,l) 1098 889 pdtcloudco2(ig,l)=pdtcloudco2(ig,l)*cloudfrac(ig,l) 890 Qext1bins2(ig,l)=Qext1bins2(ig,l)*cloudfrac(ig,l) 1099 891 ENDDO 1100 892 ENDDO 1101 893 ENDIF 1102 894 !l'opacité de la case ig est la somme sur l de Qext1bins2: Est-ce-vrai? 895 tau1mic(:)=0. 896 do l=1,nlay 897 do ig=1,ngrid 898 tau1mic(ig)=tau1mic(ig)+Qext1bins2(ig,l) 899 enddo 900 enddo 901 !Outputs: 902 call WRITEDIAGFI(ngrid,"SatIndex","SatIndex"," ",3, 903 & SatIndex) 1103 904 call WRITEDIAGFI(ngrid,"satuco2","vap in satu","kg/kg",3, 1104 905 & satuco2) 1105 906 call WRITEdiagfi(ngrid,"riceco2","ice radius","m" 1106 & ,3,riceco2) 1107 ! or output in diagfi.nc (for testphys1d) 1108 c call WRITEDIAGFI(ngrid,'ps','Surface pressure','Pa',0,ps) 1109 c call WRITEDIAGFI(ngrid,'temp','Temperature ', 1110 c & 'K JA',1,pt) 907 & ,3,riceco2) 908 call WRITEdiagfi(ngrid,"cloudfrac","co2 cloud fraction" 909 & ," ",3,cloudfrac) 910 call WRITEdiagfi(ngrid,"rsedcloudco2","rsed co2" 911 & ,"m",3,rsedcloudco2) 912 call WRITEdiagfi(ngrid,"Tau3D1mic"," co2 ice opacities" 913 & ," ",3,Qext1bins2) 914 call WRITEdiagfi(ngrid,"tau1mic","co2 ice opacity 1 micron" 915 & ," ",2,tau1mic) 1111 916 1112 call WRITEdiagfi(ngrid,"rsedcloudco2","rsed co2","m",3, 1113 & rsedcloudco2) 1114 1115 call WRITEdiagfi(ngrid,"tau1mic","co2 ice opacity 1 micron"," ",2, 1116 & tau1mic) 1117 call WRITEdiagfi(ngrid,"cloudfrac","co2 cloud fraction"," ",3, 1118 & cloudfrac) 1119 ! used for rad. transfer calculations 1120 ! nuice is constant because a lognormal distribution is prescribed 1121 c nuice(1:ngrid,1:nlay)=nuice_ref 1122 1123 1124 1125 c======================================================================= 1126 1127 END 1128 917 END -
trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F
r1720 r1816 1 1 subroutine improvedCO2clouds(ngrid,nlay,ptimestep, 2 & pplay,p zlev,pt,pdt,2 & pplay,pplev,pt,pdt, 3 3 & pq,pdq,pdqcloudco2,pdtcloudco2, 4 4 & nq,tauscaling, 5 5 & memdMMccn,memdMMh2o,memdNNccn) 6 ! to use 'getin'7 6 USE comcstfi_h 8 7 USE ioipsl_getincom 9 8 USE updaterad 10 9 use tracer_mod 11 !, only: rho_ice_co2, nuiceco2_sed, igcm_co2,12 ! & rho_ice,igcm_h2o_ice, igcm_ccn_number,13 ! & igcm_co2_ice, igcm_dust_mass,14 ! & igcm_dust_number, igcm_ccnco2_mass,15 ! & igcm_ccnco2_number16 10 use conc_mod, only: mmean 17 11 … … 45 39 c Adaptation for CO2 clouds by Joachim Audouard (09/16), based on the work 46 40 c of Constantino Listowski 41 c Warning: 42 c If meteoritic particles are activated and turn into co2 ice particles, 43 c then they will be reversed in the dust tracers if the cloud sublimates 44 47 45 c------------------------------------------------------------------ 48 !#include "dimensions.h"49 !#include "dimphys.h"50 46 #include "callkeys.h" 51 !#include "tracer.h"52 !#include "comgeomfi.h"53 !#include "dimradmars.h"54 47 #include "microphys.h" 55 48 #include "datafile.h" 56 !#include "microphysCO2.h"57 !#include "conc.h"58 49 c------------------------------------------------------------------ 59 50 c Inputs: … … 63 54 REAL ptimestep ! pas de temps physique (s) 64 55 REAL pplay(ngrid,nlay) ! pression au milieu des couches (Pa) 65 REAL p zlev(ngrid,nlay) ! altitude au milieu des couches ()66 56 REAL pplev(ngrid,nlay+1) ! pression inter couches (Pa) 57 real masse (ngrid,nlay) ! Layer mass (kg.m-2) 67 58 REAL pt(ngrid,nlay) ! temperature at the middle of the 68 59 ! layers (K) … … 73 64 ! (kg/kg.s-1) 74 65 REAL tauscaling(ngrid) ! Convertion factor for qdust and Ndust 75 76 66 REAL rice(ngrid,nlay) ! Water Ice mass mean radius (m) 77 67 ! used for nucleation of CO2 on ice-coated ccns 78 68 REAL rccnh2o(ngrid,nlay) ! Water Ice mass mean radius (m) 79 80 69 c Outputs: 81 70 REAL pdqcloudco2(ngrid,nlay,nq) ! tendance de la condensation … … 87 76 c------------------------------------------------------------------ 88 77 c Local variables: 89 90 78 LOGICAL firstcall 91 79 DATA firstcall/.true./ 92 80 SAVE firstcall 93 94 81 REAL*8 derf ! Error function 95 !external derf96 97 !REAL*8 massflowrateCO298 !external massflowrateCO299 100 82 INTEGER ig,l,i,flag_pourri 101 83 … … 104 86 REAL zt(ngrid,nlay) ! local value of temperature 105 87 REAL zqsat(ngrid,nlay) ! saturation vapor pressure for CO2 88 real tcond(ngrid,nlay) 89 real zqco2(ngrid,nlay) 106 90 REAL lw !Latent heat of sublimation (J.kg-1) 107 91 REAL,save :: l0,l1,l2,l3,l4 108 REAL cste109 92 DOUBLE PRECISION dMice ! mass of condensed ice 110 93 DOUBLE PRECISION sumcheck 111 DOUBLE PRECISION pco2 ! Co2 vapor partial pressure (Pa) 94 DOUBLE PRECISION facteurmax!for energy limit on mass growth 95 DOUBLE PRECISION pco2,psat ! Co2 vapor partial pressure (Pa) 112 96 DOUBLE PRECISION satu ! Co2 vapor saturation ratio over ice 113 97 DOUBLE PRECISION Mo,No … … 116 100 DOUBLE PRECISION memdMMh2o(ngrid,nlay) 117 101 DOUBLE PRECISION memdNNccn(ngrid,nlay) 118 102 119 103 ! Radius used by the microphysical scheme (m) 120 104 DOUBLE PRECISION n_aer(nbinco2_cld) ! number concentration volume-1 of particle/each size bin … … 149 133 c Parameters of the size discretization 150 134 c used by the microphysical scheme 151 DOUBLE PRECISION, PARAMETER :: rmin_cld = 1.e-11 ! Minimum radius (m) 152 DOUBLE PRECISION, PARAMETER :: rmax_cld = 3.e-6 ! Maximum radius (m) 153 DOUBLE PRECISION, PARAMETER :: rbmin_cld =1.e-12 154 ! Minimum bounary radius (m) 155 DOUBLE PRECISION, PARAMETER :: rbmax_cld = 5.e-6 ! Maximum boundary radius (m) 135 DOUBLE PRECISION, PARAMETER :: rmin_cld = 1.e-9 ! Minimum radius (m) 136 DOUBLE PRECISION, PARAMETER :: rmax_cld = 5.e-6 ! Maximum radius (m) 137 DOUBLE PRECISION, PARAMETER :: rbmin_cld =1.e-10! Minimum bounary radius (m) 138 DOUBLE PRECISION, PARAMETER :: rbmax_cld = 2.e-4 ! Maximum boundary radius (m) 156 139 DOUBLE PRECISION vrat_cld ! Volume ratio 157 140 DOUBLE PRECISION rb_cldco2(nbinco2_cld+1) ! boundary values of each rad_cldco2 bin (m) 158 141 SAVE rb_cldco2 159 160 DOUBLE PRECISION dr_cld(nbinco2_cld) ! width of each rad_cldco2 bin (m) 142 DOUBLE PRECISION dr_cld(nbinco2_cld) ! width of each rad_cldco2 bin (m) 161 143 DOUBLE PRECISION vol_cld(nbinco2_cld) ! particle volume for each bin (m3) 162 144 163 145 DOUBLE PRECISION Proba,Masse_atm,drsurdt,reff,Probah2o 164 REAL sigma_iceco2 ! Variance of the ice and CCN distributions 165 SAVE sigma_iceco2 166 167 168 REAL sigma_ice ! Variance of the ice and CCN distributions 146 REAL sigma_iceco2 ! Variance of the co2 ice and CCN distributions 147 SAVE sigma_iceco2 148 REAL sigma_ice ! Variance of the h2o ice and CCN distributions 169 149 SAVE sigma_ice 170 171 150 DOUBLE PRECISION Niceco2,Qccnco2,Nccnco2 172 173 integer coeffh2o 174 !Variables for the meteoritic flux 175 176 double precision meteo_ccn(ngrid,nlay,100) !100=nbinco2_cld !!! 177 double precision,save :: meteo(130,100) 178 double precision mtemp(100) 179 logical file_ok 180 integer altitudes_meteo(130),nelem,lebon1,lebon2 181 double precision :: ltemp1(130),ltemp2(130) 182 integer ibin,uMeteo,j 183 c---------------------------------- 184 c TESTS 185 186 187 188 REAL satubf(ngrid,nlay),satuaf(ngrid,nlay) 189 REAL res_out(ngrid,nlay) 190 191 192 c------------------------------------------------------------------ 151 integer,save :: coeffh2o !will be =0 is co2useh2o=.false. 152 ! Variables for the meteoritic flux: 153 double precision meteo_ccn(ngrid,nlay,100) !100=nbinco2_cld !!! 154 double precision,save :: meteo(130,100) 155 double precision mtemp(100),pression_meteo(130) 156 logical file_ok 157 integer nelem,lebon1,lebon2 158 double precision :: ltemp1(130),ltemp2(130) 159 integer ibin,uMeteo,j 193 160 194 161 IF (firstcall) THEN … … 204 171 c dr_cld is the width of each rad_cldco2 bin. 205 172 206 c Volume ratio between two adjacent bins 207 ! vrat_cld = log(rmax_cld/rmin_cld) / float(nbinco2_cld-1) *3. 208 ! vrat_cld = exp(vrat_cld) 209 vrat_cld = log(rmax_cld/rmin_cld) / float(nbinco2_cld-1) *3. 210 vrat_cld = exp(vrat_cld) 211 c write(*,*) "vrat_cld", vrat_cld 212 173 vrat_cld = dlog(rmax_cld/rmin_cld) / float(nbinco2_cld-1) *3. 174 vrat_cld = dexp(vrat_cld) 213 175 rb_cldco2(1) = rbmin_cld 214 176 rad_cldco2(1) = rmin_cld 215 177 vol_cld(1) = 4./3. * dble(pi) * rmin_cld*rmin_cld*rmin_cld 216 ! vol_cld(1) = 4./3. * pi * rmin_cld*rmin_cld*rmin_cld217 218 178 do i=1,nbinco2_cld-1 219 179 rad_cldco2(i+1) = rad_cldco2(i) * vrat_cld**(1./3.) 220 180 vol_cld(i+1) = vol_cld(i) * vrat_cld 221 enddo 222 181 enddo 223 182 do i=1,nbinco2_cld 224 183 rb_cldco2(i+1)= ( (2.*vrat_cld) / (vrat_cld+1.) )**(1./3.) * … … 229 188 dr_cld(nbinco2_cld) = rb_cldco2(nbinco2_cld+1) - 230 189 & rb_cldco2(nbinco2_cld) 231 232 190 print*, ' ' 233 191 print*,'Microphysics co2: size bin information:' … … 240 198 write(*,'(i3,3x,e12.6)') nbinco2_cld+1,rb_cldco2(nbinco2_cld+1) 241 199 print*,'-----------------------------------' 242 243 200 do i=1,nbinco2_cld+1 244 rb_cldco2(i) = log(rb_cldco2(i)) !! we save that so that it is not computed201 rb_cldco2(i) = dlog(rb_cldco2(i)) !! we save that so that it is not computed 245 202 !! at each timestep and gridpoint 246 203 enddo … … 250 207 c mtetaco2 = 0.952 251 208 write(*,*) 'co2_param contact parameter:', mtetaco2 252 253 209 c Volume of a co2 molecule (m3) 254 210 vo1 = m0co2 / dble(rho_ice_co2) ! m0co2 et non mco2 211 c below, vo1 will be recomputed using real rho ice co2 (T-dependant) 255 212 vo1co2=vo1 ! AJOUT JA 256 213 c Variance of the ice and CCN distributions … … 258 215 sigma_ice = sqrt(log(1.+nuice_sed)) 259 216 260 261 c write(*,*) 'Variance of ice & CCN distribs :', sigma_iceco2262 c write(*,*) 'nuice for sedimentation:', nuiceco2_sed263 c write(*,*) 'Volume of a co2 molecule:', vo1co2264 217 265 218 write(*,*) 'Variance of ice & CCN CO2 distribs :', sigma_iceco2 … … 275 228 coeffh2o=1 276 229 endif 277 meteo_ccn(:,:,:)=0.278 279 230 if (meteo_flux) then 280 231 write(*,*) … … 282 233 write(*,*) "meteoritic dust particles are available" 283 234 write(*,*) "for co2 ice nucleation! " 284 write(*,*) "Flux given by J. Plane ( altitude,size bins)"235 write(*,*) "Flux given by J. Plane (pressions,size bins)" 285 236 ! Initialisation of the flux: it is constant and is it saved 286 !We must interpolate the table to the GCM altitudes237 !We must interpolate the table to the GCM pressures 287 238 INQUIRE(FILE=datafile(1:LEN_TRIM(datafile))// 288 239 & '/Meteo_flux_Plane.dat', EXIST=file_ok) … … 296 247 & '/Meteo_flux_Plane.dat' 297 248 & ,FORM='formatted') 298 !13000 records (130 altitudes x 100 bin sizes) 249 !13000 records (130 pressions x 100 bin sizes) 250 read(uMeteo,*) !skip 1 line 251 do i=1,130 252 read(uMeteo,*) pression_meteo(i) 253 write(*,*) pression_meteo(i) 254 enddo 255 read(uMeteo,*) !skip 1 line 299 256 do i=1,130 300 257 do j=1,100 ! les mêmes 100 bins size que la distri nuclea: on touche pas 301 258 read(uMeteo,'(F12.6)') meteo(i,j) 302 259 enddo 303 altitudes_meteo(i)=i ! On doit maintenant réinterpoler le tableau(130,100) sur les altitudes du GCM (nlay,100)260 !On doit maintenant réinterpoler le tableau(130,100) sur les pressions du GCM (nlay,100) 304 261 enddo 305 262 close(uMeteo) 306 endif !of if meteo_flux 307 263 write(*,*) "File meteo_flux read, end of firstcall in co2 micro" 264 endif !of if meteo_flux 265 266 ! Parameter values for Latent heat computation 308 267 l0=595594d0 309 268 l1=903.111d0 … … 312 271 l4=-0.000103183d0 313 272 firstcall=.false. 314 315 316 273 END IF 317 c write(*,*) "max memdNN =",maxval(memdNNccn)318 274 !============================================================= 319 275 ! 1. Initialisation 320 276 !============================================================= 321 !cste = 4*pi*rho_ice*ptimestep !not used for co2322 277 flag_pourri=0 323 324 res_out(:,:) = 0 278 meteo_ccn(:,:,:)=0. 325 279 rice(:,:) = 1.e-8 326 280 riceco2(:,:) = 1.e-11 … … 335 289 & pt(1:ngrid,1:nlay) + 336 290 & pdt(1:ngrid,1:nlay) * ptimestep 337 c call WRITEDIAGFI(ngrid,"Ztclouds",338 c & "Ztclouds",'K',3,zt)339 c call WRITEDIAGFI(ngrid,"pdtclouds",340 c & "pdtclouds",'K',3,pdt*ptimestep)341 342 291 zq(1:ngrid,1:nlay,1:nq) = 343 292 & pq(1:ngrid,1:nlay,1:nq) + 344 293 & pdq(1:ngrid,1:nlay,1:nq) * ptimestep 345 346 347 294 WHERE( zq(1:ngrid,1:nlay,1:nq) < 1.e-30 ) 348 & zq(1:ngrid,1:nlay,1:nq) = 1.e-30 349 350 zq0(1:ngrid,1:nlay,1:nq) = zq(1:ngrid,1:nlay,1:nq) 351 295 & zq(1:ngrid,1:nlay,1:nq) = 1.e-30 296 297 zq0(1:ngrid,1:nlay,1:nq) = zq(1:ngrid,1:nlay,1:nq) 352 298 !============================================================= 353 299 ! 2. Compute saturation 354 300 !============================================================= 355 356 357 358 301 dev2 = 1. / ( sqrt(2.) * sigma_iceco2 ) 359 302 dev3 = 1. / ( sqrt(2.) * sigma_ice ) 360 361 303 call co2sat(ngrid*nlay,zt,pplay,zqsat) !zqsat is psat(co2) 362 363 364 !============================================================= 365 ! 304 zqco2=zq(:,:,igcm_co2)+zq(:,:,igcm_co2_ice) 305 CALL tcondco2(ngrid,nlay,pplay,zqco2,tcond) 306 !============================================================= 307 ! 3. Bonus: additional meteoritic particles for nucleation 366 308 !============================================================= 367 309 if (meteo_flux) then 368 ! altitude_meteo(130)369 !p zlev(ngrid,nlay)310 !pression_meteo(130) 311 !pplev(ngrid,nlay+1) 370 312 !meteo(130,100) 371 313 !resultat: meteo_ccn(ngrid,nlay,100) 372 314 do l=1,nlay 373 315 do ig=1,ngrid 374 ltemp1=abs(altitudes_meteo(:)-pzlev(ig,l)) 375 ltemp2=abs(altitudes_meteo(:)-pzlev(ig,l+1)) 316 masse(ig,l)=(pplev(ig,l) - pplev(ig,l+1)) /g 317 ltemp1=abs(pression_meteo(:)-pplev(ig,l)) 318 ltemp2=abs(pression_meteo(:)-pplev(ig,l+1)) 376 319 lebon1=minloc(ltemp1,DIM=1) 377 320 lebon2=minloc(ltemp2,DIM=1) … … 381 324 mtemp(ibin)=sum(meteo(lebon1:lebon2,ibin)) 382 325 enddo 383 meteo_ccn(ig,l,:)=mtemp(:)/nelem 326 meteo_ccn(ig,l,:)=mtemp(:)/nelem/masse(ig,l) !Par kg air 327 csi par m carre, x epaisseur/masse pour par kg/air 328 !write(*,*) "masse air ig l=",masse(ig,l) 329 !check original unit with J. Plane 384 330 enddo 385 331 enddo 386 332 endif 387 388 c Main loop over the GCM's grid 333 c ------------------------------------------------------------------------ 334 c --------- Actual microphysics : Main loop over the GCM's grid --------- 335 c ------------------------------------------------------------------------ 389 336 DO l=1,nlay 390 337 DO ig=1,ngrid 391 338 c Get the partial pressure of co2 vapor and its saturation ratio 392 339 pco2 = zq(ig,l,igcm_co2) * (mmean(ig,l)/44.01) * pplay(ig,l) 393 c satu = zq(ig,l,igcm_co2) / zqsat(ig,l)394 340 satu = pco2 / zqsat(ig,l) 395 !============================================================= 396 ! 3. Nucleation 397 !============================================================= 341 398 342 rho_ice_co2T(ig,l)=1000.*(1.72391-2.53e-4*zt(ig,l) 399 & -2.87e-6*zt(ig,l)*zt(ig,l)) 343 & -2.87e-6*zt(ig,l)*zt(ig,l)) !T-dependant CO2 ice density 400 344 vo2co2 = m0co2 / dble(rho_ice_co2T(ig,l)) 401 345 rho_ice_co2=rho_ice_co2T(ig,l) 402 346 403 IF ( satu .ge. 1d0 ) THEN ! if there is condensation 404 347 !============================================================= 348 !4. Nucleation 349 !============================================================= 350 IF ( satu .ge. 1 ) THEN ! if there is condensation 351 352 c call updaterccn(zq(ig,l,igcm_dust_mass), 353 c & zq(ig,l,igcm_dust_number),rdust(ig,l),tauscaling(ig)) 354 355 !We do rdust computation "by hand" because we don't want to 356 ! change the mininumum rdust value in updaterad... It would 357 ! mess up various part of the GCM ! 358 405 359 rdust(ig,l)= zq(ig,l,igcm_dust_mass) 406 360 & *0.75/pi/rho_dust 407 361 & / zq(ig,l,igcm_dust_number) 408 362 rdust(ig,l)= rdust(ig,l)**(1./3.) 409 c write(*,*) "Improved2, l,Rdust = ",l,rdust(ig,l) 410 rdust(ig,l)=max(1.e-9,rdust(ig,l)) 411 c rdust(ig,l)=min(1.e-5,rdust(ig,l)) 412 ! write(*,*) "Improved3,Rdust = ",rdust(ig,l) 363 if (zq(ig,l,igcm_dust_mass)*tauscaling(ig) .le. 1.e-20 364 & .or. zq(ig,l,igcm_dust_number)*tauscaling(ig) .le.1 365 & .or. rdust(ig,l) .le. 1.e-9) then 366 rdust(ig,l)=1.e-9 367 endif 368 rdust(ig,l)=min(5.e-4,rdust(ig,l)) 413 369 414 370 c Expand the dust moments into a binned distribution … … 416 372 No = zq(ig,l,igcm_dust_number)* tauscaling(ig)+1.e-30 417 373 Rn = rdust(ig,l) 418 Rn = - log(Rn)374 Rn = -dlog(Rn) 419 375 Rm = Rn - 3. * sigma_iceco2*sigma_iceco2 420 n_derf = erf( (rb_cldco2(1)+Rn) *dev2)421 m_derf = erf( (rb_cldco2(1)+Rm) *dev2)376 n_derf = derf( (rb_cldco2(1)+Rn) *dev2) 377 m_derf = derf( (rb_cldco2(1)+Rm) *dev2) 422 378 423 379 do i = 1, nbinco2_cld … … 427 383 m_derf = derf((rb_cldco2(i+1)+Rm) *dev2) 428 384 n_aer(i) = n_aer(i) + 0.5 * No * n_derf + 429 & meteo_ccn(ig,l,i) !Ajout meteo_ccn 385 & meteo_ccn(ig,l,i) !Ajout meteo_ccn particles 430 386 m_aer(i) = m_aer(i) + 0.5 * Mo * m_derf 431 387 m_aer2(i)=4./3.*pi*rho_dust 432 & * n_aer(i)*rad_cldco2(i)*rad_cldco2(i)388 & *meteo_ccn(ig,l,i)*rad_cldco2(i)*rad_cldco2(i) 433 389 & *rad_cldco2(i) 434 c write(*,*) "diff =",rad_cldco2(i),m_aer(i),m_aer2(i)435 390 enddo 436 c write(*,*) "Bilan =",sum(m_aer),sum(m_aer2)391 if (meteo_flux) m_aer(:)=m_aer(:)+m_aer2(:) 437 392 438 c sumcheck = 0 439 c do i = 1, nbinco2_cld 440 c sumcheck = sumcheck + n_aer(i) 441 c enddo 442 c sumcheck = abs(sumcheck/No - 1) 443 c if ((sumcheck .gt. 1e-5).and. (1./Rn .gt. rmin_cld)) then 444 c print*, "WARNING, No sumcheck PROBLEM" 445 c print*, "sumcheck, No, rdust",sumcheck, No,rdust(ig,l) 446 c print*, "min radius, Rn, ig, l", rmin_cld, 1./Rn, ig, l 447 c print*, "Dust binned distribution", n_aer 448 c STOP 449 c endif 450 451 c sumcheck = 0 452 c do i = 1, nbinco2_cld 453 c sumcheck = sumcheck + m_aer(i) 454 c enddo 455 c sumcheck = abs(sumcheck/Mo - 1) 456 c if ((sumcheck .gt. 1e-5) .and. (1./Rn .gt. rmin_cld)) 457 c & then 458 c print*, "WARNING, Mo sumcheck PROBLEM" 459 c print*, "sumcheck, Mo",sumcheck, Mo 460 c print*, "min radius, Rm, ig, l", rmin_cld, 1./Rm, ig,l 461 c print*, "Dust binned distribution", m_aer 462 c STOP 463 c endif 464 m_aer(:)=m_aer2(:) 465 466 467 rccnh2o(ig,l)= zq(ig,l,igcm_ccn_mass) 468 & *0.75/pi/rho_dust 469 & / zq(ig,l,igcm_ccn_number) 470 471 rice(ig,l)=( zq(ig,l,igcm_h2o_ice)*3.0/ 472 & (4.0*rho_ice_co2*zq(ig,l,igcm_ccn_number) 473 & *pi*tauscaling(ig)) +rccnh2o(ig,l)*rccnh2o(ig,l) 474 & *rccnh2o(ig,l) )**(1.0/3.0) 475 rhocloud(ig,l)=( zq(ig,l,igcm_h2o_ice)*rho_ice 476 & +zq(ig,l,igcm_ccn_mass) *tauscaling(ig)*rho_dust) 477 & / (zq(ig,l,igcm_h2o_ice)+zq(ig,l,igcm_ccn_mass) 478 & *tauscaling(ig)) 479 c call updaterice_micro( 480 c & zq(ig,l,igcm_h2o_ice), ! ice mass 481 c & zq(ig,l,igcm_ccn_mass), ! ccn mass 482 c & zq(ig,l,igcm_ccn_number), ! ccn number 483 c & tauscaling(ig),rice(ig,l),rhocloud(ig,l)) 484 ! rice radius of CCN + H20 crystal 485 c write(*,*) "Improved1 Rice=",rice(ig,l) 486 rice(ig,l)=max(1.e-10,rice(ig,l)) 487 c rice(ig,l)=min(1.e-5,rice(ig,l)) 488 !write(*,*) "Improved2 Rice=",rice(ig,l) 393 !Same but with h2o particles as CCN 394 call updaterice_micro(zq(ig,l,igcm_h2o_ice), 395 & zq(ig,l,igcm_ccn_mass),zq(ig,l,igcm_ccn_number), 396 & tauscaling(ig),rice(ig,l),rhocloud(ig,l)) 489 397 Mo = zq(ig,l,igcm_h2o_ice) + 490 398 & zq(ig,l,igcm_ccn_mass)*tauscaling(ig)+1.e-30!*tauscaling(ig) … … 492 400 No = zq(ig,l,igcm_ccn_number)* tauscaling(ig) + 1.e-30 493 401 Rn = rice(ig,l) 494 Rn = - log(Rn)402 Rn = -dlog(Rn) 495 403 Rm = Rn - 3. * sigma_ice*sigma_ice 496 n_derf = erf( (rb_cldco2(1)+Rn) *dev3)497 m_derf = erf( (rb_cldco2(1)+Rm) *dev3)404 n_derf = derf( (rb_cldco2(1)+Rn) *dev3) 405 m_derf = derf( (rb_cldco2(1)+Rm) *dev3) 498 406 do i = 1, nbinco2_cld 499 407 n_aer_h2oice(i) = -0.5 * No * n_derf … … 504 412 m_aer_h2oice(i) = m_aer_h2oice(i) + 0.5 * Mo * m_derf 505 413 rad_h2oice(i) = rad_cldco2(i) 506 m_aer_h2oice2(i)=4./3.*pi*rhocloud(ig,l)507 & *n_aer_h2oice(i)*rad_h2oice(i)*rad_h2oice(i)508 & *rad_h2oice(i)509 510 511 c write(*,*) "before nuc, i,rad_h2o(i)= ",i,rad_cldco2(i)512 c & ,m_aer_h2oice(i),n_aer_h2oice(i)513 414 enddo 514 c sumcheck = 0 515 c do i = 1, nbinco2_cld 516 c sumcheck = sumcheck + n_aer_h2oice(i) 517 c enddo 518 c sumcheck = abs(sumcheck/No - 1) 519 c if ((sumcheck .gt. 1e-5).and. (1./Rn .gt. rmin_cld)) then 520 c print*, "WARNING, Noh2o sumcheck PROBLEM" 521 c print*, "sumcheck, No, rice",sumcheck, No,rice(ig,l) 522 c print*, "min radius, Rn, ig, l", rmin_cld, 1./Rn, ig, l 523 c print*, "Dust binned distribution", n_aer_h2oice 524 c STOP 525 c endif 526 527 c sumcheck = 0 528 c do i = 1, nbinco2_cld 529 c sumcheck = sumcheck + m_aer_h2oice(i) 530 c enddo 531 c sumcheck = abs(sumcheck/Mo - 1) 532 c if ((sumcheck .gt. 1e-5) .and. (1./Rn .gt. rmin_cld)) 533 c & then 534 c print*, "WARNING, Moh2o sumcheck PROBLEM" 535 c print*, "sumcheck, Mo",sumcheck, Mo 536 c print*, "min radius, Rm, ig, l", rmin_cld, 1./Rm, ig,l 537 c print*, "Dust binned distribution", m_aer_h2oice 538 c STOP 539 c endif 540 c Get the rates of nucleation 541 415 !Call to nucleation routine 542 416 call nucleaCO2(dble(pco2),zt(ig,l),dble(satu) 543 417 & ,n_aer,rate,n_aer_h2oice 544 418 & ,rad_h2oice,rateh2o,vo2co2) 545 m_aer_h2oice(:)=m_aer_h2oice2(:)546 419 dN = 0. 547 420 dM = 0. … … 550 423 do i = 1, nbinco2_cld 551 424 Proba=1.0-dexp(-1.*ptimestep*rate(i)) 552 Probah2o=coeffh2o*(1.0-dexp(-1.*ptimestep*rateh2o(i))) 425 Probah2o=coeffh2o*(1.0-dexp(-1.*ptimestep*rateh2o(i))) !if co2useh2o=.false., this is =0 553 426 dNh2o = dNh2o + n_aer_h2oice(i) * Probah2o 554 427 dMh2o = dMh2o + m_aer_h2oice(i) * Probah2o 555 428 dN = dN + n_aer(i) * Proba 556 dM = dM + m_aer(i) * Proba 557 429 dM = dM + m_aer(i) * Proba 558 430 enddo 559 431 ! dM masse activée (kg) et dN nb particules par kg d'air 560 432 ! Now increment CCN tracers and update dust tracers 561 433 dNN= dN/tauscaling(ig) 562 434 dMM= dM/tauscaling(ig) 563 435 dNN=min(dNN,zq(ig,l,igcm_dust_number)) 564 436 dMM=min(dMM,zq(ig,l,igcm_dust_mass)) 565 ! if (dNN .gt. 0) then566 ! write(*,*) "Nuclea dNN crees=",dNN567 ! write(*,*) "Nuclea dMM crees=",dMM568 ! endif569 dNNh2o=dNh2o/tauscaling(ig)570 dNNh2o=min(dNNh2o,zq(ig,l,igcm_ccn_number))571 572 ratioh2o_ccn=1./(zq(ig,l,igcm_h2o_ice)573 & +zq(ig,l,igcm_ccn_mass)*tauscaling(ig))574 575 dMh2o_ice=dMh2o*zq(ig,l,igcm_h2o_ice)*ratioh2o_ccn576 dMh2o_ccn=dMh2o*zq(ig,l,igcm_ccn_mass)*577 & tauscaling(ig)*ratioh2o_ccn578 579 dMh2o_ccn=dMh2o_ccn/tauscaling(ig)580 dMh2o_ccn=min(dMh2o_ccn,zq(ig,l,igcm_ccn_mass))581 dMh2o_ice=min(dMh2o_ice,zq(ig,l,igcm_h2o_ice))582 583 437 zq(ig,l,igcm_ccnco2_mass) = 584 438 & zq(ig,l,igcm_ccnco2_mass) + dMM 585 439 zq(ig,l,igcm_ccnco2_number) = 586 440 & zq(ig,l,igcm_ccnco2_number) + dNN 587 588 441 zq(ig,l,igcm_dust_mass)= zq(ig,l,igcm_dust_mass)-dMM 589 442 zq(ig,l,igcm_dust_number)=zq(ig,l,igcm_dust_number)-dNN … … 591 444 c Update CCN for CO2 nucleating on H2O CCN : 592 445 ! Warning: must keep memory of it 593 zq(ig,l,igcm_ccnco2_mass) = 594 & zq(ig,l,igcm_ccnco2_mass) + dMh2o_ice+dMh2o_ccn 595 zq(ig,l,igcm_ccnco2_number) = 596 & zq(ig,l,igcm_ccnco2_number) + dNNh2o 597 598 zq(ig,l,igcm_ccn_number)=zq(ig,l,igcm_ccn_number)-dNNh2o 599 zq(ig,l,igcm_h2o_ice) = zq(ig,l,igcm_h2o_ice)-dMh2o_ice 600 zq(ig,l,igcm_ccn_mass)= zq(ig,l,igcm_ccn_mass)-dMh2o_ccn 601 602 603 memdMMh2o(ig,l)=memdMMh2o(ig,l)+dMh2o_ice 604 memdMMccn(ig,l)=memdMMccn(ig,l)+dMh2o_ccn 605 memdNNccn(ig,l)=memdNNccn(ig,l)+dNNh2o 446 if (co2useh2o) then 447 dNNh2o=dNh2o/tauscaling(ig) 448 dNNh2o=min(dNNh2o,zq(ig,l,igcm_ccn_number)) 449 ratioh2o_ccn=1./(zq(ig,l,igcm_h2o_ice) 450 & +zq(ig,l,igcm_ccn_mass)*tauscaling(ig)) 451 dMh2o_ice=dMh2o*zq(ig,l,igcm_h2o_ice)*ratioh2o_ccn 452 dMh2o_ccn=dMh2o*zq(ig,l,igcm_ccn_mass)* 453 & tauscaling(ig)*ratioh2o_ccn 454 dMh2o_ccn=dMh2o_ccn/tauscaling(ig) 455 dMh2o_ccn=min(dMh2o_ccn,zq(ig,l,igcm_ccn_mass)) 456 dMh2o_ice=min(dMh2o_ice,zq(ig,l,igcm_h2o_ice)) 457 zq(ig,l,igcm_ccnco2_mass) = 458 & zq(ig,l,igcm_ccnco2_mass) + dMh2o_ice+dMh2o_ccn 459 zq(ig,l,igcm_ccnco2_number) = 460 & zq(ig,l,igcm_ccnco2_number) + dNNh2o 461 zq(ig,l,igcm_ccn_number)=zq(ig,l,igcm_ccn_number)-dNNh2o 462 zq(ig,l,igcm_h2o_ice) = zq(ig,l,igcm_h2o_ice)-dMh2o_ice 463 zq(ig,l,igcm_ccn_mass)= zq(ig,l,igcm_ccn_mass)-dMh2o_ccn 464 memdMMh2o(ig,l)=memdMMh2o(ig,l)+dMh2o_ice 465 memdMMccn(ig,l)=memdMMccn(ig,l)+dMh2o_ccn 466 memdNNccn(ig,l)=memdNNccn(ig,l)+dNNh2o 467 endif !of if co2useh2o 606 468 ENDIF ! of is satu >1 607 469 !============================================================= … … 612 474 c Indeed, if we are supersaturated and still don't have at least one nuclei, we should better wait 613 475 c to avoid unrealistic value for nuclei radius and so on for cases that remain negligible. 614 IF (zq(ig,l,igcm_ccnco2_number)*tauscaling(ig) .ge. 1)THEN 615 ! we trigger crystal growth 616 c 617 c write(*,*) "ccn number mass=",zq(ig,l,igcm_ccnco2_number), 618 c & zq(ig,l,igcm_ccnco2_mass) 619 620 c Niceco2 = zq(ig,l,igcm_co2_ice) 621 c Qccnco2 = zq(ig,l,igcm_ccnco2_mass) 622 c Nccnco2 = zq(ig,l,igcm_ccnco2_number) 623 c call updaterice_microco2(Niceco2,Qccnco2,Nccnco2, 624 c & tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l)) 625 c write(*,*) "updater rice=",riceco2(ig,l) 626 627 rdust(ig,l)= zq(ig,l,igcm_ccnco2_mass) 628 & *0.75/pi/rho_dust 629 & / zq(ig,l,igcm_ccnco2_number) 630 rdust(ig,l)= rdust(ig,l)**(1./3.) 631 rdust(ig,l)=max(1.e-10,rdust(ig,l)) 632 c rdust(ig,l)=min(5.e-6,rdust(ig,l)) 633 634 riceco2(ig,l)=( zq(ig,l,igcm_co2_ice)*3.0/ 635 & (4.0*rho_ice_co2*zq(ig,l,igcm_ccnco2_number) 636 & *pi*tauscaling(ig)) +rdust(ig,l)*rdust(ig,l) 637 & *rdust(ig,l) )**(1.0/3.0) 638 639 c riceco2(ig,l)=max(1.e-10,riceco2(ig,l)) 640 c riceco2(ig,l)=min(1.e-5,riceco2(ig,l)) 641 ! WATCH OUT: CO2 nuclei is supposed to be dust 642 ! only when deriving rhocloud (otherwise would need to keep info on water embedded in co2) - listo 643 c write(*,*) "Rdust before growth = ",rdust(ig,l) 644 c write(*,*) "Riceco2 before growth = ",riceco2(ig,l) 645 646 !! Niceco2,Qccnco2,Nccnco2 647 c Niceco2 = zq(ig,l,igcm_co2_ice) 648 c Qccnco2 = zq(ig,l,igcm_ccnco2_mass) 649 c Nccnco2 = zq(ig,l,igcm_ccnco2_number) 650 c call updaterice_microco2(Niceco2,Qccnco2,Nccnco2, 651 c & tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l)) 652 c write(*,*) "Riceco2 before growth = ",riceco2(ig,l) 653 c write(*,*) "rdust before growth = ",rdust(ig,l) 654 c write(*,*) "co2ice before growth=",zq(ig,l,igcm_co2_ice) 655 c write(*,*) "co2 before growth=",zq(ig,l,igcm_co2) 656 c write(*,*) "pplay before growth=",pplay(ig,l) 657 c write(*,*) "zt before growth =",zt(ig,l) 658 c write(*,*) "Satu before growth=",satu 659 c riceco2(ig,l)=max(riceco2(ig,l),rdust(ig,l)) 660 No = zq(ig,l,igcm_ccnco2_number)* tauscaling(ig)+1.e-30 661 ! No nb de particules de poussieres mis à l'échelle pour donner une opacité optique 662 663 c saturation at equilibrium 664 c rice should not be too small, otherwise seq value is not valid 665 c seq = exp(2.*sigco2*mco2 / (rho_ice_co2*rgp*zt(ig,l)* 666 c & max(riceco2(ig,l),1.e-7))) !Exponant sans unité OK 667 668 ccccccc Scheme of microphys. mass growth for CO2 669 476 No = zq(ig,l,igcm_ccnco2_number)* tauscaling(ig)+1.e-30 477 IF (No .ge. 1)THEN ! we trigger crystal growth 478 call updaterice_microco2(zq(ig,l,igcm_co2_ice), 479 & zq(ig,l,igcm_ccnco2_mass),zq(ig,l,igcm_ccnco2_number), 480 & tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l)) 481 482 Ic_rice=0. 483 flag_pourri=0 484 lw = l0 + l1 * zt(ig,l) + l2 * zt(ig,l)**2 + 485 & l3 * zt(ig,l)**3 + l4 * zt(ig,l)**4 !J.kg-1 486 facteurmax=abs(Tcond(ig,l)-zt(ig,l))*cpp/lw 487 !specific heat of co2 ice = 1000 J.kg-1.K-1 488 !specific heat of atm cpp = 744.5 J.kg-1.K-1 489 490 ccccccc call scheme of microphys. mass growth for CO2 670 491 call massflowrateCO2(pplay(ig,l),zt(ig,l), 671 & satu,riceco2(ig,l),mmean(ig,l),Ic_rice) ! Mass transfer rate (kg/s) for a rice particle 672 ! Ic_rice mass flux kg.s-1 <0 si croissance ! 673 if (isnan(Ic_rice)) then 492 & satu,riceco2(ig,l),mmean(ig,l),Ic_rice) 493 c Ic_rice Mass transfer rate (kg/s) for a rice particle >0 si croissance ! 494 495 if (isnan(Ic_rice) .or. Ic_rice .eq. 0.) then 674 496 Ic_rice=0. 675 497 flag_pourri=1 498 pdtcloudco2(ig,l)=-pdt(ig,l) 499 dMice=0 500 501 else 502 dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice*ptimestep 503 & *tauscaling(ig) ! Kg par kg d'air, >0 si croissance ! 504 !kg.s-1 par particule * nb particule par kg air*s 505 ! = kg par kg air 506 507 dMice = max(dMice,max(-facteurmax,-zq(ig,l,igcm_co2_ice))) 508 dMice = min(dMice,min(facteurmax,zq(ig,l,igcm_co2))) 509 !facteurmax maximum quantity of CO2 that can sublime/condense according to available thermal energy 510 ! latent heat release >0 if growth i.e. if dMice >0 511 pdtcloudco2(ig,l)=dMice*lw/cpp/ptimestep 512 ! kgco2/kgair* J/kgco2 * 1/(J.kgair-1.K-1)/s= K par seconde 513 !Now update tracers 514 zq(ig,l,igcm_co2_ice) = zq(ig,l,igcm_co2_ice)+dMice 515 zq(ig,l,igcm_co2) = zq(ig,l,igcm_co2)-dMice 676 516 endif 677 c drsurdt=-1.0/(4.0*pi*riceco2(ig,l)* 678 c & riceco2(ig,l)*rho_ice_co2)*Ic_rice 679 dMice = No * Ic_rice*ptimestep ! Kg par kg d'air, <0 si croissance ! 680 c write(*,*) "dMicev0 in improved = " , dMice 681 682 if (dMice .ge. 0d0) then 683 dMice = min(dMice,abs(zq(ig,l,igcm_co2_ice))) 684 else 685 dMice =-1.* min(abs(dMice),abs(zq(ig,l,igcm_co2))) 686 endif 687 c riceco2(ig,l)=riceco2(ig,l)+drsurdt*ptimestep 688 c write(*,*) "riceco2+dr/dt = ", riceco2(ig,l) 689 !write(*,*) "dMice in improved = " , dMice 690 691 zq(ig,l,igcm_co2_ice) = zq(ig,l,igcm_co2_ice)-dMice 692 zq(ig,l,igcm_co2) = zq(ig,l,igcm_co2)+dMice 693 694 ! latent heat release >0 if growth i.e. if dMice <0 695 696 697 lw = l0 + l1 * zt(ig,l) + l2 * zt(ig,l)**2 + 698 & l3 * zt(ig,l)**3 + l4 * zt(ig,l)**4 !J.kg-1 699 c write(*,*) "CPP= ",cpp ! = 744.5 700 !Peut etre un probleme de signe ici! 701 pdtcloudco2(ig,l)= -1.*dMice*lw/cpp/ptimestep ! kg par couche * J par kg /J par K / s = K par seconde 702 703 !write(*,*) "pdtcloudco2 after growth = ",pdtcloudco2(ig,l) 704 705 !write(*,*) "co2 after growth = ",zq(ig,l,igcm_co2) 706 !write(*,*) "co2_ice after growth = ",zq(ig,l,igcm_co2_ice) 707 708 !deltaT par condens/subli. qui remplace le dT du CO2 du newcondens pré-constantino 709 !PDT should be in K/s. 710 !============================================================= 711 ! 5. Dust cores released, tendancies, latent heat, etc ... 712 !============================================================= 713 714 c if (abs(dMice) .ge. 1.e-10) then 715 716 c write(*,*) "DIAG zq pdt",(zq(ig,l,igcm_co2_ice)- 717 c & zq0(ig,l,igcm_co2_ice))/ptimestep,pdtcloudco2(ig,l) 718 c endif 719 ENDIF ! of if NCCN > 1 720 721 rdust(ig,l)= zq(ig,l,igcm_ccnco2_mass) 722 & *0.75/pi/rho_dust 723 & / zq(ig,l,igcm_ccnco2_number) 724 rdust(ig,l)= rdust(ig,l)**(1./3.) 725 rdust(ig,l)=max(1.e-9,rdust(ig,l)) 726 c rdust(ig,l)=min(5.e-6,rdust(ig,l)) 727 728 riceco2(ig,l)=( zq(ig,l,igcm_co2_ice)*3.0/ 729 & (4.0*rho_ice_co2*zq(ig,l,igcm_ccnco2_number) 730 & *pi*tauscaling(ig)) +rdust(ig,l)*rdust(ig,l) 731 & *rdust(ig,l) )**(1.0/3.0) 732 !Niceco2 = zq(ig,l,igcm_co2_ice) 733 !Qccnco2 = zq(ig,l,igcm_ccnco2_mass) 734 !Nccnco2 = zq(ig,l,igcm_ccnco2_number) 735 c 736 c call updaterice_microCO2(Niceco2,Qccnco2,Nccnco2, 737 c & tauscaling(ig),riceco2(ig,l),rhocloudco2(ig,l)) 738 739 c If there is no more co2 ice, all the ice particles sublimate, all the condensation nuclei are released: 740 741 if ((zq(ig,l,igcm_co2_ice).le. 1.e-25)) then 742 c & .or. flag_pourri .eq. 1 743 c & .or.(riceco2(ig,l) .le. rdust(ig,l)) 744 c & .or. (l .ge.1 .and. l .le. 5) 745 c & .or. (zq(ig,l,igcm_co2_ice) .ge. 0.1) 746 lw = l0 + l1 * zt(ig,l) + l2 * zt(ig,l)**2 + 747 & l3 * zt(ig,l)**3 + l4 * zt(ig,l)**4 !J.kg-1 748 c write(*,*) "CPP= ",cpp ! = 744.5 749 750 pdtcloudco2(ig,l)=pdtcloudco2(ig,l)-1. 751 & *zq(ig,l,igcm_co2_ice)*lw/cpp/ptimestep ! 752 !On sublime tout ! 753 c write(*,*) "Riceco2 improved before reset=",riceco2(ig,l) 754 c write(*,*) "Niceco2 improved before reset=", 755 c & zq(ig,l,igcm_co2_ice) 756 c write(*,*) "Rdust improved before reset=",rdust(ig,l) 757 517 518 !============================================================= 519 ! 5. Dust cores releasing if no more co2 ice : 520 !============================================================= 521 522 if (zq(ig,l,igcm_co2_ice).le. 1.e-25)THEN 523 !On sublime tout 524 if (co2useh2o) then 758 525 if (memdMMccn(ig,l) .gt. 0) then 759 526 zq(ig,l,igcm_ccn_mass)=zq(ig,l,igcm_ccn_mass) … … 769 536 & +memdNNccn(ig,l) 770 537 endif 771 772 c if (zq(ig,l,igcm_ccnco2_mass) .gt. 1.e-30) then 538 endif 773 539 zq(ig,l,igcm_dust_mass) = 774 540 & zq(ig,l,igcm_dust_mass) 775 541 & + zq(ig,l,igcm_ccnco2_mass)- 776 542 & (memdMMh2o(ig,l)+memdMMccn(ig,l)) 777 c endif778 c if (zq(ig,l,igcm_ccnco2_number) .gt. 1.e-30) then779 543 zq(ig,l,igcm_dust_number) = 780 544 & zq(ig,l,igcm_dust_number) 781 545 & + zq(ig,l,igcm_ccnco2_number)-memdNNccn(ig,l) 782 c endif783 546 784 c if (zq(ig,l,igcm_co2_ice) .gt. 1.e-30) then785 547 zq(ig,l,igcm_co2) = zq(ig,l,igcm_co2) 786 548 & + zq(ig,l,igcm_co2_ice) 787 c endif788 549 789 550 zq(ig,l,igcm_ccnco2_mass)=0. … … 795 556 riceco2(ig,l)=0. 796 557 797 endif 558 endif !of if co2_ice <1e-25 559 560 ENDIF ! of if NCCN > 1 798 561 ENDDO ! of ig loop 799 562 ENDDO ! of nlayer loop 800 ! Get cloud tendencies 801 pdqcloudco2(1:ngrid,1:nlay,igcm_co2) = 802 & (zq(1:ngrid,1:nlay,igcm_co2) - 803 & zq0(1:ngrid,1:nlay,igcm_co2))/ptimestep 804 pdqcloudco2(1:ngrid,1:nlay,igcm_co2_ice) = 805 & (zq(1:ngrid,1:nlay,igcm_co2_ice) - 806 & zq0(1:ngrid,1:nlay,igcm_co2_ice))/ptimestep 807 pdqcloudco2(1:ngrid,1:nlay,igcm_h2o_ice) = 808 & (zq(1:ngrid,1:nlay,igcm_h2o_ice) - 809 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ptimestep 810 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_mass) = 811 & (zq(1:ngrid,1:nlay,igcm_ccn_mass) - 812 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ptimestep 813 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_number) = 814 & (zq(1:ngrid,1:nlay,igcm_ccn_number) - 815 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/ptimestep 816 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_mass) = 817 & (zq(1:ngrid,1:nlay,igcm_ccnco2_mass) - 818 & zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/ptimestep 819 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_number) = 820 & (zq(1:ngrid,1:nlay,igcm_ccnco2_number) - 821 & zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/ptimestep 822 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_mass) = 823 & (zq(1:ngrid,1:nlay,igcm_dust_mass) - 824 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/ptimestep 825 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_number) = 826 & (zq(1:ngrid,1:nlay,igcm_dust_number) - 827 & zq0(1:ngrid,1:nlay,igcm_dust_number))/ptimestep 828 return 829 end 830 831 832 563 564 !============================================================= 565 ! 6. END: get cloud tendencies 566 !============================================================= 567 568 ! Get cloud tendencies 569 pdqcloudco2(1:ngrid,1:nlay,igcm_co2) = 570 & (zq(1:ngrid,1:nlay,igcm_co2) - 571 & zq0(1:ngrid,1:nlay,igcm_co2))/ptimestep 572 pdqcloudco2(1:ngrid,1:nlay,igcm_co2_ice) = 573 & (zq(1:ngrid,1:nlay,igcm_co2_ice) - 574 & zq0(1:ngrid,1:nlay,igcm_co2_ice))/ptimestep 575 pdqcloudco2(1:ngrid,1:nlay,igcm_h2o_ice) = 576 & (zq(1:ngrid,1:nlay,igcm_h2o_ice) - 577 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ptimestep 578 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_mass) = 579 & (zq(1:ngrid,1:nlay,igcm_ccn_mass) - 580 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ptimestep 581 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_number) = 582 & (zq(1:ngrid,1:nlay,igcm_ccn_number) - 583 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/ptimestep 584 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_mass) = 585 & (zq(1:ngrid,1:nlay,igcm_ccnco2_mass) - 586 & zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/ptimestep 587 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_number) = 588 & (zq(1:ngrid,1:nlay,igcm_ccnco2_number) - 589 & zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/ptimestep 590 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_mass) = 591 & (zq(1:ngrid,1:nlay,igcm_dust_mass) - 592 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/ptimestep 593 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_number) = 594 & (zq(1:ngrid,1:nlay,igcm_dust_number) - 595 & zq0(1:ngrid,1:nlay,igcm_dust_number))/ptimestep 596 return 597 end 598 599 600 -
trunk/LMDZ.MARS/libf/phymars/massflowrateCO2.F
r1720 r1816 1 2 3 1 c======================================================================= 4 2 subroutine massflowrateCO2(P,T,Sat,Radius,Matm,Ic) 5 3 c 6 c Determination of the mass transfer rate 4 c Determination of the mass transfer rate for CO2 condensation & 5 c sublimation 7 6 c 8 7 c newton-raphson method 9 10 8 c CLASSICAL (no SF etc.) 11 12 c AUTOMATIC SETTING OF RANGES FOR NEWTON-RAPHSON FOR THE PAPER 13 14 c MASS FLUX Ic 15 9 c 10 c inputs: Pressure (P), Temperature (T), saturation ratio (Sat), 11 c particle radius (Radius), molecular mass of the atm (Matm) 12 c output: MASS FLUX Ic 13 c 14 c Authors: C. Listowski (2014) then J. Audouard (2016-2017) 16 15 c======================================================================= 17 16 USE comcstfi_h … … 20 19 21 20 include "microphys.h" 22 c include "microphysCO2.h"23 21 24 22 … … 26 24 c arguments: INPUT 27 25 c ---------- 28 29 26 REAL T,Matm 30 27 REAL*8 SAT … … 33 30 c arguments: OUTPUT 34 31 c ---------- 35 36 32 DOUBLE PRECISION Ic 37 38 33 c Local Variables 39 34 c ---------- 40 41 35 DOUBLE PRECISION Tcm 42 36 DOUBLE PRECISION T_inf, T_sup, T_dT … … 45 39 DOUBLE PRECISION rtsafe 46 40 DOUBLE PRECISION left, fval, dfval 47 48 41 c function for newton-raphson iterative method 49 42 c -------------------------- 50 51 43 EXTERNAL classical 52 53 44 54 Tcm = 80!dble(T) ! initialize pourquoi 0 et pas t(i) 55 45 Tcm = 110!dble(T) ! initialize pourquoi 0 et pas t(i) 56 46 T_inf = 0d0 57 47 T_sup = 800d0 58 59 T_dT = 0.01 ! precision - mettre petit et limiter nb iteration? 48 T_dT = 0.001 ! precision - mettre petit et limiter nb iteration? 60 49 61 50 666 CONTINUE 62 51 63 c print*, 'Radius ', Radius64 c print*, 'SAT = ', Sat65 52 call coefffunc(P,T,Sat,Radius,Matm,kmix,Lsub,C0,C1,C2) 66 53 67 if (isnan(C0) .eqv. .true.) C0=0d0 68 69 54 if (isnan(C0) .eqv. .true.) C0=0d0 70 55 c FIND SURFACE TEMPERATURE (Tc) : iteration sur t 71 72 56 cond = 4.*pi*Radius*kmix 73 74 57 Tcm = rtsafe(classical,T_inf,T_sup,T_dT,Radius,C0,C1,C2) 75 76 77 if (Tcm.LE.0d0) then ! unsignificant cases where S<<<Seq and Ncores <<1e-10 78 79 Tcm = 0d0 80 58 if (Tcm.LE.0d0 .or. isnan(Tcm)) then ! unsignificant cases where S<<<Seq and Ncores <<1e-10 59 Tcm = T 81 60 endif 82 83 84 61 c THEN COMPUTE MASS FLUX Ic from FINAL Tsurface (Tc) 85 86 62 Ic = (Tcm-T) 87 88 Ic = cond*Ic/(-Lsub) 63 Ic = cond*Ic/Lsub 89 64 c regarder de combien varie la solution Ic entre Tcm et Tcm+T_dT 90 65 91 66 RETURN 92 67 … … 95 70 96 71 c**************************************************************** 97 98 72 FUNCTION rtsafe(funcd,x1,x2,xacc,Radius,C0,C1,C2) 99 *100 73 * 101 74 * Newton Raphsen routine (Numerical Recipe) … … 114 87 EXTERNAL funcd 115 88 116 PARAMETER (MAXIT= 50000) !Maximum allowed number of iterations. Using a combination of Newton-Raphson and bisection,89 PARAMETER (MAXIT=10000) !Maximum allowed number of iterations. Using a combination of Newton-Raphson and bisection, 117 90 !find the root of a function bracketed between x1 and x2. The root, returned as the function value rtsafe, 118 91 !will be refined until its accuracy is known within !!±xacc. funcd is a user-supplied subroutine which … … 128 101 129 102 if ((fl.gt.0..and.fh.gt.0.).or.(fl.lt.0..and.fh.lt.0.) ) then 130 131 132 103 x1=0d0 133 x2=500d0 134 104 x2=1200d0 135 105 call funcd(x1,fl,df,C0,C1,C2) 136 106 call funcd(x2,fh,df,C0,C1,C2) 137 138 write(*,*) 'root must be bracketed in rtsafe' 107 c write(*,*) 'root must be bracketed in rtsafe' 139 108 endif 140 109 141 110 142 111 if (fl.eq.0.) then 143 144 112 rtsafe=x1 145 113 return 146 147 114 else if (fh.eq.0.) then 148 149 115 rtsafe=x2 150 116 return 151 152 else if (fl.lt.0.) then !Orient the search so that f(xl) < 0. 153 117 else if (fl.lt.0.) then !Orient the search so that f(xl) < 0. 154 118 xl=x1 155 119 xh=x2 156 157 120 else 158 159 121 xh=x1 160 122 xl=x2 161 162 123 endif 163 164 124 rtsafe = .5*(x1+x2) !Initialize the guess for root, 165 125 dxold = abs(x2-x1) !the stepsize before last, 166 126 dx = dxold ! and the last step. 167 168 169 127 call funcd(rtsafe,f,df,C0,C1,C2) 170 171 128 DO 11 j=1,MAXIT !Loop over allowed iterations. 172 173 174 !print*, 'iteration:', j175 !print*, rtsafe176 177 129 178 130 if (((rtsafe-xh)*df-f)*((rtsafe-xl)*df-f).gt.0. ! Bisect if Newton out of range … … 182 134 dx=0.5*(xh-xl) 183 135 rtsafe=xl+dx 184 185 136 if (xl.eq.rtsafe) return !Change in root is negligible. Newton step acceptable. Take it. 186 187 137 else 188 189 138 dxold=dx 190 139 dx=f/df 191 140 temp=rtsafe 192 193 141 rtsafe=rtsafe-dx 194 195 142 if(temp.eq.rtsafe) return 196 197 143 endif 198 144 199 200 145 if(abs(dx).lt.xacc) return !Convergence criterion. The one new function evaluation per iteration. Maintain the bracket on the root. 201 202 146 call funcd(rtsafe,f,df,C0,C1,C2) 203 204 147 if(f.lt.0.) then 205 148 xl=rtsafe … … 207 150 xh=rtsafe 208 151 endif 209 210 211 152 11 ENDDO 212 153 213 write(*,*) 'rtsafe exceeding maximum iterations'214 154 rtsafe=0d0 155 write(*,*) 'rtsafe exceeding maximum iterations,Tcm=',rtsafe 215 156 return 216 157 … … 219 160 220 161 c******************************************************************************** 221 222 162 subroutine classical(x,f,df,C0,C1,C2) 223 224 163 c Function to give as input to RTSAFE (NEWTON-RAPHOEN) 225 226 227 164 c******************************************************************************** 228 165 … … 231 168 DOUBLE PRECISION x 232 169 DOUBLE PRECISION C0,C1,C2 233 234 170 DOUBLE PRECISION f 235 171 DOUBLE PRECISION df 236 237 238 239 172 240 173 f = x + C0*exp(C1*x) - C2 ! start f … … 242 175 243 176 return 244 245 177 END 246 178 … … 250 182 251 183 c******************************************************************************** 252 c defini la fonction eq 6 papier 2014 184 c defini la fonction eq 6 papier 2014 (Listowski et al., 2014) 253 185 use tracer_mod, only: rho_ice_co2 254 186 USE comcstfi_h 255 187 256 188 implicit none 257 258 189 include "microphys.h" 259 c include "microphysCO2.h"260 261 190 262 191 c arguments: INPUT … … 270 199 c local: 271 200 c ------ 272 273 274 201 DOUBLE PRECISION Cpatm,Cpn2,Cpco2 275 202 DOUBLE PRECISION psat, xinf, pco2 … … 298 225 299 226 c Equilibirum pressure over a flat surface 300 301 227 psat = 1.382 * 1.00e12 * exp(-3182.48/dble(T)) ! (Pa) 302 303 228 c Compute transport coefficient 304 305 229 pco2 = psat * dble(S) 306 307 230 c Latent heat of sublimation if CO2 co2 (J.kg-1) 308 231 c version Azreg_Ainou (J/kg) : 309 310 232 l0=595594. 311 233 l1=903.111 … … 313 235 l3=0.0528288 314 236 l4=-0.000103183 315 316 237 Lsub = l0 + l1 * dble(T) + l2 * dble(T)**2 + l3 * 317 238 & dble(T)**3 + l4 * dble(T)**4 ! J/kg 318 319 239 c atmospheric density 320 321 240 rhoatm = dble(P*Matm)/(rgp*dble(T)) ! g.m-3 322 241 rhoatm = rhoatm * 1.00e-3 !kg.m-3 323 324 242 call KthMixNEW(kmix,T,pco2/dble(P),rhoatm) ! compute thermal cond of mixture co2/N2 325 243 call Diffcoeff(P, T, Dv) … … 328 246 329 247 c ----- FS correction for Diff 330 331 248 vthco2 = sqrt(8d0*kbz*dble(T)/(dble(pi) * mco2/nav)) ! units OK: m.s-1 332 333 249 knudsen = 3*Dv / (vthco2 * rc) 334 335 250 lambda = (1.333+0.71/knudsen) / (1.+1./knudsen) ! pas adaptée, Dahneke 1983? en fait si (Monschick&Black) 336 337 251 Dv = Dv / (1. + lambda * knudsen) 338 339 252 c ----- FS correction for Kth 340 341 253 vthatm = sqrt(8d0*kbz*dble(T)/(pi * 1.00e-3*dble(Matm)/nav)) ! Matm/nav = mass of "air molecule" in G , *1e-3 --> kg 342 343 254 Cpatm = Cpco2 * pco2/dble(P) + Cpn2 * (1d0 - pco2/dble(P)) !J.kg-1.K-1 344 345 255 lpmt = 3 * kmix / (rhoatm * vthatm * (Cpatm - 0.5*rgp/ 346 256 & (dble(Matm)*1.00e-3))) ! mean free path related to heat transfer 347 348 257 knudsen = lpmt / rc 349 350 258 lambda = (1.333+0.71/knudsen) / (1.+1./knudsen) ! pas adaptée, Dahneke 1983? en fait si (Monschick&Black) 351 352 259 kmix = kmix / (1. + lambda * knudsen) 353 354 260 c --------------------- ASSIGN coeff values for FUNCTION 355 356 261 xinf = dble(S) * psat / dble(P) 357 358 262 Ak = exp(2d0*sigco2*mco2/(rgp* dble(rho_ice_co2*T* rc) )) 359 360 263 C0 = mco2*Dv*psat*Lsub/(rgp*dble(T)*kmix)*Ak*exp(-Lsub*mco2/ 361 264 & (rgp*dble(T))) 362 363 265 C1 = Lsub*mco2/(rgp*dble(T)**2) 364 365 266 C2 = dble(T) + dble(P)*mco2*Dv*Lsub*xinf/(kmix*rgp*dble(T)) 366 367 267 RETURN 368 268 END … … 370 270 371 271 c====================================================================== 372 373 272 subroutine Diffcoeff(P, T, Diff) 374 375 273 c Compute diffusion coefficient CO2/N2 376 274 c cited in Ilona's lecture - from Reid et al. 1987 377 275 c====================================================================== 378 379 380 276 IMPLICIT NONE 381 277 382 278 include "microphys.h" 383 c include "microphysCO2.h"384 279 385 280 c arguments … … 425 320 c====================================================================== 426 321 427 428 322 implicit none 429 323 430 324 include "microphys.h" 431 c include "microphysCO2.h"432 433 325 c arguments 434 326 c ----------- … … 457 349 DOUBLE PRECISION kco2, kn2 458 350 459 460 351 x1 = x 461 352 x2 = 1d0 - x 462 353 463 464 354 M1 = mco2 465 355 M2 = mn2 466 356 467 468 357 Tc1 = 304.1282 !(Scalabrin et al. 2006) 469 358 Tc2 = 126.192 ! (Lemmon & Jacobsen 2003) … … 471 360 Pc1 = 73.773 ! (bars) 472 361 Pc2 = 33.958 ! (bars) 473 474 362 475 363 Gamma1 = 210.*(Tc1*M1**(3.)/Pc1**(4.))**(1./6.) 476 364 Gamma2 = 210.*(Tc2*M2**(3.)/Pc2**(4.))**(1./6.) 477 365 478 479 366 c Translational conductivities 480 481 482 367 483 368 lambda_trans1 = ( exp(0.0464 * T/Tc1) - exp(-0.2412 * T/Tc1) ) … … 487 372 & /Gamma2 488 373 489 490 374 c Coefficient of Mason and Saxena 491 492 493 375 epsilon = 1. 494 495 376 496 377 A11 = 1. … … 498 379 A22 = 1. 499 380 500 501 381 A12 = epsilon * (1. + sqrt(lambda_trans1/lambda_trans2)* 502 382 & (M1/M2)**(1./4.))**(2.) / sqrt(8*(1.+ M1/M2)) … … 505 385 & (M2/M1)**(1./4.))**(2.) / sqrt(8*(1.+ M2/M1)) 506 386 507 508 387 c INDIVIDUAL COND. 509 388 … … 511 390 call KthN2LemJac(kn2,T,rho) 512 391 513 514 392 c MIXTURE COND. 515 516 393 Kthmix = kco2*x1 /(x1*A11 + x2*A12) + kn2*x2 /(x1*A21 + x2*A22) 517 394 Kthmix = Kthmix*1e-3 ! from mW.m-1.K-1 to W.m-1.K-1 518 519 395 RETURN 520 396 521 397 END 522 398 523 524 c====================================================================== 525 399 c====================================================================== 526 400 subroutine KthN2LemJac(kthn2,T,rho) 527 528 401 c Compute thermal cond of N2 (Lemmon and Jacobsen, 2003) 529 402 cWITH viscosity … … 565 438 566 439 DOUBLE PRECISION k1, k2 567 568 440 569 441 N1 = 1.511d0 … … 612 484 gamma9 = 1. 613 485 614 615 616 617 c---------------------------------------------------------------------- 618 486 c---------------------------------------------------------------------- 619 487 call viscoN2(T,visco) !! v given in microPa.s 620 621 488 622 489 Tc = 126.192d0 623 490 rhoc = 11.1839 * 1000 * mn2 !!!from mol.dm-3 to kg.m-3 … … 626 493 delta = rho/rhoc 627 494 628 629 630 k1 = N1 * visco + N2 * tau**t2 + N3 * tau**t3 !!! mW m-1 K-1 631 632 495 k1 = N1 * visco + N2 * tau**t2 + N3 * tau**t3 !!! mW m-1 K-1 633 496 c--------- residual thermal conductivity 634 635 636 497 637 498 k2 = N4 * tau**t4 * delta**d4 * exp(-gamma4*delta**l4) … … 642 503 & + N9 * tau**t9 * delta**d9 * exp(-gamma9*delta**l9) 643 504 644 645 505 kthn2 = k1 + k2 646 647 506 648 507 RETURN … … 744 603 DOUBLE PRECISION h1,h2,h3,h4,h5,h6,h7,h8,h9,h10 745 604 DOUBLE PRECISION n1,n2,n3,n4,n5,n6,n7,n8,n9,n10 746 747 748 605 749 606 Tc = 304.1282 !(K) … … 763 620 g10 = 5.5 764 621 765 766 622 h1 = 1. 767 623 h2 = 5. … … 786 642 n10 = 0.00433043347 787 643 788 789 790 644 Tr = T/Tc 791 645 rhor = rho/rhoc 792 793 794 646 795 647 k1 = n1*Tr**(g1)*rhor**(h1) + n2*Tr**(g2)*rhor**(h2) … … 802 654 803 655 k2 = exp(-5.*rhor**(2.)) * k2 804 805 656 806 657 kthco2 = (k1 + k2) * Lambdac ! mW 807 658 808 809 659 RETURN 810 660 -
trunk/LMDZ.MARS/libf/phymars/microphys.h
r1720 r1816 2 2 ! INCLUDE 'microphys.h' 3 3 ! Parameters and physical constants used by the microphysal scheme; 4 ! Parameters for CO2 microphysics are also in this file 4 5 !----------------------------------------------------------------------- 5 6 … … 75 76 ! (initialized in improvedCO2clouds.F) 76 77 ! bachnar 2016 value :0.78 77 !old value 0.95 278 REAL, parameter :: mtetaco2 = 0.95 278 !old value 0.95 79 REAL, parameter :: mtetaco2 = 0.95 79 80 ! Volume of a co2 molecule (m3) 80 81 DOUBLE PRECISION :: vo1co2 -
trunk/LMDZ.MARS/libf/phymars/nucleaCO2.F
r1720 r1816 15 15 * Adapted for the LMD/GCM by J.-B. Madeleine * 16 16 * (October 2011) * 17 * Optimisation by A. Spiga (February 2012) * 17 * Optimisation by A. Spiga (February 2012) * 18 * CO2 nucleation routine dev. by Constantino * 19 * Listowski and Joachim Audouard (2016-2017), * 20 * adapted from the water ice nucleation * 18 21 ******************************************************* 19 22 ! nucrate = output 20 23 ! nucrate_h2o en sortie aussi : 21 24 !nucleation sur dust et h2o separement ici 22 !#include "tracer.h"23 25 #include "microphys.h" 24 c#include "microphysCO2.h"25 26 26 27 c Inputs 27 28 DOUBLE PRECISION pco2,sat,vo2co2 28 29 DOUBLE PRECISION n_ccn(nbinco2_cld), n_ccn_h2oice(nbinco2_cld) 29 REAL temp 30 30 REAL temp !temperature 31 31 c Output 32 ! DOUBLE PRECISION nucrate(nbinco2_cld)33 32 DOUBLE PRECISION nucrate(nbinco2_cld) 34 33 DOUBLE PRECISION nucrate_h2oice(nbinco2_cld) ! h2o as substrate 35 36 34 double precision rad_h2oice(nbinco2_cld) ! h2o ice grid (as substrate) 37 35 38 36 c Local variables 39 37 DOUBLE PRECISION nco2 40 c DOUBLE PRECISION sigco2 ! Water-ice/air surface tension (N.m)41 c external sigco242 38 DOUBLE PRECISION rstar ! Radius of the critical germ (m) 43 39 DOUBLE PRECISION gstar ! # of molecules forming a critical embryo 44 40 DOUBLE PRECISION fistar ! Activation energy required to form a critical embryo (J) 45 ! DOUBLE PRECISION zeldov ! Zeldovitch factor (no dim)46 41 DOUBLE PRECISION fshapeco2 ! function defined at the end of the file 47 DOUBLE PRECISION deltaf 48 49 c Ratio rstar/radius of the nucleating dust particle 50 c double precision xratio 51 42 DOUBLE PRECISION deltaf 52 43 double precision mtetalocal,mtetalocalh ! local mteta in double precision 53 54 44 double precision fshapeco2simple,zefshapeco2 55 56 57 45 integer i 58 59 LOGICAL firstcall60 DATA firstcall/.true./61 SAVE firstcall62 63 46 c ************************************************* 64 47 -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r1771 r1816 338 338 REAL Mccntot(ngrid) ! Total mass of ccn (kg/m2) 339 339 REAL rave(ngrid) ! Mean water ice effective radius (m) 340 REAL raveco2(ngrid) ! Mean co2 ice effective radius (m)341 340 REAL opTES(ngrid,nlayer) ! abs optical depth at 825 cm-1 342 341 REAL tauTES(ngrid) ! column optical depth at 825 cm-1 … … 1218 1217 1219 1218 1220 IF (co2clouds ) THEN1219 IF (co2clouds ) THEN 1221 1220 1222 1221 call co2cloud(ngrid,nlayer,ptimestep, … … 1225 1224 & nq,tau,tauscaling,rdust,rice,riceco2,nuice, 1226 1225 & rsedcloudco2,rhocloudco2, 1227 & rsedcloud,rhocloud,zzlev,zdqssed_co2) 1226 & rsedcloud,rhocloud,zzlev,zdqssed_co2, 1227 & pdu,pu) 1228 1228 1229 1229 1230 1230 c Temperature variation due to latent heat release 1231 if (activice) then !Maybe create activice_co2 ?1231 c if (activice) then !Maybe create activice_co2 ? 1232 1232 pdt(1:ngrid,1:nlayer) = 1233 1233 & pdt(1:ngrid,1:nlayer) + 1234 & zdtcloudco2(1:ngrid,1:nlayer) 1235 endif1234 & zdtcloudco2(1:ngrid,1:nlayer)! --> in newcondens 1235 c endif 1236 1236 1237 1237 … … 1240 1240 ! This is due to single precision rounding problems 1241 1241 1242 pdq(1:ngrid,1:nlayer,igcm_co2) = 1243 & pdq(1:ngrid,1:nlayer,igcm_co2) + 1244 & zdqcloudco2(1:ngrid,1:nlayer,igcm_co2) 1245 pdq(1:ngrid,1:nlayer,igcm_co2_ice) = 1246 & pdq(1:ngrid,1:nlayer,igcm_co2_ice) + 1247 & zdqcloudco2(1:ngrid,1:nlayer,igcm_co2_ice) 1248 pdq(1:ngrid,1:nlayer,igcm_ccnco2_mass) = 1249 & pdq(1:ngrid,1:nlayer,igcm_ccnco2_mass) + 1250 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccnco2_mass) 1251 pdq(1:ngrid,1:nlayer,igcm_ccnco2_number) = 1252 & pdq(1:ngrid,1:nlayer,igcm_ccnco2_number) + 1253 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccnco2_number) 1254 !Update water ice clouds values as well 1255 pdq(1:ngrid,1:nlayer,igcm_h2o_ice) = 1256 & pdq(1:ngrid,1:nlayer,igcm_h2o_ice) + 1257 & zdqcloudco2(1:ngrid,1:nlayer,igcm_h2o_ice) 1258 1259 ! increment dust and ccn masses and numbers 1260 ! We need to check that we have Nccn & Ndust > 0 1261 ! This is due to single precision rounding problems 1262 pdq(1:ngrid,1:nlayer,igcm_ccn_mass) = 1263 & pdq(1:ngrid,1:nlayer,igcm_ccn_mass) + 1264 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccn_mass) 1265 pdq(1:ngrid,1:nlayer,igcm_ccn_number) = 1266 & pdq(1:ngrid,1:nlayer,igcm_ccn_number) + 1267 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccn_number) 1268 where (pq(:,:,igcm_ccn_mass) + 1269 & ptimestep*pdq(:,:,igcm_ccn_mass) < 0.) 1270 pdq(:,:,igcm_ccn_mass) = 1271 & - pq(:,:,igcm_ccn_mass)/ptimestep + 1.e-30 1272 pdq(:,:,igcm_ccn_number) = 1273 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1242 ! increment dust tracers tendancies 1243 pdq(1:ngrid,1:nlayer,igcm_dust_mass) = 1244 & pdq(1:ngrid,1:nlayer,igcm_dust_mass) + 1245 & zdqcloudco2(1:ngrid,1:nlayer,igcm_dust_mass) 1246 pdq(1:ngrid,1:nlayer,igcm_dust_number) = 1247 & pdq(1:ngrid,1:nlayer,igcm_dust_number) + 1248 & zdqcloudco2(1:ngrid,1:nlayer,igcm_dust_number) 1249 pdq(1:ngrid,1:nlayer,igcm_co2) = 1250 & pdq(1:ngrid,1:nlayer,igcm_co2) + 1251 & zdqcloudco2(1:ngrid,1:nlayer,igcm_co2) 1252 pdq(1:ngrid,1:nlayer,igcm_co2_ice) = 1253 & pdq(1:ngrid,1:nlayer,igcm_co2_ice) + 1254 & zdqcloudco2(1:ngrid,1:nlayer,igcm_co2_ice) 1255 pdq(1:ngrid,1:nlayer,igcm_ccnco2_mass) = 1256 & pdq(1:ngrid,1:nlayer,igcm_ccnco2_mass) + 1257 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccnco2_mass) 1258 pdq(1:ngrid,1:nlayer,igcm_ccnco2_number) = 1259 & pdq(1:ngrid,1:nlayer,igcm_ccnco2_number) + 1260 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccnco2_number) 1261 !Update water ice clouds values as well 1262 if (co2useh2o) then 1263 pdq(1:ngrid,1:nlayer,igcm_h2o_ice) = 1264 & pdq(1:ngrid,1:nlayer,igcm_h2o_ice) + 1265 & zdqcloudco2(1:ngrid,1:nlayer,igcm_h2o_ice) 1266 pdq(1:ngrid,1:nlayer,igcm_ccn_mass) = 1267 & pdq(1:ngrid,1:nlayer,igcm_ccn_mass) + 1268 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccn_mass) 1269 pdq(1:ngrid,1:nlayer,igcm_ccn_number) = 1270 & pdq(1:ngrid,1:nlayer,igcm_ccn_number) + 1271 & zdqcloudco2(1:ngrid,1:nlayer,igcm_ccn_number) 1272 where (pq(:,:,igcm_ccn_mass) + 1273 & ptimestep*pdq(:,:,igcm_ccn_mass) < 0.) 1274 pdq(:,:,igcm_ccn_mass) = 1275 & - pq(:,:,igcm_ccn_mass)/ptimestep + 1.e-30 1276 pdq(:,:,igcm_ccn_number) = 1277 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1274 1278 end where 1275 1279 where (pq(:,:,igcm_ccn_number) + … … 1279 1283 pdq(:,:,igcm_ccn_number) = 1280 1284 & - pq(:,:,igcm_ccn_number)/ptimestep + 1.e-30 1281 end where 1285 end where 1286 endif 1282 1287 c Negative values? 1283 1288 where (pq(:,:,igcm_ccnco2_mass) + … … 1296 1301 end where 1297 1302 1298 ! increment dust tracers tendancies1299 pdq(1:ngrid,1:nlayer,igcm_dust_mass) =1300 & pdq(1:ngrid,1:nlayer,igcm_dust_mass) +1301 & zdqcloudco2(1:ngrid,1:nlayer,igcm_dust_mass)1302 pdq(1:ngrid,1:nlayer,igcm_dust_number) =1303 & pdq(1:ngrid,1:nlayer,igcm_dust_number) +1304 & zdqcloudco2(1:ngrid,1:nlayer,igcm_dust_number)1305 1303 c Negative values? 1306 1304 where (pq(:,:,igcm_dust_mass) + … … 1537 1535 $ co2ice,albedo,emis, 1538 1536 $ zdtc,zdtsurfc,pdpsrf,zduc,zdvc,zdqc, 1539 $ fluxsurf_sw,zls) 1537 $ fluxsurf_sw,zls)!, 1538 c & zzlev,zdqssed_co2,zdqcloudco2, 1539 c & zdtcloudco2) 1540 1540 1541 1541 DO l=1,nlayer … … 2260 2260 !state real RICE ikj misc 1 - h "RICE" "ICE RADIUS" "m" 2261 2261 comm_RICE(1:ngrid,1:nlayer) = rice(1:ngrid,1:nlayer) 2262 if (co2clouds) then2263 comm_RICE(1:ngrid,1:nlayer) = riceco2(1:ngrid,1:nlayer)2264 endif2265 2262 2266 2263 !! calculate sensible heat flux in W/m2 for outputs -
trunk/LMDZ.MARS/libf/phymars/updaterad.F90
r1632 r1816 10 10 ! So, subroutines are designed for scalar values instead of tables 11 11 12 13 12 ! T. Navarro, June 2012 14 13 ! CO2 clouds added 09/16 by J. Audouard … … 19 18 real, parameter :: r3icemin = 1.e-30 ! ie ricemin = 0.0001 microns 20 19 real, parameter :: ricemin = 1.e-10 21 22 20 real, parameter :: r3icemax = 125.e-12 ! ie ricemax = 500 microns 23 21 real, parameter :: ricemax = 500.e-6 … … 25 23 double precision, parameter :: r3iceco2min = 1.e-30 26 24 double precision, parameter :: riceco2min = 1.e-10 27 28 25 double precision, parameter :: r3iceco2max = 125.e-12 29 26 double precision, parameter :: riceco2max = 500.e-6 30 31 27 32 28 real, parameter :: qice_threshold = 1.e-15 ! 1.e-10 … … 108 104 USE comcstfi_h, only: pi 109 105 implicit none 110 ! By CL and JA 09/16106 !CO2 clouds parameter update by CL and JA 09/16 111 107 112 108 DOUBLE PRECISION, intent(in) :: qice,qccn,nccn
Note: See TracChangeset
for help on using the changeset viewer.