Ignore:
Timestamp:
May 12, 2020, 11:51:22 AM (5 years ago)
Author:
lrossi
Message:

Mars GCM:
Fixing some errors in vdifc_mod related to variable watercap. This variable was also integrated to the hdo cycle.
Also added watercap output for the 1D model.
LR

File:
1 edited

Legend:

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

    r2312 r2316  
    77      subroutine hdo_surfex(ngrid,nlay,nq,ptimestep,
    88     &                      zt,zq,pqsurf,
    9      &                      old_h2o_vap,pdqsdif,h2oflux,
     9     &                      old_h2o_vap,pdqsdif,dwatercap_dif,
    1010     &                      hdoflux)
    1111
     
    3737      REAL, INTENT(IN) :: old_h2o_vap(ngrid)     ! traceur d'eau avant
    3838                                           !traitement de l'eau (kg/kg)
     39      REAL, INTENT(IN) :: dwatercap_dif(ngrid)  ! trend related to permanent ice
    3940      REAL, INTENT(INOUT) :: pdqsdif(ngrid,nq)    ! tendance towards surface
    4041                                 !   (kg/kg.s-1)
    41       REAL, INTENT(IN) :: h2oflux(ngrid)       ! value of vapour flux of H2O
    42                                       ! same sign as pdqsdif
    4342
    4443c     Output:
     
    5150      REAL extrasublim ! sublimation in excess of surface ice
    5251      REAL tmpratio(ngrid)   ! D/H ratio in flux to surf
     52      REAL h2oflux(ngrid)       ! value of vapour flux of H2O
     53                                      ! same sign as pdqsdif
    5354
    5455      INTEGER ig,l
     
    6263
    6364        DO ig=1,ngrid
     65             
     66            h2oflux(ig) = pdqsdif(ig,igcm_h2o_ice) +
     67     &          dwatercap_dif(ig)
    6468
    6569            !! IF Sublimation
     
    8791     &           .gt.pqsurf(ig,igcm_h2o_ice)) then
    8892
    89 C               This is how much we sublimate in excess of
     93C               dwatercap_dif is how much we sublimate in excess of
    9094C               pqsurf for H2O                       
    91                   extrasublim=
    92      &              ( pqsurf(ig,igcm_h2o_ice) /ptimestep
    93      &                   +h2oflux(ig))
    94 c               extrasublim has same sign conv. as pdqsdif
    95  
    9695C               hdoflux(ig) is the flux of HDO from atm. to surf.
    9796c               The D/H of the old ice is supposed to be 5 SMOW
    9897c               We need D/H of the flux to be 5, so we need
    99 c               extrasublim* 5 * 2 * 155.76e-6 (=1 SMOW)
     98c               dwatercap_dif* 5 * 2 * 155.76e-6 (=1 SMOW)
    10099                    hdoflux(ig)= hdoflux(ig)
    101      &                       +(extrasublim*(2.*155.76e-6)*5.)
    102 !    &                       +extrasublim
    103 !                 hdoflux(ig) = h2oflux(ig) !test
    104               endif
    105                 endif ! watercap
     100     &                   +(dwatercap_dif(ig)*(2.*155.76e-6)*5.)
     101                endif
     102             endif ! watercap
    106103
    107104            else ! condensation
Note: See TracChangeset for help on using the changeset viewer.