Changeset 2447 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jan 21, 2021, 10:12:41 AM (4 years ago)
- Location:
- trunk/LMDZ.MARS/libf/phymars
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/aeropacity_mod.F
r2417 r2447 21 21 & igcm_dust_submicron, rho_dust, rho_ice, 22 22 & nqdust, igcm_stormdust_mass, 23 & igcm_topdust_mass 23 & igcm_topdust_mass, igcm_co2_ice 24 24 use geometry_mod, only: latitude ! grid point latitudes (rad) 25 25 use comgeomfi_h, only: sinlat ! sines of grid point latitudes … … 160 160 CHARACTER(LEN=20) :: txt ! to temporarly store text 161 161 CHARACTER(LEN=1) :: txt2 ! to temporarly store text 162 ! indexes of co2 ice : 163 INTEGER,SAVE :: i_co2ice=0 ! co2 ice 162 164 ! indexes of dust scatterers: 163 165 INTEGER,SAVE :: naerdust ! number of dust scatterers … … 194 196 i_ice=igcm_h2o_ice 195 197 write(*,*) "aeropacity: i_ice=",i_ice 198 ENDIF 199 200 IF (co2clouds.AND.activeco2ice) THEN 201 i_co2ice=igcm_co2_ice 202 write(*,*) "aeropacity: i_co2ice =",i_co2ice 196 203 ENDIF 197 204 … … 476 483 477 484 c================================================================== 485 CASE("co2_ice") aerkind ! CO2 ice crystals 486 c================================================================== 487 488 c 1. Initialization 489 aerosol(1:ngrid,1:nlayer,iaer) = 0. 490 taucloudvis(1:ngrid) = 0. 491 taucloudtes(1:ngrid) = 0. 492 c 2. Opacity calculation 493 ! NO CLOUDS 494 IF (clearsky) THEN 495 aerosol(1:ngrid,1:nlayer,iaer) =1.e-9 496 ! CLOUDSs 497 ELSE ! else (clearsky) 498 DO ig=1, ngrid 499 DO l=1,nlayer 500 aerosol(ig,l,iaer) = max(1E-20, 501 & ( 0.75 * QREFvis3d(ig,l,iaer) / 502 & ( rho_ice * reffrad(ig,l,iaer) ) ) * 503 & pq(ig,l,i_co2ice) * 504 & ( pplev(ig,l) - pplev(ig,l+1) ) / g 505 & ) 506 taucloudvis(ig) = taucloudvis(ig) + aerosol(ig,l,iaer) 507 taucloudtes(ig) = taucloudtes(ig) + aerosol(ig,l,iaer)* 508 & QREFir3d(ig,l,iaer) / QREFvis3d(ig,l,iaer) * 509 & ( 1.E0 - omegaREFir3d(ig,l,iaer) ) 510 ENDDO 511 ENDDO 512 ! SUB-GRID SCALE CLOUDS 513 IF (CLFvarying) THEN 514 DO ig=1, ngrid 515 DO l=1,nlayer-1 516 CLFtot = max(totcloudfrac(ig),0.01) 517 aerosol(ig,l,iaer)= 518 & aerosol(ig,l,iaer)/CLFtot 519 aerosol(ig,l,iaer) = 520 & max(aerosol(ig,l,iaer),1.e-9) 521 ENDDO 522 ENDDO 523 ENDIF ! end (CLFvarying) 524 ENDIF ! end (clearsky) 525 526 c================================================================== 478 527 CASE("stormdust_doubleq") aerkind ! CW17 : Two-moment scheme for 479 528 c stormdust (transport of mass and number mixing ratio) -
trunk/LMDZ.MARS/libf/phymars/callkeys.h
r2409 r2447 14 14 & ,activice,water,tifeedback,microphys,supersat,caps,photochem & 15 15 & ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds & 16 & ,co2useh2o,meteo_flux, CLFvaryingCO2,spantCO2,CLFvarying&17 & , satindexco2,rdstorm,slpwind,calllott_nonoro&16 & ,co2useh2o,meteo_flux,activeco2ice,CLFvaryingCO2,spantCO2 & 17 & ,CLFvarying,satindexco2,rdstorm,slpwind,calllott_nonoro & 18 18 & ,latentheat_surfwater,gwd_convective_source,startphy_file & 19 19 & ,hdo,hdofrac … … 72 72 logical activice,tifeedback,supersat,caps 73 73 logical co2clouds,co2useh2o,meteo_flux,CLFvaryingCO2,satindexco2 74 logical activeco2ice 74 75 integer spantCO2 75 76 logical CLFvarying -
trunk/LMDZ.MARS/libf/phymars/callradite_mod.F
r2417 r2447 10 10 $ fluxtop_sw,tau_pref_scenario,tau_pref_gcm, 11 11 & tau,aerosol,dsodust,tauscaling,dust_rad_adjust, 12 $ taucloudtes,rdust,rice,nuice, co2ice,rstormdust,rtopdust,13 $ totstormfract,clearatm,dsords,dsotop,alpha_hmons,nohmons,14 $ clearsky,totcloudfrac)12 $ taucloudtes,rdust,rice,nuice,riceco2,nuiceco2,co2ice, 13 $ rstormdust,rtopdust,totstormfract,clearatm,dsords,dsotop, 14 $ alpha_hmons,nohmons,clearsky,totcloudfrac) 15 15 16 16 use aeropacity_mod, only: aeropacity … … 19 19 use dimradmars_mod, only: naerkind, name_iaer, 20 20 & iaer_dust_conrath,iaer_dust_doubleq, 21 & iaer_dust_submicron, iaer_h2o_ice,21 & iaer_dust_submicron, iaer_h2o_ice, iaer_co2_ice, 22 22 & iaer_stormdust_doubleq,iaer_topdust_doubleq 23 23 use yomlw_h, only: gcp, nlaylte … … 203 203 REAL,INTENT(OUT) :: rice(ngrid,nlayer) ! Ice geometric mean radius (m) 204 204 REAL,INTENT(OUT) :: nuice(ngrid,nlayer) ! Estimated effective variance 205 REAL,INTENT(OUT) :: riceco2(ngrid,nlayer) ! CO2 ice mean radius(m) 206 REAL,INTENT(OUT) :: nuiceco2(ngrid,nlayer) ! Effective variance 205 207 REAL,INTENT(IN) :: co2ice(ngrid) ! co2 ice surface layer (kg.m-2) 206 208 … … 317 319 iaer_dust_submicron=0 318 320 iaer_h2o_ice=0 321 iaer_co2_ice=0 319 322 iaer_stormdust_doubleq=0 320 323 iaer_topdust_doubleq=0 … … 349 352 if (name_iaer(iaer).eq."h2o_ice") then 350 353 iaer_h2o_ice = iaer 354 aer_count = aer_count + 1 355 endif 356 enddo 357 endif 358 if (co2clouds.AND.activeco2ice) then 359 do iaer=1,naerkind 360 if (name_iaer(iaer).eq."co2_ice") then 361 iaer_co2_ice = iaer 351 362 aer_count = aer_count + 1 352 363 endif … … 412 423 c Computing aerosol optical properties and opacity 413 424 c ------------------------------------------------ 414 415 425 c Updating aerosol size distributions: 416 426 CALL updatereffrad(ngrid,nlayer, 417 427 & rdust,rstormdust,rtopdust,rice,nuice, 418 & reffrad,nueffrad, 428 & reffrad,nueffrad, riceco2, nuiceco2, 419 429 & pq,tauscaling,tau,pplay) 420 421 430 c Computing 3D scattering parameters: 422 431 CALL aeroptproperties(ngrid,nlayer,reffrad,nueffrad, … … 425 434 & QREFvis3d,QREFir3d, 426 435 & omegaREFvis3d,omegaREFir3d) 427 428 436 c Computing aerosol optical depth in each layer: 429 437 CALL aeropacity(ngrid,nlayer,nq,zday,pplay,pplev,ls, -
trunk/LMDZ.MARS/libf/phymars/callsedim_mod.F
r2409 r2447 673 673 ENDIF ! of IF(microphys) 674 674 endif ! of if (water) 675 676 675 END SUBROUTINE callsedim 677 676 -
trunk/LMDZ.MARS/libf/phymars/co2cloud.F90
r2386 r2447 98 98 !======================================================================================================================! 99 99 subroutine co2cloud(ngrid, nlay, ptimestep, pplev, pplay, pdpsrf, pzlay, pt, pdt, pq, pdq, pdqcloudco2, pdtcloudco2, & 100 nq, tau, tauscaling, rdust, rice, riceco2, nuice, r sedcloud, rhocloud, pzlev, pdqs_sedco2, pdu, &100 nq, tau, tauscaling, rdust, rice, riceco2, nuice, rhocloud, rsedcloudco2, rhocloudco2, pzlev, pdqs_sedco2, pdu, & 101 101 pu, pcondicea, co2ice) 102 102 … … 115 115 116 116 use improvedCO2clouds_mod, only: improvedCO2clouds, density_co2_ice 117 118 #ifndef MESOSCALE 119 use vertical_layers_mod, only: ap, bp 120 #endif 117 121 118 122 implicit none … … 151 155 !------------------ 152 156 real, intent(out) :: & 153 rdust(ngrid,nlay), & ! Dust geometric mean radius (m)154 157 rice(ngrid,nlay), & ! Water Ice mass mean radius (m) 155 rsedcloud(ngrid,nlay), & ! Water Cloud sedimentation radius158 ! rsedcloud(ngrid,nlay), & ! Water Cloud sedimentation radius 156 159 rhocloud(ngrid,nlay), & ! Water Cloud density (kg.m-3) 157 160 pdqs_sedco2(ngrid), & ! CO2 flux at the surface … … 159 162 pcondicea(ngrid,nlay), & ! Rate of condensation/sublimation of co2 ice in layers 160 163 pdtcloudco2(ngrid,nlay), & ! Tendency on temperature due to latent heat 161 riceco2(ngrid,nlay) ! Ice mass mean radius (m) r_c in Montmessin et al. (2004) 164 riceco2(ngrid,nlay), & ! Ice mass mean radius (m) r_c in Montmessin et al. (2004) 165 rsedcloudco2(ngrid,nlay) ! Cloud sedimentation radius 166 167 real, intent(inout) :: & 168 rdust(ngrid,nlay) ! Dust geometric mean radius (m) 169 162 170 !----------------------------------------------------------------------------------------------------------------------! 163 171 ! Local: … … 225 233 sum_subpdt(ngrid,nlay), &! On temperature, cf. pdtcloud 226 234 ! ---Sedimentation 227 rsedcloudco2(ngrid,nlay), &! Cloud sedimentation radius228 235 ztsed(ngrid,nlay), &! Temperature with real-time value in microtimeloop 229 236 zqsed(ngrid,nlay,nq), &! Tracers with real-time value in µloop … … 249 256 wq(ngrid,nlay+1), &! Displaced tracer mass (kg.m-2) during microtimestep 250 257 satuco2(ngrid,nlay), &! CO2 satu ratio for output diagfi 251 zqsatco2(ngrid,nlay) ! Saturation co2 252 258 zqsatco2(ngrid,nlay), &! Saturation co2 259 availco2,& 260 masslayer, & 261 tmp, a,b, & 262 new_pdq(ngrid,nlay) 263 253 264 double precision :: & 254 265 ! ---Extinction coefficients at 1 micron of CO2 particles … … 416 427 do l = 1, nlay 417 428 do ig = 1, ngrid 418 masse(ig,l) = (pplev(ig,l) - pplev(ig,l+1) ) / g429 masse(ig,l) = (pplev(ig,l) - pplev(ig,l+1) + (bp(l)-bp(l+1)) ) / g 419 430 epaisseur(ig,l) = pzlev(ig,l+1) - pzlev(ig,l) 420 431 end do … … 545 556 ! 4. Microphysics of CO2 cloud formation 546 557 !----------------------------------------------------------------------------------------------------------------------! 558 pqeff(:,:,:) = pq(:,:,:) 559 pteff(:,:) = pt(:,:) 560 !----------------------------------------------------------------------------------------------------------------------! 561 ! 4.2. Effective tracers quantities in the cloud 562 !----------------------------------------------------------------------------------------------------------------------! 563 if (CLFvaryingCO2) then 564 pqeff(:,:,igcm_ccnco2_mass) = pq(:,:,igcm_ccnco2_mass) / co2cloudfrac(:,:) 565 566 pqeff(:,:,igcm_ccnco2_number) = pq(:,:,igcm_ccnco2_number) / co2cloudfrac(:,:) 567 568 pqeff(:,:,igcm_co2_ice) = pq(:,:,igcm_co2_ice) / co2cloudfrac(:,:) 569 end if 570 !----------------------------------------------------------------------------------------------------------------------! 547 571 do microstep = 1, imicroco2 548 572 !----------------------------------------------------------------------------------------------------------------------! 549 573 ! 4.1. Stepped entry for tendancies: At each micro timestep we add pdt in order to have a stepped entry 574 !----------------------------------------------------------------------------------------------------------------------! 575 do l = 1, nlay 576 do ig = 1, ngrid 577 ! on temperature 578 sum_subpdt(ig,l) = sum_subpdt(ig,l) + pdt(ig,l) 579 580 ! on tracers 581 sum_subpdq(ig,l,igcm_dust_mass) = sum_subpdq(ig,l,igcm_dust_mass) + pdq(ig,l,igcm_dust_mass) 582 583 sum_subpdq(ig,l,igcm_dust_number) = sum_subpdq(ig,l,igcm_dust_number) + pdq(ig,l,igcm_dust_number) 584 585 sum_subpdq(ig,l,igcm_ccnco2_mass) = sum_subpdq(ig,l,igcm_ccnco2_mass) + pdq(ig,l,igcm_ccnco2_mass) 586 587 sum_subpdq(ig,l,igcm_ccnco2_number) = sum_subpdq(ig,l,igcm_ccnco2_number) + pdq(ig,l,igcm_ccnco2_number) 588 589 sum_subpdq(ig,l,igcm_co2_ice) = sum_subpdq(ig,l,igcm_co2_ice) + pdq(ig,l,igcm_co2_ice) 590 591 sum_subpdq(ig,l,igcm_co2) = sum_subpdq(ig,l,igcm_co2) + pdq(ig,l,igcm_co2) 592 593 if (co2useh2o) then 594 sum_subpdq(ig,l,igcm_h2o_ice) = sum_subpdq(ig,l,igcm_h2o_ice) + pdq(ig,l,igcm_h2o_ice) 595 596 sum_subpdq(ig,l,igcm_ccn_mass) = sum_subpdq(ig,l,igcm_ccn_mass) + pdq(ig,l,igcm_ccn_mass) 597 598 sum_subpdq(ig,l,igcm_ccn_number) = sum_subpdq(ig,l,igcm_ccn_number) + pdq(ig,l,igcm_ccn_number) 599 end if 600 end do ! ngrid 601 end do ! nlay 602 !----------------------------------------------------------------------------------------------------------------------! 603 ! 4.4. Main call to the cloud scheme 604 !----------------------------------------------------------------------------------------------------------------------! 605 call improvedco2clouds(ngrid, nlay, microtimestep, pplay, pplev, pteff, sum_subpdt, pqeff, sum_subpdq, & 606 subpdqcloudco2, subpdtcloudco2, nq, tauscaling, mem_Mccn_co2, mem_Mh2o_co2, mem_Nccn_co2, & 607 rb_cldco2, sigma_iceco2, dev2) 608 do l = 1, nlay 609 do ig = 1, ngrid 610 if(pq(ig,l,igcm_co2_ice) + microtimestep*(sum_subpdq(ig,l,igcm_co2_ice)+subpdqcloudco2(ig,l,igcm_co2_ice)) & 611 .le. 1.e-12) then 612 subpdqcloudco2(ig,l,igcm_co2_ice) = -pq(ig,l,igcm_co2_ice)/microtimestep - sum_subpdq(ig,l,igcm_co2_ice) 613 subpdqcloudco2(ig,l,igcm_co2) = -subpdqcloudco2(ig,l,igcm_co2_ice) 614 end if 615 616 if(pq(ig,l,igcm_co2) + microtimestep*(sum_subpdq(ig,l,igcm_co2)+subpdqcloudco2(ig,l,igcm_co2)) .le. 1.e-12) then 617 subpdqcloudco2(ig,l,igcm_co2) = - pq(ig,l,igcm_co2)/microtimestep - sum_subpdq(ig,l,igcm_co2) 618 subpdqcloudco2(ig,l,igcm_co2_ice) = -subpdqcloudco2(ig,l,igcm_co2) 619 end if 620 ! ccnco2_number and ccnco2_mass 621 if (((pq(ig,l,igcm_ccnco2_number)+(sum_subpdq(ig,l,igcm_ccnco2_number)+subpdqcloudco2(ig,l,igcm_ccnco2_number)) & 622 *microtimestep).le.1.) .or. & 623 (pq(ig,l,igcm_ccnco2_mass)+(sum_subpdq(ig,l,igcm_ccnco2_mass)+subpdqcloudco2(ig,l,igcm_ccnco2_mass)) & 624 *microtimestep.le.1e-20)) then 625 subpdqcloudco2(ig,l,igcm_ccnco2_number) = - pq(ig,l,igcm_ccnco2_number)/microtimestep + 1. & 626 - sum_subpdq(ig,l,igcm_ccnco2_number) 627 subpdqcloudco2(ig,l,igcm_dust_number) = - subpdqcloudco2(ig,l,igcm_ccnco2_number) 628 629 subpdqcloudco2(ig,l,igcm_ccnco2_mass) = - pq(ig,l,igcm_ccnco2_mass)/microtimestep + 1e-20 & 630 - sum_subpdq(ig,l,igcm_ccnco2_mass) 631 subpdqcloudco2(ig,l,igcm_dust_mass) = - subpdqcloudco2(ig,l,igcm_ccnco2_mass) 632 end if 633 end do 634 end do 635 !----------------------------------------------------------------------------------------------------------------------! 636 ! 4.5. Updating tendencies after cloud scheme 550 637 !----------------------------------------------------------------------------------------------------------------------! 551 638 do l = 1, nlay 552 639 do ig = 1, ngrid 553 ! on temperature 554 sum_subpdt(ig,l) = sum_subpdt(ig,l) + pdt(ig,l) 555 556 ! on tracers 557 sum_subpdq(ig,l,igcm_dust_mass) = sum_subpdq(ig,l,igcm_dust_mass) + pdq(ig,l,igcm_dust_mass) 558 559 sum_subpdq(ig,l,igcm_dust_number) = sum_subpdq(ig,l,igcm_dust_number) + pdq(ig,l,igcm_dust_number) 560 561 sum_subpdq(ig,l,igcm_ccnco2_mass) = sum_subpdq(ig,l,igcm_ccnco2_mass) + pdq(ig,l,igcm_ccnco2_mass) 562 563 sum_subpdq(ig,l,igcm_ccnco2_number) = sum_subpdq(ig,l,igcm_ccnco2_number) + pdq(ig,l,igcm_ccnco2_number) 564 565 sum_subpdq(ig,l,igcm_co2_ice) = sum_subpdq(ig,l,igcm_co2_ice) + pdq(ig,l,igcm_co2_ice) 566 567 sum_subpdq(ig,l,igcm_co2) = sum_subpdq(ig,l,igcm_co2) + pdq(ig,l,igcm_co2) 640 sum_subpdt(ig,l) = sum_subpdt(ig,l) + subpdtcloudco2(ig,l) 641 642 sum_subpdq(ig,l,igcm_dust_mass) = sum_subpdq(ig,l,igcm_dust_mass) + subpdqcloudco2(ig,l,igcm_dust_mass) 643 644 sum_subpdq(ig,l,igcm_dust_number) = sum_subpdq(ig,l,igcm_dust_number) + subpdqcloudco2(ig,l,igcm_dust_number) 645 646 sum_subpdq(ig,l,igcm_ccnco2_mass) = sum_subpdq(ig,l,igcm_ccnco2_mass) + subpdqcloudco2(ig,l,igcm_ccnco2_mass) 647 648 sum_subpdq(ig,l,igcm_ccnco2_number) = sum_subpdq(ig,l,igcm_ccnco2_number) + & 649 subpdqcloudco2(ig,l,igcm_ccnco2_number) 650 651 sum_subpdq(ig,l,igcm_co2_ice) = sum_subpdq(ig,l,igcm_co2_ice) + subpdqcloudco2(ig,l,igcm_co2_ice) 652 653 sum_subpdq(ig,l,igcm_co2) = sum_subpdq(ig,l,igcm_co2) + subpdqcloudco2(ig,l,igcm_co2) 568 654 569 655 if (co2useh2o) then 570 sum_subpdq(ig,l,igcm_h2o_ice) = sum_subpdq(ig,l,igcm_h2o_ice) + pdq(ig,l,igcm_h2o_ice)571 572 sum_subpdq(ig,l,igcm_ccn_mass) = sum_subpdq(ig,l,igcm_ccn_mass) + pdq(ig,l,igcm_ccn_mass)573 574 sum_subpdq(ig,l,igcm_ccn_number) = sum_subpdq(ig,l,igcm_ccn_number) + pdq(ig,l,igcm_ccn_number)656 sum_subpdq(ig,l,igcm_h2o_ice) = sum_subpdq(ig,l,igcm_h2o_ice) + subpdqcloudco2(ig,l,igcm_h2o_ice) 657 658 sum_subpdq(ig,l,igcm_ccn_mass) = sum_subpdq(ig,l,igcm_ccn_mass) + subpdqcloudco2(ig,l,igcm_ccn_mass) 659 660 sum_subpdq(ig,l,igcm_ccn_number) = sum_subpdq(ig,l,igcm_ccn_number) + subpdqcloudco2(ig,l,igcm_ccn_number) 575 661 end if 576 662 end do ! ngrid 577 663 end do ! nlay 578 !----------------------------------------------------------------------------------------------------------------------!579 ! 4.2. Effective tracers quantities in the cloud580 !----------------------------------------------------------------------------------------------------------------------!581 pqeff(:,:,:) = pq(:,:,:)582 583 if (CLFvaryingCO2) then584 pqeff(:,:,igcm_ccnco2_mass) = pq(:,:,igcm_ccnco2_mass) / co2cloudfrac(:,:)585 586 pqeff(:,:,igcm_ccnco2_number) = pq(:,:,igcm_ccnco2_number) / co2cloudfrac(:,:)587 588 pqeff(:,:,igcm_co2_ice) = pq(:,:,igcm_co2_ice) / co2cloudfrac(:,:)589 end if590 664 !----------------------------------------------------------------------------------------------------------------------! 591 665 ! 4.3. Gravitational sedimentation … … 612 686 613 687 ! Get density cloud and co2 ice particle radius 614 call updaterice_microco2(Niceco2, Qccnco2, Nccnco2, tauscaling(ig), riceco2(ig,l), rhocloudco2t(ig,l))615 616 ! conflict with updaterice_microco2 C.M.617 if (Niceco2 <= threshold .or. Nccnco2*tauscaling(ig) <= 1) then618 r iceco2(ig,l) = 1.e-9688 if (Niceco2.ne.0d0) then 689 call updaterice_microco2(Niceco2, Qccnco2, Nccnco2, tauscaling(ig), riceco2(ig,l), rhocloudco2t(ig,l)) 690 else 691 riceco2(ig,l) = 0. 692 rhocloudco2t(ig,l) = 0. 619 693 end if 620 621 ! done in updaterice_microco2 C.M.622 rhocloudco2t(ig,l) = min( max(rhocloudco2t(ig,l),rho_ice_co2T(ig,l)), rho_dust )623 694 end do ! ngrid 624 695 end do ! nlay … … 632 703 ! 4.3.c. Sedimentation of co2 ice 633 704 !----------------------------------------------------------------------------------------------------------------------! 634 rsedcloudco2(1:ngrid, 1:nlay) = 5e-6 705 do ig = 1, ngrid 706 do l = 1, nlay 707 rsedcloudco2(ig,l) = max( riceco2(ig,l)*(1.+sigma_iceco2)*(1.+sigma_iceco2)*(1.+sigma_iceco2), & 708 rdust(ig,l) ) 709 end do 710 end do 711 635 712 wq(:,:) = 0. 636 713 call newsedim(ngrid, nlay, ngrid*nlay, ngrid*nlay, microtimestep, pplev, masse, epaisseur, ztsed, & … … 638 715 639 716 do ig = 1, ngrid 640 sum_subpdqs_sedco2(ig) = sum_subpdqs_sedco2(ig) + wq(ig,1) / microtimestep 717 sum_subpdqs_sedco2(ig) = sum_subpdqs_sedco2(ig) + wq(ig,1) / microtimestep !wq est en kg.m-2 641 718 end do 642 719 !----------------------------------------------------------------------------------------------------------------------! … … 653 730 call newsedim(ngrid, nlay, ngrid*nlay, ngrid*nlay,microtimestep, pplev, masse, epaisseur, ztsed, & 654 731 rsedcloudco2, rhocloudco2t, zqsed(:,:,igcm_ccnco2_number), wq, beta) 655 656 732 !TODO: ajouter le calcule de la tendance a la surface comme co2ice 657 733 !----------------------------------------------------------------------------------------------------------------------! … … 669 745 end do 670 746 end do 671 672 747 ! update subtimestep tendencies with sedimentation input 673 748 do l = 1, nlay … … 681 756 end do 682 757 end if !(end if sedimentation) 683 !----------------------------------------------------------------------------------------------------------------------!684 ! 4.4. Main call to the cloud scheme685 !----------------------------------------------------------------------------------------------------------------------!686 call improvedco2clouds(ngrid, nlay, microtimestep, pplay, pplev, pteff, sum_subpdt, pqeff, sum_subpdq, &687 subpdqcloudco2, subpdtcloudco2, nq, tauscaling, mem_Mccn_co2, mem_Mh2o_co2, mem_Nccn_co2, &688 rb_cldco2, sigma_iceco2, dev2)689 !----------------------------------------------------------------------------------------------------------------------!690 ! 4.5. Updating tendencies after cloud scheme691 !----------------------------------------------------------------------------------------------------------------------!692 do l = 1, nlay693 do ig = 1, ngrid694 sum_subpdt(ig,l) = sum_subpdt(ig,l) + subpdtcloudco2(ig,l)695 696 sum_subpdq(ig,l,igcm_dust_mass) = sum_subpdq(ig,l,igcm_dust_mass) + subpdqcloudco2(ig,l,igcm_dust_mass)697 698 sum_subpdq(ig,l,igcm_dust_number) = sum_subpdq(ig,l,igcm_dust_number) + subpdqcloudco2(ig,l,igcm_dust_number)699 700 sum_subpdq(ig,l,igcm_ccnco2_mass) = sum_subpdq(ig,l,igcm_ccnco2_mass) + subpdqcloudco2(ig,l,igcm_ccnco2_mass)701 702 sum_subpdq(ig,l,igcm_ccnco2_number) = sum_subpdq(ig,l,igcm_ccnco2_number) + &703 subpdqcloudco2(ig,l,igcm_ccnco2_number)704 705 sum_subpdq(ig,l,igcm_co2_ice) = sum_subpdq(ig,l,igcm_co2_ice) + subpdqcloudco2(ig,l,igcm_co2_ice)706 707 sum_subpdq(ig,l,igcm_co2) = sum_subpdq(ig,l,igcm_co2) + subpdqcloudco2(ig,l,igcm_co2)708 709 if (co2useh2o) then710 sum_subpdq(ig,l,igcm_h2o_ice) = sum_subpdq(ig,l,igcm_h2o_ice) + subpdqcloudco2(ig,l,igcm_h2o_ice)711 712 sum_subpdq(ig,l,igcm_ccn_mass) = sum_subpdq(ig,l,igcm_ccn_mass) + subpdqcloudco2(ig,l,igcm_ccn_mass)713 714 sum_subpdq(ig,l,igcm_ccn_number) = sum_subpdq(ig,l,igcm_ccn_number) + subpdqcloudco2(ig,l,igcm_ccn_number)715 end if716 end do ! ngrid717 end do ! nlay718 758 end do ! of do microstep = 1, imicroco2 719 759 !----------------------------------------------------------------------------------------------------------------------! 720 760 ! 5. Compute final tendencies after time loop 721 761 !----------------------------------------------------------------------------------------------------------------------! 722 ! condensation/sublimation rate in the atmosphere 762 ! condensation/sublimation rate in the atmosphere (kg.kg-1.s-1) 723 763 do l = nlay, 1, -1 724 764 do ig = 1, ngrid … … 732 772 end do 733 773 734 ! temperature tendency 774 ! temperature tendency (T.s-1) 735 775 do l = 1, nlay 736 776 do ig = 1, ngrid … … 753 793 754 794 pdqcloudco2(ig,l,igcm_dust_mass) = ( sum_subpdq(ig,l,igcm_dust_mass) / real(imicroco2) ) - & 755 pdq(ig,l,igcm_dust_mass)795 pdq(ig,l,igcm_dust_mass) 756 796 757 797 pdqcloudco2(ig,l,igcm_dust_number) = ( sum_subpdq(ig,l,igcm_dust_number)/real(imicroco2) ) - & … … 759 799 760 800 if (co2useh2o) then 761 pdqcloudco2(ig,l,igcm_h2o_ice) = ( sum_subpdq(ig,l,igcm_h2o_ice) / real(imicroco2) ) - &762 pdq(ig,l,igcm_h2o_ice)801 pdqcloudco2(ig,l,igcm_h2o_ice) = ( sum_subpdq(ig,l,igcm_h2o_ice) / real(imicroco2) ) - & 802 pdq(ig,l,igcm_h2o_ice) 763 803 764 804 pdqcloudco2(ig,l,igcm_ccn_mass) = ( sum_subpdq(ig,l,igcm_ccn_mass) / real(imicroco2) ) - & 765 pdq(ig,l,igcm_ccn_mass)805 pdq(ig,l,igcm_ccn_mass) 766 806 767 807 pdqcloudco2(ig,l,igcm_ccn_number) = ( sum_subpdq(ig,l,igcm_ccn_number) / real(imicroco2) ) - & … … 778 818 do ig = 1, ngrid 779 819 Niceco2 = pqeff(ig,l,igcm_co2_ice) + ( pdq(ig,l,igcm_co2_ice) + pdqcloudco2(ig,l,igcm_co2_ice) ) * ptimestep 820 Niceco2 = max (Niceco2, threshold) 780 821 781 822 Nccnco2 = max( (pqeff(ig,l,igcm_ccnco2_number) + (pdq(ig,l,igcm_ccnco2_number) + & … … 848 889 end do 849 890 !----------------------------------------------------------------------------------------------------------------------! 850 ! 8. Compute water cloud sedimentation radius851 !----------------------------------------------------------------------------------------------------------------------!852 do l = 1, nlay853 do ig= 1, ngrid854 rsedcloud(ig,l) = max( rice(ig,l)*(1.+nuice_sed)* (1.+nuice_sed)*(1.+nuice_sed), rdust(ig,l) )855 end do856 end do857 !----------------------------------------------------------------------------------------------------------------------!858 891 ! 9. CO2 saturated quantities 859 892 !----------------------------------------------------------------------------------------------------------------------! … … 916 949 call WRITEDIAGFI(ngrid, "satuco2", "vap in satu", " ", 3, satuco2) 917 950 918 call WRITEDIAGFI(ngrid, "co2cloudfrac", "co2 cloud fraction", " ", 3, co2cloudfrac) 951 if (CLFvaryingCO2) then 952 call WRITEDIAGFI(ngrid, "co2cloudfrac", "co2 cloud fraction", " ", 3, co2cloudfrac) 953 end if 919 954 920 955 call writediagfi(ngrid, "riceco2", "ice radius", "m", 3, riceco2) -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod4micro.F90
r2362 r2447 194 194 logical :: & 195 195 condsub(ngrid) ! True if there is condensation/sublimation (used for co2snow) 196 197 198 ! check with co2 cloud parameterisation 199 real :: & 200 zt_2(ngrid,nlayer), & 201 ztcond_2(ngrid,nlayer+1), & 202 zfallice_2(ngrid,nlayer+1), & 203 pdtc_2(ngrid,nlayer), & 204 zfallheat_2, & 205 zcondicea_2(ngrid,nlayer), & 206 diff_zcondicea(ngrid,nlayer), & 207 diff_zfallice(ngrid) 196 208 !======================================================================================================================! 197 209 ! BEGIN ===============================================================================================================! … … 281 293 ! Only sedimentation falls on the ground ! 282 294 do ig = 1, ngrid 283 zfallice(ig) = 295 zfallice(ig) = zdqssed_co2(ig) 284 296 piceco2(ig) = piceco2(ig) + zfallice(ig)*ptimestep 285 297 end do … … 288 300 289 301 call writediagfi(ngrid,"zfallice", "Sedimentation rate", " ", 2, zfallice) 302 303 ! Compute without microphysics 304 do l =1, nlayer 305 do ig = 1, ngrid 306 zt_2(ig,l) = pt(ig,l) + pdt(ig,l)*ptimestep 307 end do 308 end do 309 310 do l = 1, nlayer 311 do ig = 1, ngrid 312 if (pplay(ig,l).ge.1e-4) then 313 ztcond_2(ig,l) = 1. / (bcond-acond*log(.01*vmr_co2(ig,l)*pplay(ig,l))) 314 else 315 ztcond_2(ig,l) = 0.0 !mars Monica 316 endif 317 end do 318 end do 319 320 ztcond_2(:,nlayer+1)=ztcond_2(:,nlayer) 321 zfallice_2(:,:) = 0 322 323 do l = nlayer , 1, -1 324 do ig = 1, ngrid 325 pdtc_2(ig,l) = 0. 326 if ((zt_2(ig,l).lt.ztcond_2(ig,l)).or.(zfallice_2(ig,l+1).gt.0)) then 327 if (zfallice_2(ig,l+1).gt.0) then 328 zfallheat_2 = zfallice_2(ig,l+1)*(pphi(ig,l+1)-pphi(ig,l) + cpice*(ztcond_2(ig,l+1)-ztcond_2(ig,l)))/latcond 329 else 330 zfallheat_2 = 0. 331 end if 332 pdtc_2(ig,l) = (ztcond_2(ig,l) - zt_2(ig,l))/ptimestep 333 zcondicea_2(ig,l) = (pplev(ig,l)-pplev(ig,l+1))*ccond*pdtc(ig,l)- zfallheat_2 334 ! Case when the ice from above sublimes entirely 335 ! """"""""""""""""""""""""""""""""""""""""""""""" 336 if (zfallice_2(ig,l+1).lt.- zcondicea_2(ig,l)) then 337 zcondicea_2(ig,l)= -zfallice_2(ig,l+1) 338 end if 339 zfallice_2(ig,l) = zcondicea_2(ig,l)+zfallice_2(ig,l+1) 340 end if 341 end do 342 end do 343 diff_zcondicea(:,:) = zcondicea_2(:,:) - zcondicea(:,:) 344 diff_zfallice(:) = zfallice_2(:,1) - zfallice(:) 345 call writediagfi(ngrid, "diff_zfallice", "sans - avec microphysique", "", 2, diff_zfallice) 346 call writediagfi(ngrid, "diff_zcondicea", "sans - avec microphysique", "", 3, diff_zcondicea) 290 347 !----------------------------------------------------------------------------------------------------------------------! 291 348 ! 5. Main co2condens … … 307 364 ! 5.3. Compute zfallheat 308 365 !----------------------------------------------------------------------------------------------------------------------! 309 if (zfallice(ig)>0) then 310 zfallheat = zfallice(ig) * ( pphi(ig,1) - phisfi(ig) + cpice*(ztcond(ig,1) - ztcondsol(ig)) )/latcond 311 else 312 zfallheat = 0. 313 end if 366 zfallheat = 0. 314 367 !----------------------------------------------------------------------------------------------------------------------! 315 368 ! 5.4. Compute direct condensation/sublimation of CO2 ice … … 320 373 ! 5.4.a. If there is not enough CO2 tracer in 1st layer to condense 321 374 !----------------------------------------------------------------------------------------------------------------------! 322 if (igcm_co2/=0) then 323 ! Available CO2 tracer in layer 1 at end of timestep (kg/m2) 324 availco2 = pq(ig,1,igcm_co2) * ( (ap(1)-ap(2)) + (bp(1)-bp(2)) * (pplev(ig,1)/g - zcondices(ig)*ptimestep) ) 325 if ( zcondices(ig) * ptimestep>availco2 ) then 326 zcondices(ig) = availco2/ptimestep 327 zdiceco2(ig) = zcondices(ig) + zfallice(ig) 328 pdtsrfc(ig) = (latcond/pcapcal(ig)) * (zcondices(ig)+zfallheat) 329 end if 375 ! Available CO2 tracer in layer 1 at end of timestep (kg/m2) 376 availco2 = pq(ig,1,igcm_co2) * ( (ap(1)-ap(2)) + (bp(1)-bp(2)) * (pplev(ig,1)/g - zcondices(ig)*ptimestep) ) 377 if ( zcondices(ig) * ptimestep>availco2 ) then 378 zcondices(ig) = availco2/ptimestep 379 zdiceco2(ig) = zcondices(ig) + zfallice(ig) 380 pdtsrfc(ig) = (latcond/pcapcal(ig)) * (zcondices(ig)+zfallheat) 330 381 end if 331 382 !----------------------------------------------------------------------------------------------------------------------! … … 364 415 end if 365 416 end if 366 !----------------------------------------------------------------------------------------------------------------------!367 ! 5.6.b. Set albedo and emissivity of the surface368 !----------------------------------------------------------------------------------------------------------------------!369 call albedocaps(zls,ngrid,piceco2,psolaralb,emisref)370 417 !----------------------------------------------------------------------------------------------------------------------! 371 418 ! 5.6.c. Set pemisurf to emissiv when there is bare surface (needed for co2snow) … … 481 528 #else 482 529 do l = 1, nlayer 483 if (.not. co2clouds) then 484 ! Tendencies on T 485 pdtc(ig,l) = (1./masse(l)) * ( zmflux(l)*(ztm(l) - zt(l)) - zmflux(l+1)*(ztm(l+1) - zt(l)) & 486 + zcondicea(ig,l)*(ztcond(ig,l)-zt(l)) ) 487 else 488 pdtc(ig,l) = (1./masse(l)) * ( zmflux(l)*(ztm(l) - zt(l)) - zmflux(l+1)*(ztm(l+1) - zt(l)) ) 489 end if 530 ! Tendencies on T 531 pdtc(ig,l) = (1./masse(l)) * ( zmflux(l)*(ztm(l) - zt(l)) - zmflux(l+1)*(ztm(l+1) - zt(l)) ) 490 532 491 533 ! Tendencies on U … … 513 555 end do ! loop on ig 514 556 !----------------------------------------------------------------------------------------------------------------------! 557 ! 5.6.b. Set albedo and emissivity of the surface 558 !----------------------------------------------------------------------------------------------------------------------! 559 call albedocaps(zls,ngrid,piceco2,psolaralb,emisref) 560 !----------------------------------------------------------------------------------------------------------------------! 515 561 ! 6. CO2 snow / clouds scheme 516 562 !----------------------------------------------------------------------------------------------------------------------! 517 call co2snow(ngrid, nlayer, ptimestep, emisref, condsub, pplev, zcondicea, zcondices, zdqssed_co2 *ptimestep, &563 call co2snow(ngrid, nlayer, ptimestep, emisref, condsub, pplev, zcondicea, zcondices, zdqssed_co2, & 518 564 pemisurf) 519 565 !----------------------------------------------------------------------------------------------------------------------! -
trunk/LMDZ.MARS/libf/phymars/co2snow.F
r2362 r2447 31 31 #include "callkeys.h" 32 32 33 34 33 c======================================================================= 35 34 c Variables … … 50 49 ! (kg/m2/s) 51 50 & pfallice(ngrid,nlayer+1) ! falling CO2 ice (kg/m2/s) 52 51 53 52 logical, intent(in) :: 54 53 & condsub(ngrid) ! true if there is CO2 condensation or … … 107 106 do ig = 1, ngrid 108 107 if (condsub(ig)) then 108 109 109 if (latitude(ig).lt.0.) then 110 110 icap = 2 ! Southern hemisphere … … 123 123 & - pemisurf(ig) 124 124 & ) / ptimestep 125 126 125 pemisurf(ig) = pemisurf(ig) + zdemisurf * ptimestep 127 126 if (pemisurf(ig).lt.0.1) then -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r2417 r2447 565 565 write(*,*) " hdofrac = ",hdofrac 566 566 567 ! Activeco2ice 568 write(*,*) "Radiatively active transported atmospheric ", 569 & "Co2 ice ?" 570 activeco2ice=.false. ! default value 571 call getin_p("activeco2ice",activeco2ice) 572 write(*,*) " activeco2ice = ",activeco2ice 567 573 568 574 ! sub-grid cloud fraction: fixed … … 650 656 651 657 658 if (activeco2ice.and..not.co2clouds) then 659 print*,'if activeco2ice is used, co2clouds should be used too' 660 call abort_physic(modname, 661 & "activeco2ice requires co2clouds",1) 662 endif 663 652 664 ! water ice clouds effective variance distribution for sedimentaion 653 665 write(*,*) "Sed effective variance for water ice clouds ?" … … 834 846 name_iaer(1) = "dust_conrath" !! default choice is good old Conrath profile 835 847 IF (doubleq.AND.active) name_iaer(1) = "dust_doubleq" !! two-moment scheme 848 836 849 if (nq.gt.1) then 837 ! trick to avoid problems compiling with 1 tracer 838 ! and picky compilers who know name_iaer(2) is out of bounds 839 j=2 840 IF (rdstorm.AND..NOT.activice.AND..NOT.slpwind) name_iaer(2) = 841 & "stormdust_doubleq" !! storm dust two-moment scheme 842 IF (rdstorm.AND.water.AND.activice.AND..NOT.slpwind) 843 & name_iaer(3) = "stormdust_doubleq" 844 IF (slpwind.AND..NOT.activice.AND..NOT.rdstorm) name_iaer(2) = 845 & "topdust_doubleq" !! storm dust two-moment scheme 846 IF (slpwind.AND.water.AND.activice.AND..NOT.rdstorm) 847 & name_iaer(3) = "topdust_doubleq" 848 IF (rdstorm.AND.slpwind.AND..NOT.activice) THEN 849 name_iaer(2) = "stormdust_doubleq" 850 name_iaer(3) = "topdust_doubleq" 851 ENDIF 852 IF (rdstorm.AND.slpwind.AND.water.AND.activice) THEN 853 name_iaer(3) = "stormdust_doubleq" 854 name_iaer(4) = "topdust_doubleq" 855 ENDIF 856 IF (water.AND.activice) name_iaer(j) = "h2o_ice" !! radiatively-active clouds 857 IF (submicron.AND.active) name_iaer(j) = "dust_submicron" !! JBM experimental stuff 850 ! trick to avoid problems compiling with 1 tracer 851 ! and picky compilers who know name_iaer(2) is out of bounds 852 j=2 853 IF (rdstorm.AND..NOT.activice.AND..NOT.slpwind) then 854 name_iaer(j) = "stormdust_doubleq" !! storm dust two-moment scheme 855 j = j+1 856 END IF 857 858 IF (rdstorm.AND.water.AND.activice.AND..NOT.slpwind) then 859 name_iaer(j) = "stormdust_doubleq" 860 j = j+1 861 END IF 862 863 IF (slpwind.AND..NOT.activice.AND..NOT.rdstorm) then 864 name_iaer(j) = "topdust_doubleq" !! storm dust two-moment scheme 865 j = j+1 866 END IF 867 868 IF (slpwind.AND.water.AND.activice.AND..NOT.rdstorm) then 869 name_iaer(j) = "topdust_doubleq" 870 j = j+1 871 END IF 872 873 IF (rdstorm.AND.slpwind.AND..NOT.activice) THEN 874 name_iaer(j) = "stormdust_doubleq" 875 name_iaer(j+1) = "topdust_doubleq" 876 j = j+2 877 ENDIF 878 879 IF (rdstorm.AND.slpwind.AND.water.AND.activice) THEN 880 name_iaer(j) = "stormdust_doubleq" 881 name_iaer(j+1) = "topdust_doubleq" 882 j = j+2 883 ENDIF 884 885 IF (water.AND.activice) then 886 name_iaer(j) = "h2o_ice" !! radiatively-active clouds 887 j = j+1 888 END IF 889 890 IF (co2clouds.AND.activeco2ice) then 891 name_iaer(j) = "co2_ice" !! radiatively-active co2 clouds 892 j = j+1 893 ENDIF 894 895 IF (submicron.AND.active) then 896 name_iaer(j) = "dust_submicron" !! JBM experimental stuff 897 j = j+1 898 ENDIF 858 899 endif ! of if (nq.gt.1) 859 860 900 c ---------------------------------------------------------- 861 901 -
trunk/LMDZ.MARS/libf/phymars/improvedco2clouds_mod.F90
r2394 r2447 291 291 ! pqeff traceur kg/kg; sum_subpdq tendance idem .s-1 292 292 zq(:,:,:) = pqeff(:,:,:) + sum_subpdq(:,:,:) * microtimestep 293 294 293 where( zq(:,:,:) < threshold ) zq(:,:,:) = threshold 295 294 -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2443 r2447 251 251 real rsedcloud(ngrid,nlayer) ! Cloud sedimentation radius 252 252 real rhocloud(ngrid,nlayer) ! Cloud density (kg.m-3) 253 real rsedcloudco2(ngrid,nlayer) ! CO2 Cloud sedimentation radius 254 real rhocloudco2(ngrid,nlayer) ! CO2 Cloud density (kg.m-3) 255 real nuiceco2(ngrid,nlayer) ! Estimated effective variance of the 256 ! size distribution 253 257 REAL inertiesoil(ngrid,nsoilmx) ! Time varying subsurface 254 258 ! thermal inertia (J.s-1/2.m-2.K-1) … … 506 510 507 511 c======================================================================= 508 c---------- begin added by CM509 512 pdq(:,:,:) = 0. 510 c---------end added by CM511 513 512 514 … … 544 546 & mem_Mccn_co2,mem_Nccn_co2, 545 547 & mem_Mh2o_co2,watercap) 546 547 548 548 549 #else … … 864 865 IF(callnlte) then 865 866 if(nltemodel.eq.0.or.nltemodel.eq.1) then 866 867 CALL nltecool(ngrid,nlayer,nq,zplay,pt,pq,zdtnlte) 867 868 else if(nltemodel.eq.2) then 868 869 co2vmr_gcm(1:ngrid,1:nlayer)= … … 934 935 & fluxtop_sw,tau_pref_scenario,tau_pref_gcm, 935 936 & tau,aerosol,dsodust,tauscaling,dust_rad_adjust, 936 & taucloudtes,rdust,rice,nuice,co2ice,rstormdust,rtopdust, 937 & totstormfract,clearatm,dsords,dsotop,alpha_hmons,nohmons, 938 & clearsky,totcloudfrac) 939 937 & taucloudtes,rdust,rice,nuice,riceco2,nuiceco2,co2ice, 938 & rstormdust,rtopdust,totstormfract,clearatm,dsords,dsotop, 939 & alpha_hmons,nohmons,clearsky,totcloudfrac) 940 940 ! case of sub-grid water ice clouds: callradite for the clear case 941 941 IF (CLFvarying) THEN … … 944 944 ! if 945 945 ! CLFvarying ...) ?? AP ?? 946 clearsky=.true. !946 clearsky=.true. 947 947 CALL callradite(icount,ngrid,nlayer,nq,zday,zls,pq, 948 948 & albedo,emis,mu0,zplev,zplay,pt,tsurf,fract, … … 952 952 & tau,aerosol,dsodust,tauscaling,dust_rad_adjust, 953 953 & taucloudtesclf,rdust, 954 & rice,nuice,co2ice,rstormdust,rtopdust,totstormfract, 954 & rice,nuice,riceco2, nuiceco2,co2ice,rstormdust, 955 & rtopdust,totstormfract, 955 956 & clearatm,dsords,dsotop,alpha_hmons,nohmons, 956 957 & clearsky,totcloudfrac) … … 1318 1319 & zcondicea_co2microp,sensibFlux, 1319 1320 & dustliftday,local_time,watercap,dwatercap_dif) 1320 1321 1321 DO ig=1,ngrid 1322 1322 zdtsurf(ig)=zdtsurf(ig)+zdtsdif(ig) … … 1625 1625 & pq,pdq,zdqcloudco2,zdtcloudco2, 1626 1626 & nq,tau,tauscaling,rdust,rice,riceco2,nuice, 1627 & r sedcloud,rhocloud,zzlev,zdqssed_co2,1627 & rhocloud, rsedcloudco2,rhocloudco2,zzlev,zdqssed_co2, 1628 1628 & pdu,pu,zcondicea_co2microp, co2ice) 1629 1629 … … 2156 2156 ENDDO 2157 2157 2158 ! test for co2 conservation with co2 microphysics2159 if (igcm_co2_ice.ne.0) then2160 ! Total mass of co22161 mtotco2 = 0.2162 icetotco2 = 0.2163 vaptotco2 = 0.2164 do ig=1,ngrid2165 do l=1,nlayer2166 vaptotco2 = vaptotco2 + zq(ig,l,igcm_co2) *2167 & (zplev(ig,l) - zplev(ig,l+1)) / g2168 icetotco2 = icetotco2 + zq(ig,l,igcm_co2_ice) *2169 & (zplev(ig,l) - zplev(ig,l+1)) / g2170 end do2171 mtotco2 = mtotco2 + co2ice(ig)2172 end do2173 mtotco2 = mtotco2 + vaptotco2 + icetotco22174 endif ! of if (igcm_co2_ice.ne.0)2175 2176 2158 c Compute surface stress : (NB: z0 is a common in surfdat.h) 2177 2159 c DO ig=1,ngrid … … 2432 2414 c if (icetot(ig)*1e3.lt.0.01) rave(ig)=0. 2433 2415 enddo 2434 2435 2416 call watersat(ngrid*nlayer,zt,zplay,zqsat) 2436 2417 satu(:,:) = zq(:,:,igcm_h2o_vap)/zqsat(:,:) … … 2818 2799 c WRITEDIAGFI can ALSO be called from any other subroutines 2819 2800 c for any variables !! 2820 c call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2,2821 c & emis)2801 c call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2, 2802 c & emis) 2822 2803 c call WRITEDIAGFI(ngrid,"pplay","Pressure","Pa",3,zplay) 2823 2804 c call WRITEDIAGFI(ngrid,"pplev","Pressure","Pa",3,zplev) … … 2868 2849 & '',2,taucloudtes) 2869 2850 endif 2870 2871 2851 #else 2872 2852 !!! this is to ensure correct initialisation of mesoscale model … … 3774 3754 & 'temperature variation of CO2 latent heat', 3775 3755 & 'K/s',3,zdtcloudco2) 3756 call WRITEDIAGFI(ngrid,"emis","Surface emissivity","w.m-1",2, 3757 & emis) 3758 3776 3759 end if 3777 3760 … … 3794 3777 3795 3778 END IF ! if(ngrid.ne.1) 3796 3797 3779 ! test for co2 conservation with co2 microphysics 3798 3780 if (igcm_co2_ice.ne.0) then … … 3810 3792 & 'Total CO2 mass conservation in physic', 3811 3793 & '%',0,(co2totA-co2totB)/co2totA) 3812 call test_vmr(pq(:,:,igcm_co2), pdq(:,:,igcm_co2), ptimestep,3813 & ngrid, nlayer, 'end physiq_mod')3814 3794 endif ! of if (igcm_co2_ice.ne.0) 3815 3795 ! XIOS outputs -
trunk/LMDZ.MARS/libf/phymars/suaer.F90
r2311 r2447 154 154 ! Reference wavelength in the infrared: 155 155 longrefir(iaer)=12.1E-6 ! 825cm-1 TES/MGS 156 !================================================================== 157 CASE("co2_ice") aerkind ! CO2 ice crystals 158 !================================================================== 159 ! Visible domain: 160 file_id(iaer,1) = 'optprop_co2ice_vis_n50.dat' ! 161 ! Infrared domain: 162 file_id(iaer,2) = 'optprop_co2ice_ir_n50.dat' ! 163 ! Reference wavelength in the visible: 164 longrefvis(iaer) = 0.67E-6 ! 1.5um OMEGA/MEx 165 ! Reference wavelength in the infrared: 166 longrefir(iaer) = 1E-6 ! 1 micron a vérifier si on prends cette valeur 156 167 !================================================================== 157 168 CASE("stormdust_doubleq") aerkind ! Two-moment scheme for stormdust - radiative properties -
trunk/LMDZ.MARS/libf/phymars/updatereffrad_mod.F
r2409 r2447 7 7 SUBROUTINE updatereffrad(ngrid,nlayer, 8 8 & rdust,rstormdust,rtopdust,rice,nuice, 9 & reffrad,nueffrad, 9 & reffrad,nueffrad, riceco2, nuiceco2, 10 10 & pq,tauscaling,tau,pplay) 11 11 USE updaterad, ONLY: updaterdust, updaterice_micro, 12 & updaterice_ typ12 & updaterice_microco2, updaterice_typ 13 13 use tracer_mod, only: nqmx, igcm_dust_mass, igcm_dust_number, 14 14 & igcm_h2o_ice, igcm_ccn_mass, radius, 15 & igcm_co2_ice, nuiceco2_ref, 16 & igcm_ccnco2_number, igcm_ccnco2_mass, 15 17 & igcm_ccn_number, nuice_ref, varian, 16 18 & ref_r0, igcm_dust_submicron, … … 68 70 REAL, INTENT(out) :: nueffrad(ngrid,nlayer,naerkind) 69 71 REAL, INTENT(in) :: tauscaling(ngrid) ! Convertion factor for qccn and Nccn 70 72 c CO2 ice mean radius (m) 73 REAL, INTENT(out) :: riceco2(ngrid,nlayer) ! co2 ice radius 74 REAL, INTENT(out) :: nuiceco2(ngrid,nlayer) 75 76 71 77 c Local variables: 72 78 c --------------- … … 85 91 REAL Mo,No ! Mass and number of ccn 86 92 REAL rhocloud(ngrid,nlayer) ! Cloud density (kg.m-3) 93 c For CO2 microphysics only: 94 REAL :: rhocloudco2(ngrid, nlayer) ! co2 cloud density 87 95 88 96 LOGICAL,SAVE :: firstcall=.true. … … 176 184 ENDIF ! of if (water.AND.activice) 177 185 186 187 c 1.3 CO2-ice particles --- in progress..... 188 c ----------------------- j'ai juste copié-collé la partie 1.2 189 190 IF (co2clouds.AND.activeco2ice) THEN 191 192 c At firstcall, the true number and true mass of cloud condensation nuclei are not known. 193 c Indeed it is scaled on the prescribed dust opacity via a 'tauscaling' coefficient 194 c computed after radiative transfer. If tauscaling is not in startfi, we make an assumption for its value. 195 196 IF (firstcall) THEN 197 !IF (minval(tauscaling).lt.0) tauscaling(:) = 1.e-3 ! default value when non-read in startfi is -1 198 !IF (freedust) tauscaling(:) = 1. ! if freedust, enforce no rescaling at all 199 firstcall = .false. 200 ENDIF 201 DO l=1,nlayer 202 DO ig=1,ngrid 203 call updaterice_microco2(pq(ig,l,igcm_co2_ice), 204 & pq(ig,l,igcm_ccnco2_mass), 205 & pq(ig,l,igcm_ccnco2_number), 206 & tauscaling(ig),riceco2(ig,l), 207 & rhocloudco2(ig,l)) 208 nuiceco2(ig,l) = nuiceco2_ref 209 END DO 210 ENDDO 211 ENDIF ! of if (co2clouds.AND.activeco2ice) 212 178 213 c================================================================== 179 214 c 2. Radius used in the radiative transfer code (reffrad) … … 227 262 ENDDO 228 263 c================================================================== 264 CASE("co2_ice") aerkind ! CO2 ice crystals 265 c================================================================== 266 DO l=1,nlayer 267 DO ig=1,ngrid 268 reffrad(ig,l,iaer)=riceco2(ig,l)*(1.+nuiceco2_ref) 269 nueffrad(ig,l,iaer)=nuiceco2_ref 270 ENDDO 271 ENDDO 272 c================================================================== 229 273 CASE("stormdust_doubleq") aerkind! Two-moment scheme for 230 274 c stormdust; same distribution than normal dust
Note: See TracChangeset
for help on using the changeset viewer.