Changeset 1911 for trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F
- Timestamp:
- Mar 9, 2018, 6:19:27 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/improvedCO2clouds.F
r1884 r1911 1 subroutine improvedCO2clouds(ngrid,nlay, ptimestep,2 & pplay,pplev,pt ,pdt,3 & pq ,pdq,pdqcloudco2,pdtcloudco2,1 subroutine improvedCO2clouds(ngrid,nlay,microtimestep, 2 & pplay,pplev,pteff,sum_subpdt, 3 & pqeff,sum_subpdq,subpdqcloudco2,subpdtcloudco2, 4 4 & nq,tauscaling, 5 5 & memdMMccn,memdMMh2o,memdNNccn) … … 61 61 INTEGER,INTENT(in) :: ngrid,nlay 62 62 integer,intent(in) :: nq ! number of tracers 63 REAL,INTENT(in) :: ptimestep ! physics time step (s)63 REAL,INTENT(in) :: microtimestep ! physics time step (s) 64 64 REAL,INTENT(in) :: pplay(ngrid,nlay) ! mid-layer pressure (Pa) 65 65 REAL,INTENT(in) :: pplev(ngrid,nlay+1) ! inter-layer pressure (Pa) 66 REAL,INTENT(in) :: pt (ngrid,nlay) ! temperature at the middle of the66 REAL,INTENT(in) :: pteff(ngrid,nlay) ! temperature at the middle of the 67 67 ! layers (K) 68 REAL,INTENT(in) :: pdt(ngrid,nlay) ! tendency on temperature from68 REAL,INTENT(in) :: sum_subpdt(ngrid,nlay) ! tendency on temperature from 69 69 ! previous physical parametrizations 70 REAL,INTENT(in) :: pq (ngrid,nlay,nq) ! tracers (kg/kg)71 REAL,INTENT(in) :: pdq(ngrid,nlay,nq) ! tendencies on tracers70 REAL,INTENT(in) :: pqeff(ngrid,nlay,nq) ! tracers (kg/kg) 71 REAL,INTENT(in) :: sum_subpdq(ngrid,nlay,nq) ! tendencies on tracers 72 72 ! before condensation (kg/kg.s-1) 73 73 REAL,INTENT(in) :: tauscaling(ngrid) ! Convertion factor for qdust and Ndust 74 74 c Outputs: 75 REAL,INTENT(out) :: pdqcloudco2(ngrid,nlay,nq) ! tendency on tracers75 REAL,INTENT(out) :: subpdqcloudco2(ngrid,nlay,nq) ! tendency on tracers 76 76 ! due to CO2 condensation (kg/kg.s-1) 77 77 ! condensation si igcm_co2_ice 78 REAL,INTENT(out) :: pdtcloudco2(ngrid,nlay) ! tendency on temperature due78 REAL,INTENT(out) :: subpdtcloudco2(ngrid,nlay) ! tendency on temperature due 79 79 ! to latent heat 80 80 … … 302 302 303 303 c Initialize the tendencies 304 pdqcloudco2(1:ngrid,1:nlay,1:nq)=0.305 pdtcloudco2(1:ngrid,1:nlay)=0.306 307 c pt temperature layer;pdt dT.s-1308 c pq traceur kg/kg;pdq tendance idem .s-1304 subpdqcloudco2(1:ngrid,1:nlay,1:nq)=0. 305 subpdtcloudco2(1:ngrid,1:nlay)=0. 306 307 c pteff temperature layer; sum_subpdt dT.s-1 308 c pqeff traceur kg/kg; sum_subpdq tendance idem .s-1 309 309 zt(1:ngrid,1:nlay) = 310 & pt (1:ngrid,1:nlay) +311 & pdt(1:ngrid,1:nlay) * ptimestep310 & pteff(1:ngrid,1:nlay) + 311 & sum_subpdt(1:ngrid,1:nlay) * microtimestep 312 312 zq(1:ngrid,1:nlay,1:nq) = 313 & pq (1:ngrid,1:nlay,1:nq) +314 & pdq(1:ngrid,1:nlay,1:nq) * ptimestep313 & pqeff(1:ngrid,1:nlay,1:nq) + 314 & sum_subpdq(1:ngrid,1:nlay,1:nq) * microtimestep 315 315 WHERE( zq(1:ngrid,1:nlay,1:nq) < 1.e-30 ) 316 316 & zq(1:ngrid,1:nlay,1:nq) = 1.e-30 … … 443 443 dMh2o = 0. 444 444 do i = 1, nbinco2_cld 445 Proba=1.0-dexp(-1.*ptimestep*rate(i)) 446 Probah2o=coeffh2o*(1.0-dexp(-1.*ptimestep*rateh2o(i))) !if co2useh2o=.false., this is =0 445 Proba=1.0-dexp(-1.*microtimestep*rate(i)) 446 Probah2o=coeffh2o* 447 & (1.0-dexp(-1.*microtimestep*rateh2o(i))) !if co2useh2o=.false., this is =0 447 448 dNh2o = dNh2o + n_aer_h2oice(i) * Probah2o 448 449 dMh2o = dMh2o + m_aer_h2oice(i) * Probah2o … … 517 518 Ic_rice=0. 518 519 flag_pourri=1 519 pdtcloudco2(ig,l)=-pdt(ig,l)520 subpdtcloudco2(ig,l)=-sum_subpdt(ig,l) 520 521 dMice=0 521 522 522 523 else 523 dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice* ptimestep524 dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice*microtimestep 524 525 & *tauscaling(ig) ! Kg par kg d'air, >0 si croissance ! 525 526 !kg.s-1 par particule * nb particule par kg air*s … … 530 531 !facteurmax maximum quantity of CO2 that can sublime/condense according to available thermal energy 531 532 ! latent heat release >0 if growth i.e. if dMice >0 532 pdtcloudco2(ig,l)=dMice*lw/cpp/ptimestep533 subpdtcloudco2(ig,l)=dMice*lw/cpp/microtimestep 533 534 ! kgco2/kgair* J/kgco2 * 1/(J.kgair-1.K-1)/s= K par seconde 534 535 !Now update tracers … … 588 589 589 590 ! Get cloud tendencies 590 pdqcloudco2(1:ngrid,1:nlay,igcm_co2) =591 subpdqcloudco2(1:ngrid,1:nlay,igcm_co2) = 591 592 & (zq(1:ngrid,1:nlay,igcm_co2) - 592 & zq0(1:ngrid,1:nlay,igcm_co2))/ ptimestep593 pdqcloudco2(1:ngrid,1:nlay,igcm_co2_ice) =593 & zq0(1:ngrid,1:nlay,igcm_co2))/microtimestep 594 subpdqcloudco2(1:ngrid,1:nlay,igcm_co2_ice) = 594 595 & (zq(1:ngrid,1:nlay,igcm_co2_ice) - 595 & zq0(1:ngrid,1:nlay,igcm_co2_ice))/ ptimestep596 pdqcloudco2(1:ngrid,1:nlay,igcm_h2o_ice) =596 & zq0(1:ngrid,1:nlay,igcm_co2_ice))/microtimestep 597 subpdqcloudco2(1:ngrid,1:nlay,igcm_h2o_ice) = 597 598 & (zq(1:ngrid,1:nlay,igcm_h2o_ice) - 598 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ ptimestep599 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_mass) =599 & zq0(1:ngrid,1:nlay,igcm_h2o_ice))/microtimestep 600 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccn_mass) = 600 601 & (zq(1:ngrid,1:nlay,igcm_ccn_mass) - 601 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ ptimestep602 pdqcloudco2(1:ngrid,1:nlay,igcm_ccn_number) =602 & zq0(1:ngrid,1:nlay,igcm_ccn_mass))/microtimestep 603 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccn_number) = 603 604 & (zq(1:ngrid,1:nlay,igcm_ccn_number) - 604 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/ ptimestep605 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_mass) =605 & zq0(1:ngrid,1:nlay,igcm_ccn_number))/microtimestep 606 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_mass) = 606 607 & (zq(1:ngrid,1:nlay,igcm_ccnco2_mass) - 607 & zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/ ptimestep608 pdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_number) =608 & zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/microtimestep 609 subpdqcloudco2(1:ngrid,1:nlay,igcm_ccnco2_number) = 609 610 & (zq(1:ngrid,1:nlay,igcm_ccnco2_number) - 610 & zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/ ptimestep611 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_mass) =611 & zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/microtimestep 612 subpdqcloudco2(1:ngrid,1:nlay,igcm_dust_mass) = 612 613 & (zq(1:ngrid,1:nlay,igcm_dust_mass) - 613 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/ ptimestep614 pdqcloudco2(1:ngrid,1:nlay,igcm_dust_number) =614 & zq0(1:ngrid,1:nlay,igcm_dust_mass))/microtimestep 615 subpdqcloudco2(1:ngrid,1:nlay,igcm_dust_number) = 615 616 & (zq(1:ngrid,1:nlay,igcm_dust_number) - 616 & zq0(1:ngrid,1:nlay,igcm_dust_number))/ ptimestep617 & zq0(1:ngrid,1:nlay,igcm_dust_number))/microtimestep 617 618 618 619 end
Note: See TracChangeset
for help on using the changeset viewer.