Ignore:
Timestamp:
Mar 9, 2018, 6:19:27 PM (7 years ago)
Author:
mvals
Message:

Mars GCM
"cosmetics" changes in co2cloud and improvedCO2clouds to better understand the role of the variables:

  • in co2cloud : - change of variables subpdq and subpdt in sum_subpdq and sum_subpdt to make clear we ae making the sum of the tendencies in the microphysics loop.
    • change of variables pdqsed in subpdqsed as these are tendencies inside the microphysics loop
    • flag "sedimentation" has been added for the sedimentation block
    • variables names in the sedimentation block have been changed (tempo_traceurs becomes zqsed, sav_trac becomes zqsed0)
    • variable sum_subpdqs_sedco2 was added in the microphysics loop to make clear we make the sum of the surface sedimentation flux, output variable is still pdqs_sedco2
    • variable sum_subpdqs_sedco2 has been initialized to zero
    • zteff has been changed to pteff to be logical with the other variables names
  • in improvedCO2clouds : change of the names of input and output variables according to their names in co2cloud in order to not confuse them (in improvedCO2clouds "ptimestep" corresponds actually to

"microtimestep").

MV

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,
    44     &             nq,tauscaling,
    55     &             memdMMccn,memdMMh2o,memdNNccn)
     
    6161      INTEGER,INTENT(in) :: ngrid,nlay
    6262      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)
    6464      REAL,INTENT(in) :: pplay(ngrid,nlay)     ! mid-layer pressure (Pa)
    6565      REAL,INTENT(in) :: pplev(ngrid,nlay+1)   ! inter-layer pressure (Pa)
    66       REAL,INTENT(in) :: pt(ngrid,nlay) ! temperature at the middle of the
     66      REAL,INTENT(in) :: pteff(ngrid,nlay) ! temperature at the middle of the
    6767                                 !   layers (K)
    68       REAL,INTENT(in) :: pdt(ngrid,nlay) ! tendency on temperature from
     68      REAL,INTENT(in) :: sum_subpdt(ngrid,nlay) ! tendency on temperature from
    6969                                 !  previous physical parametrizations
    70       REAL,INTENT(in) :: pq(ngrid,nlay,nq) ! tracers (kg/kg)
    71       REAL,INTENT(in) :: pdq(ngrid,nlay,nq) ! tendencies on tracers
     70      REAL,INTENT(in) :: pqeff(ngrid,nlay,nq) ! tracers (kg/kg)
     71      REAL,INTENT(in) :: sum_subpdq(ngrid,nlay,nq) ! tendencies on tracers
    7272                                 !  before condensation (kg/kg.s-1)
    7373      REAL,INTENT(in) :: tauscaling(ngrid) ! Convertion factor for qdust and Ndust
    7474c     Outputs:
    75       REAL,INTENT(out) :: pdqcloudco2(ngrid,nlay,nq) ! tendency on tracers
     75      REAL,INTENT(out) :: subpdqcloudco2(ngrid,nlay,nq) ! tendency on tracers
    7676                                   ! due to CO2 condensation (kg/kg.s-1)
    7777      ! condensation si igcm_co2_ice
    78       REAL,INTENT(out) :: pdtcloudco2(ngrid,nlay)  ! tendency on temperature due
     78      REAL,INTENT(out) :: subpdtcloudco2(ngrid,nlay)  ! tendency on temperature due
    7979                                   ! to latent heat
    8080
     
    302302
    303303c     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-1
    308 c pq traceur kg/kg; pdq tendance idem .s-1
     304      subpdqcloudco2(1:ngrid,1:nlay,1:nq)=0.
     305      subpdtcloudco2(1:ngrid,1:nlay)=0.
     306     
     307c pteff temperature layer; sum_subpdt dT.s-1
     308c pqeff traceur kg/kg; sum_subpdq tendance idem .s-1
    309309      zt(1:ngrid,1:nlay) =
    310      &      pt(1:ngrid,1:nlay) +
    311      &      pdt(1:ngrid,1:nlay) * ptimestep
     310     &      pteff(1:ngrid,1:nlay) +
     311     &      sum_subpdt(1:ngrid,1:nlay) * microtimestep
    312312      zq(1:ngrid,1:nlay,1:nq) =
    313      &      pq(1:ngrid,1:nlay,1:nq) +
    314      &      pdq(1:ngrid,1:nlay,1:nq) * ptimestep
     313     &      pqeff(1:ngrid,1:nlay,1:nq) +
     314     &      sum_subpdq(1:ngrid,1:nlay,1:nq) * microtimestep
    315315      WHERE( zq(1:ngrid,1:nlay,1:nq) < 1.e-30 )
    316316     &     zq(1:ngrid,1:nlay,1:nq) = 1.e-30
     
    443443              dMh2o = 0.
    444444              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
    447448                 dNh2o    = dNh2o + n_aer_h2oice(i) * Probah2o
    448449                 dMh2o    = dMh2o + m_aer_h2oice(i) * Probah2o
     
    517518                 Ic_rice=0.
    518519                 flag_pourri=1
    519                  pdtcloudco2(ig,l)=-pdt(ig,l)
     520                 subpdtcloudco2(ig,l)=-sum_subpdt(ig,l)
    520521                 dMice=0
    521522                 
    522523              else
    523                  dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice*ptimestep
     524                 dMice=zq(ig,l,igcm_ccnco2_number)*Ic_rice*microtimestep
    524525     &                *tauscaling(ig) ! Kg par kg d'air, >0 si croissance !
    525526                 !kg.s-1 par particule * nb particule par kg air*s
     
    530531!facteurmax maximum quantity of CO2 that can sublime/condense according to available thermal energy
    531532! latent heat release       >0 if growth i.e. if dMice >0
    532               pdtcloudco2(ig,l)=dMice*lw/cpp/ptimestep
     533              subpdtcloudco2(ig,l)=dMice*lw/cpp/microtimestep
    533534! kgco2/kgair* J/kgco2 * 1/(J.kgair-1.K-1)/s= K par seconde
    534535              !Now update tracers
     
    588589
    589590          ! Get cloud tendencies
    590         pdqcloudco2(1:ngrid,1:nlay,igcm_co2) =
     591        subpdqcloudco2(1:ngrid,1:nlay,igcm_co2) =
    591592     &       (zq(1:ngrid,1:nlay,igcm_co2) -
    592      &       zq0(1:ngrid,1:nlay,igcm_co2))/ptimestep
    593         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) =
    594595     &       (zq(1:ngrid,1:nlay,igcm_co2_ice) -
    595      &       zq0(1:ngrid,1:nlay,igcm_co2_ice))/ptimestep
    596         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) =
    597598     &       (zq(1:ngrid,1:nlay,igcm_h2o_ice) -
    598      &       zq0(1:ngrid,1:nlay,igcm_h2o_ice))/ptimestep
    599         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) =
    600601     &       (zq(1:ngrid,1:nlay,igcm_ccn_mass) -
    601      &       zq0(1:ngrid,1:nlay,igcm_ccn_mass))/ptimestep
    602         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) =
    603604     &       (zq(1:ngrid,1:nlay,igcm_ccn_number) -
    604      &       zq0(1:ngrid,1:nlay,igcm_ccn_number))/ptimestep
    605         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) =
    606607     &       (zq(1:ngrid,1:nlay,igcm_ccnco2_mass) -
    607      &       zq0(1:ngrid,1:nlay,igcm_ccnco2_mass))/ptimestep
    608         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) =
    609610     &       (zq(1:ngrid,1:nlay,igcm_ccnco2_number) -
    610      &       zq0(1:ngrid,1:nlay,igcm_ccnco2_number))/ptimestep
    611         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) =
    612613     &       (zq(1:ngrid,1:nlay,igcm_dust_mass) -
    613      &       zq0(1:ngrid,1:nlay,igcm_dust_mass))/ptimestep
    614         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) =
    615616     &       (zq(1:ngrid,1:nlay,igcm_dust_number) -
    616      &       zq0(1:ngrid,1:nlay,igcm_dust_number))/ptimestep
     617     &       zq0(1:ngrid,1:nlay,igcm_dust_number))/microtimestep
    617618
    618619        end
Note: See TracChangeset for help on using the changeset viewer.