Changeset 2184 for trunk/LMDZ.MARS
- Timestamp:
- Dec 4, 2019, 7:29:38 PM (5 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2182 r2184 2790 2790 Fix in surfini for the 1D model when imposing watercaptag. 2791 2791 Protect output of CO2 saturation in physiq to when there is a CO2 tracer. 2792 2793 == 04/12/2019 == AB 2794 Add the instantaneous scavenging by CO2 of dust, ccn and water ice in co2condens_mod. It can be activated or deactivated with the new flag "scavco2cond" (=false by default). Expected to be replaced by the CO2 clouds microphysics in the future. -
trunk/LMDZ.MARS/libf/phymars/co2condens_mod.F
r2155 r2184 3 3 IMPLICIT NONE 4 4 5 logical, save :: scavco2cond = .false. ! flag for using scavenging_by_co2 6 5 7 CONTAINS 6 8 … … 8 10 $ pcapcal,pplay,pplev,ptsrf,pt, 9 11 $ pphi,pdt,pdu,pdv,pdtsrf,pu,pv,pq,pdq, 10 $ piceco2,psolaralb,pemisurf, 12 $ piceco2,psolaralb,pemisurf,rdust, 11 13 $ pdtc,pdtsrfc,pdpsrf,pduc,pdvc,pdqc, 12 14 $ fluxsurf_sw,zls, 13 15 $ zdqssed_co2,pcondicea_co2microp, 14 $ zdtcloudco2 )16 $ zdtcloudco2,pdqsc) 15 17 16 use tracer_mod, only: noms 18 use tracer_mod, only: noms, igcm_h2o_ice, 19 & igcm_dust_mass, igcm_dust_number, 20 & igcm_ccn_mass, igcm_ccn_number 17 21 use surfdat_h, only: emissiv, phisfi 18 22 use geometry_mod, only: latitude, ! grid point latitudes (rad) … … 20 24 use planete_h, only: obliquit 21 25 use comcstfi_h, only: cpp, g, r, pi 26 22 27 #ifndef MESOSCALE 23 28 USE vertical_layers_mod, ONLY: ap, bp … … 77 82 REAL,INTENT(INOUT) :: psolaralb(ngrid,2) ! albedo of the surface 78 83 REAL,INTENT(INOUT) :: pemisurf(ngrid) ! emissivity of the surface 84 REAL,INTENT(IN) :: rdust(ngrid,nlayer) ! dust effective radius 79 85 80 86 ! tendencies due to CO2 condensation/sublimation: … … 85 91 REAL,INTENT(OUT) :: pdvc(ngrid,nlayer) ! tendency on meridional wind (m.s-2) 86 92 REAL,INTENT(OUT) :: pdqc(ngrid,nlayer,nq) ! tendency on tracers 93 REAL,INTENT(OUT) :: pdqsc(ngrid,nq) ! tendency on surface tracers 87 94 88 95 ! added to calculate flux dependent albedo: … … 107 114 REAL zmflux(nlayer+1) 108 115 REAL zu(nlayer),zv(nlayer) 109 REAL zq (nlayer,nq),zq1(nlayer)116 REAL zqc(nlayer,nq),zq1(nlayer) 110 117 REAL ztsrf(ngrid) 111 118 REAL ztc(nlayer), ztm(nlayer+1) … … 118 125 119 126 real :: emisref(ngrid) 127 128 REAL zdq_scav(ngrid,nlayer,nq) ! tendancy due to scavenging by co2 129 REAL zq(ngrid,nlayer,nq) 120 130 121 131 c variable speciale diagnostique … … 197 207 c 198 208 c 199 c Tendencies set to 0 (except pdtc)209 c Tendencies set to 0 200 210 c ------------------------------------- 201 211 DO l=1,nlayer … … 205 215 pduc(ig,l) = 0 206 216 pdvc(ig,l) = 0 217 pdtc(ig,l) = 0. 207 218 END DO 208 219 END DO … … 225 236 ENDDO 226 237 zfallheat=0 227 238 239 zdq_scav(:,:,:)=0. 240 241 c Update tendencies from previous processes 242 c ------------------------------------- 243 DO l=1,nlayer 244 DO ig=1,ngrid 245 zt(ig,l)=pt(ig,l)+ pdt(ig,l)*ptimestep 246 do iq=1,nq 247 zq(ig,l,iq)=pq(ig,l,iq)+pdq(ig,l,iq)*ptimestep 248 enddo 249 ENDDO 250 ENDDO 251 228 252 c ************************* 229 253 c ATMOSPHERIC CONDENSATION … … 247 271 ENDDO 248 272 ENDDO 249 end 273 endif 250 274 251 275 IF (.NOT. co2clouds) then … … 255 279 DO l=1,nlayer 256 280 DO ig=1,ngrid 257 zt(ig,l)=pt(ig,l)+ pdt(ig,l)*ptimestep258 281 ! ztcond(ig,l)=1./(bcond-acond*log(.0095*pplay(ig,l))) 259 282 if (pplay(ig,l).ge.1e-4) then … … 300 323 ENDDO 301 324 302 ELSE 303 325 if (scavco2cond) then 326 call scavenging_by_co2(ngrid,nlayer,nq,ptimestep,pplev,zq, 327 & rdust,zcondicea,zfallice,zdq_scav,pdqsc) 328 endif 329 330 ELSE ! if co2 clouds 304 331 DO ig=1,ngrid 305 332 zfallice(ig,1) = zdqssed_co2(ig) … … 311 338 ENDDO 312 339 ENDDO 313 DO l=nlayer, 1, -1 314 DO ig=1, ngrid 315 zt(ig,l)=pt(ig,l)+ pdt(ig,l)*ptimestep 316 pdtc(ig,l)=0. 317 ENDDO 318 ENDDO 319 ENDIF ! if not co2clouds 340 341 ENDIF ! end of if co2clouds 320 342 321 343 call WRITEdiagfi(ngrid,"pdtc_atm", … … 330 352 & "", 331 353 & " ",2,zfallice(ngrid,1)) 354 332 355 333 356 c ************************* … … 402 425 #endif 403 426 404 c If the entire CO _2 ice layer sublimes427 c If the entire CO2 ice layer sublimes 405 428 c """""""""""""""""""""""""""""""""""""""""""""""""""" 406 429 c (including what has just condensed in the atmosphere) … … 430 453 STOP 431 454 ENDIF 432 END IF ! if there is condensation/sublim mation455 END IF ! if there is condensation/sublimation 433 456 ENDDO ! of DO ig=1,ngrid 434 457 … … 471 494 zv(l) =pv(ig,l) +pdv( ig,l) *ptimestep 472 495 do iq=1,nq 473 zq (l,iq)=pq(ig,l,iq)+pdq(ig,l,iq)*ptimestep496 zqc(l,iq)=zq(ig,l,iq)+zdq_scav(ig,l,iq)*ptimestep ! zdq_scav=0 if watercloud=false 474 497 enddo 475 end 498 enddo 476 499 477 500 c Mass fluxes through the sigma levels (kg.m-2.s-1) (>0 when up) … … 527 550 do iq=1,nq 528 551 do l=1,nlayer 529 zq1(l)=zq (l,iq)552 zq1(l)=zqc(l,iq) 530 553 enddo 531 554 zqm1(1)=zqm(1,iq) 532 555 call vl1d(nlayer,zq1,2.,masse,w,zqm1) 533 556 do l=2,nlayer 534 zq (l,iq)=zq1(l)557 zqc(l,iq)=zq1(l) 535 558 zqm(l,iq)=zqm1(l) 536 559 enddo … … 551 574 zvm(nlayer+1)= zv(nlayer) ! should not be used, but... 552 575 do iq=1,nq 553 zqm(nlayer+1,iq)= zq (nlayer,iq)576 zqm(nlayer+1,iq)= zqc(nlayer,iq) 554 577 enddo 555 578 … … 602 625 DO l=1,nlayer 603 626 pdqc(ig,l,iq)= (1/masse(l)) * 604 & ( zmflux(l)*(zqm(l,iq) - zq (l,iq))605 & - zmflux(l+1)*(zqm(l+1,iq) - zq (l,iq))606 & + zcondicea(ig,l)*(zq (l,iq)-1.) )627 & ( zmflux(l)*(zqm(l,iq) - zqc(l,iq)) 628 & - zmflux(l+1)*(zqm(l+1,iq) - zqc(l,iq)) 629 & + zcondicea(ig,l)*(zqc(l,iq)-1.) ) 607 630 END DO 608 631 else 609 632 DO l=1,nlayer 610 633 pdqc(ig,l,iq)= (1/masse(l)) * 611 & ( zmflux(l)*(zqm(l,iq) - zq(l,iq)) 612 & - zmflux(l+1)*(zqm(l+1,iq) - zq(l,iq)) 613 & + zcondicea(ig,l)*zq(l,iq) ) 634 & ( zmflux(l)*(zqm(l,iq) - zqc(l,iq)) 635 & - zmflux(l+1)*(zqm(l+1,iq) - zqc(l,iq)) 636 & + zcondicea(ig,l)*zqc(l,iq) ) 637 638 pdqc(ig,l,iq)=pdqc(ig,l,iq)+zdq_scav(ig,l,iq) ! zdq_scav=0 if watercloud=false 614 639 END DO 615 640 end if … … 793 818 794 819 END SUBROUTINE vl1d 820 821 c ***************************************************************** 822 SUBROUTINE scavenging_by_co2(ngrid,nlayer,nq,ptimestep,pplev,pq, 823 & rdust,pcondicea,pfallice,pdq_scav,pdqsc) 824 825 c 826 c 827 c Calcul de la quantite de poussiere lessivee par les nuages de CO2 828 c 829 c -------------------------------------------------------------------- 830 use tracer_mod, only: nqmx, igcm_h2o_vap, igcm_h2o_ice, 831 & igcm_dust_mass, igcm_dust_number, 832 & igcm_ccn_mass, igcm_ccn_number, 833 & rho_dust, nuice_sed, nuice_ref,r3n_q 834 use comcstfi_h, only: g 835 836 IMPLICIT NONE 837 include "callkeys.h" ! for the flags water, microphys and freedust 838 c 839 c 840 c Arguments: 841 INTEGER,INTENT(IN) :: ngrid ! number of atmospheric columns 842 INTEGER,INTENT(IN) :: nlayer ! number of vertical layers 843 INTEGER,INTENT(IN) :: nq ! number of tracers 844 REAL,INTENT(IN) :: ptimestep ! physics timestep (s) 845 REAL,INTENT(IN) :: pplev(ngrid,nlayer+1) ! inter-layer pressure (Pa) 846 REAL,INTENT(IN) :: pq(ngrid,nlayer,nq) 847 REAL,INTENT(IN) :: rdust(ngrid,nlayer) ! dust effective radius 848 REAL,INTENT(IN) :: pcondicea(ngrid,nlayer) ! condensation rate in layer l (kg/m2/s) 849 REAL,INTENT(IN) :: pfallice(ngrid,nlayer+1) ! amount of ice falling from layer l (kg/m2/s) 850 851 REAL,INTENT(OUT) :: pdq_scav(ngrid,nlayer,nq) ! tendancy due to scavenging by co2 852 REAL,INTENT(OUT) :: pdqsc(ngrid,nq) ! tendency on surface tracers 853 854 c Locals: 855 INTEGER l,ig 856 REAL scav_ratio_dust, scav_ratio_wice ! ratio of the dust/water ice mass mixing ratios in condensing CO2 ice and in air 857 REAL scav_dust_mass(nlayer+1) ! dust flux (mass) scavenged towards the lower layer (kg/m2/s) (POSITIVE WHEN DOWNWARD) 858 REAL scav_dust_number(nlayer+1) ! dust flux (number) scavenged towards the lower layer (kg/m2/s) (POSITIVE WHEN DOWNWARD) 859 REAL scav_ccn_mass(nlayer+1) ! ccn flux (mass) scavenged towards the lower layer 860 REAL scav_ccn_number(nlayer+1) ! ccn flux (number) scavenged towards the lower layer 861 REAL scav_h2o_ice(nlayer+1) ! water ice flux (mass) scavenged towards the lower layer 862 REAL massl ! mass of the layer l at point ig (kg/m2) 863 864 c Initialization: 865 scav_ratio_dust = 100 !1 !10 !100 !1000 866 scav_ratio_wice = scav_ratio_dust 867 pdq_scav(:,:,:)=0. 868 869 DO ig=1,ngrid 870 scav_dust_mass(nlayer+1)=0. 871 scav_dust_number(nlayer+1)=0. 872 scav_ccn_mass(nlayer+1)=0. 873 scav_ccn_number(nlayer+1)=0. 874 scav_h2o_ice(nlayer+1)=0. 875 876 DO l=nlayer , 1, -1 877 massl=(pplev(ig,l)-pplev(ig,l+1))/g 878 IF(pcondicea(ig,l).GT.0.)THEN ! if CO2 condenses and traps dust/water ice 879 ! Calculation of the tendencies 880 if (freedust) then 881 pdq_scav(ig,l,igcm_dust_mass)=-pq(ig,l,igcm_dust_mass) 882 & /ptimestep*(1-exp( 883 & -scav_ratio_dust*pcondicea(ig,l)*ptimestep/massl)) 884 885 pdq_scav(ig,l,igcm_dust_number)=pdq_scav(ig,l,igcm_dust_mass) 886 & *r3n_q/rdust(ig,l) 887 endif 888 if (freedust.AND.microphys) then 889 pdq_scav(ig,l,igcm_ccn_mass)=-pq(ig,l,igcm_ccn_mass) 890 & /ptimestep*(1-exp( 891 & -scav_ratio_wice*pcondicea(ig,l)*ptimestep/massl)) 892 pdq_scav(ig,l,igcm_ccn_number)=pdq_scav(ig,l,igcm_ccn_mass) 893 & *r3n_q/rdust(ig,l) 894 endif 895 if (water) then 896 pdq_scav(ig,l,igcm_h2o_ice)=-pq(ig,l,igcm_h2o_ice) 897 & /ptimestep*(1-exp( 898 & -scav_ratio_wice*pcondicea(ig,l)*ptimestep/massl)) 899 endif 900 901 ELSE IF(pcondicea(ig,l).LT.0.)THEN ! if CO2 sublimates and releases dust/water ice 902 ! Calculation of the tendencies 903 if (freedust) then 904 pdq_scav(ig,l,igcm_dust_mass)=-pcondicea(ig,l)/massl* 905 & scav_dust_mass(l+1)/pfallice(ig,l+1) 906 907 pdq_scav(ig,l,igcm_dust_number)=-pcondicea(ig,l)/massl* 908 & scav_dust_number(l+1)/pfallice(ig,l+1) 909 endif 910 if (freedust.AND.microphys) then 911 pdq_scav(ig,l,igcm_ccn_mass)=-pcondicea(ig,l)/massl* 912 & scav_ccn_mass(l+1)/pfallice(ig,l+1) 913 914 pdq_scav(ig,l,igcm_ccn_number)=-pcondicea(ig,l)/massl* 915 & scav_ccn_number(l+1)/pfallice(ig,l+1) 916 endif 917 if (water) then 918 pdq_scav(ig,l,igcm_h2o_ice)=-pcondicea(ig,l)/massl* 919 & scav_h2o_ice(l+1)/pfallice(ig,l+1) 920 endif 921 922 END IF 923 ! Calculation of the scavenged dust/wice flux towards the lower layers 924 if (freedust) then 925 scav_dust_mass(l)=-pdq_scav(ig,l,igcm_dust_mass)*massl 926 & +scav_dust_mass(l+1) 927 928 scav_dust_number(l)=-pdq_scav(ig,l,igcm_dust_number)*massl 929 & +scav_dust_number(l+1) 930 endif 931 if (freedust.AND.microphys) then 932 scav_ccn_mass(l)=-pdq_scav(ig,l,igcm_ccn_mass)*massl 933 & +scav_ccn_mass(l+1) 934 935 scav_ccn_number(l)=-pdq_scav(ig,l,igcm_ccn_number)*massl 936 & +scav_dust_number(l+1) 937 endif 938 if (water) then 939 scav_h2o_ice(l)=-pdq_scav(ig,l,igcm_h2o_ice)*massl 940 & +scav_h2o_ice(l+1) 941 endif 942 943 ENDDO 944 ! Calculation of the surface tendencies 945 pdqsc(ig,igcm_dust_mass)=0. 946 pdqsc(ig,igcm_dust_number)=0. 947 948 if (freedust) then 949 pdqsc(ig,igcm_dust_mass)=pdqsc(ig,igcm_dust_mass) 950 & +scav_dust_mass(1) 951 pdqsc(ig,igcm_dust_number)=pdqsc(ig,igcm_dust_number) 952 & +scav_dust_number(1) 953 endif 954 if (freedust.AND.microphys) then 955 pdqsc(ig,igcm_dust_mass)=pdqsc(ig,igcm_dust_mass) 956 & +scav_ccn_mass(1) 957 pdqsc(ig,igcm_dust_number)=pdqsc(ig,igcm_dust_number) 958 & +scav_ccn_number(1) 959 endif 960 if (water) then 961 pdqsc(ig,igcm_h2o_ice)=scav_h2o_ice(1) 962 endif 963 ENDDO 964 965 END SUBROUTINE scavenging_by_co2 795 966 796 967 END MODULE co2condens_mod -
trunk/LMDZ.MARS/libf/phymars/conf_phys.F
r2179 r2184 45 45 use datafile_mod, only: datadir 46 46 use calchim_mod, only: ichemistry 47 47 use co2condens_mod, only: scavco2cond 48 48 49 IMPLICIT NONE 49 50 include "callkeys.h" … … 661 662 endif 662 663 664 ! Instantaneous scavenging by CO2 665 ! -> expected to be replaced by scavenging with microphysics (flag scavenging) one day 666 write(*,*)"Dust scavenging by instantaneous CO2 snowfall ?" 667 scavco2cond=.false. ! default value 668 call getin("scavco2cond",scavco2cond) 669 write(*,*)" scavco2cond = ",scavco2cond 670 ! Test of incompatibility: 671 ! if scavco2cond is used, then dustbin should be > 0 672 if (scavco2cond.and.(dustbin.lt.1))then 673 print*,'if scavco2cond is used, then dustbin should be > 0' 674 stop 675 endif 676 ! if co2clouds is used, then there is no need for scavco2cond 677 if (co2clouds.and.scavco2cond) then 678 print*,'' 679 print*,'----------------WARNING-----------------' 680 print*,' microphys scavenging is used so ' 681 print*,' no need for scavco2cond !!! ' 682 print*,'----------------WARNING-----------------' 683 print*,'' 684 stop 685 endif 686 663 687 ! Test of incompatibility: 664 688 -
trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
r2182 r2184 310 310 REAL zdqc(ngrid,nlayer,nq) 311 311 REAL zdqcloudco2(ngrid,nlayer,nq) 312 REAL zdqsc(ngrid,nq) 312 313 313 314 REAL zdteuv(ngrid,nlayer) ! (K/s) … … 1672 1673 #endif 1673 1674 1674 c 9d. Updates1675 c ---------1676 1677 DO iq=1, nq1678 DO ig=1,ngrid1679 1680 c ---------------------------------1681 c Updating tracer budget on surface1682 c ---------------------------------1683 qsurf(ig,iq)=qsurf(ig,iq)+ptimestep*dqsurf(ig,iq)1684 1685 ENDDO ! (ig)1686 ENDDO ! (iq)1687 1688 1675 endif ! of if (tracer) 1689 1676 … … 1733 1720 $ capcal,zplay,zplev,tsurf,pt, 1734 1721 $ pphi,pdt,pdu,pdv,zdtsurf,pu,pv,pq,pdq, 1735 $ co2ice,albedo,emis, 1722 $ co2ice,albedo,emis,rdust, 1736 1723 $ zdtc,zdtsurfc,pdpsrf,zduc,zdvc,zdqc, 1737 1724 $ fluxsurf_sw,zls, 1738 1725 $ zdqssed_co2,zcondicea_co2microp, 1739 & zdtcloudco2 )1726 & zdtcloudco2,zdqsc) 1740 1727 1741 1728 DO l=1,nlayer … … 1758 1745 ENDDO 1759 1746 ENDDO 1747 1748 DO iq=1, nq 1749 DO ig=1,ngrid 1750 dqsurf(ig,iq)=dqsurf(ig,iq)+zdqsc(ig,iq) 1751 ENDDO ! (ig) 1752 ENDDO ! (iq) 1753 1760 1754 ENDIF ! of IF (tracer) 1761 1755 … … 1787 1781 ENDIF ! of IF (callcond) 1788 1782 1783 c----------------------------------------------------------------------- 1784 c Updating tracer budget on surface 1785 c----------------------------------------------------------------------- 1786 IF (tracer) THEN 1787 DO iq=1, nq 1788 DO ig=1,ngrid 1789 1790 qsurf(ig,iq)=qsurf(ig,iq)+ptimestep*dqsurf(ig,iq) 1791 1792 ENDDO ! (ig) 1793 ENDDO ! (iq) 1794 ENDIF 1795 1789 1796 c----------------------------------------------------------------------- 1790 1797 c 12. Surface and sub-surface soil temperature
Note: See TracChangeset
for help on using the changeset viewer.