Ignore:
Timestamp:
May 6, 2020, 4:46:33 PM (5 years ago)
Author:
lrossi
Message:

MARS GCM:
Implementation of HDO in the physics
New tracers hdo_vap and hdo_ice are added. Cf. traceur.def.isotopes in deftank for exemple of traceur.def.
All HDO related computations are activated by flag hdo=.true. in callphys.def. (see callphys.def.hdo in deftank for an example)
Additional option hdofrac (true by default) allows for turning on/off fractionation (for tests).
For now, only functional with simplified cloud scheme (so microphys=.false. and activice=.false. also recommended).
Initialisation of start files can be done with option 'inihdo' in newstart.
LR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/watercloud_mod.F

    r2311 r2312  
    1919      USE watersat_mod, ONLY: watersat
    2020      use tracer_mod, only: nqmx, igcm_h2o_vap, igcm_h2o_ice,
     21     &                      igcm_hdo_vap, igcm_hdo_ice,
    2122     &                      igcm_dust_mass, igcm_dust_number,
    2223     &                      igcm_ccn_mass, igcm_ccn_number,
     
    124125      REAL :: mincloud ! min cloud frac
    125126      LOGICAL, save :: flagcloud=.true.
     127
    126128c    ** un petit test de coherence
    127129c       --------------------------
     
    312314     &          sum_subpdq(ig,l,igcm_h2o_vap)
    313315     &        + pdq(ig,l,igcm_h2o_vap)
     316            IF (hdo) THEN
     317            sum_subpdq(ig,l,igcm_hdo_ice) =
     318     &          sum_subpdq(ig,l,igcm_hdo_ice)
     319     &        + pdq(ig,l,igcm_hdo_ice)
     320            sum_subpdq(ig,l,igcm_hdo_vap) =
     321     &          sum_subpdq(ig,l,igcm_hdo_vap)
     322     &        + pdq(ig,l,igcm_hdo_vap)
     323            ENDIF !hdo
    314324          ENDDO
    315325        ENDDO     
     
    361371     &          sum_subpdq(ig,l,igcm_h2o_vap)
    362372     &        + subpdqcloud(ig,l,igcm_h2o_vap)
     373
     374            IF (hdo) THEN
     375            sum_subpdq(ig,l,igcm_hdo_ice) =
     376     &          sum_subpdq(ig,l,igcm_hdo_ice)
     377     &        + subpdqcloud(ig,l,igcm_hdo_ice)
     378            sum_subpdq(ig,l,igcm_hdo_vap) =
     379     &          sum_subpdq(ig,l,igcm_hdo_vap)
     380     &        + subpdqcloud(ig,l,igcm_hdo_vap)
     381            ENDIF ! hdo
     382
    363383          ENDDO
    364384        ENDDO
     
    397417     &        sum_subpdq(ig,l,igcm_h2o_vap)/real(imicro)
    398418     &       - pdq(ig,l,igcm_h2o_vap)
     419            IF (hdo) THEN
     420            pdqcloud(ig,l,igcm_hdo_ice) =
     421     &        sum_subpdq(ig,l,igcm_hdo_ice)/real(imicro)
     422     &       - pdq(ig,l,igcm_hdo_ice)
     423            pdqcloud(ig,l,igcm_hdo_vap) =
     424     &        sum_subpdq(ig,l,igcm_hdo_vap)/real(imicro)
     425     &       - pdq(ig,l,igcm_hdo_vap)
     426            ENDIF !hdo
    399427         ENDDO
    400428       ENDDO
     
    478506        DO l=1,nlay
    479507         DO ig=1,ngrid
     508
    480509          IF (pq(ig,l,igcm_h2o_ice) + ptimestep*
    481510     &       (pdq(ig,l,igcm_h2o_ice) + pdqcloud(ig,l,igcm_h2o_ice))
     
    484513     &     - pq(ig,l,igcm_h2o_ice)/ptimestep - pdq(ig,l,igcm_h2o_ice)
    485514           pdqcloud(ig,l,igcm_h2o_vap) = -pdqcloud(ig,l,igcm_h2o_ice)
     515             if (hdo) then
     516           pdqcloud(ig,l,igcm_hdo_ice) =
     517     &     - pq(ig,l,igcm_hdo_ice)/ptimestep - pdq(ig,l,igcm_hdo_ice)
     518           pdqcloud(ig,l,igcm_hdo_vap) = -pdqcloud(ig,l,igcm_hdo_ice)
     519             endif
    486520          ENDIF
    487521          IF (pq(ig,l,igcm_h2o_vap) + ptimestep*
     
    491525     &     - pq(ig,l,igcm_h2o_vap)/ptimestep - pdq(ig,l,igcm_h2o_vap)
    492526           pdqcloud(ig,l,igcm_h2o_ice) = -pdqcloud(ig,l,igcm_h2o_vap)
     527             if (hdo) then
     528           pdqcloud(ig,l,igcm_hdo_vap) =
     529     &     - pq(ig,l,igcm_hdo_vap)/ptimestep - pdq(ig,l,igcm_hdo_vap)
     530           pdqcloud(ig,l,igcm_hdo_ice) = -pdqcloud(ig,l,igcm_hdo_vap)
     531             endif
    493532          ENDIF
    494          ENDDO
    495         ENDDO
    496 
     533
     534         ENDDO
     535        ENDDO
    497536
    498537c------Update the ice and dust particle size "rice" for output or photochemistry
     
    627666     &      ,"kg/kg.s-1",3,pdqcloud(1:ngrid,1:nlay,
    628667     &      igcm_h2o_vap))
     668      if (hdo) then
     669      call WRITEDIAGFI(ngrid,"pdqiceD","pdqiceD apres microphysique"
     670     &      ,"kg/kg.s-1",3,pdqcloud(1:ngrid,1:nlay,igcm_hdo_ice))
     671      call WRITEDIAGFI(ngrid,"pdqvapD","pdqvapD apres microphysique"
     672     &      ,"kg/kg.s-1",3,pdqcloud(1:ngrid,1:nlay,
     673     &      igcm_hdo_vap))
     674      endif
    629675      call WRITEDIAGFI(ngrid,"pdqccn2","pdqcloudccn apres microphysique"
    630676     &      ,"kg/kg.s-1",3,pdqcloud(1:ngrid,1:nlay,
Note: See TracChangeset for help on using the changeset viewer.