Changeset 3230


Ignore:
Timestamp:
Feb 20, 2024, 10:14:22 PM (10 months ago)
Author:
llange
Message:

Mars PCM

  • Move soil_tifeedback into a module waterice_tifeedback_mod.F90
  • The flag to call tifeedback has been changed from "tifeedback" to surfaceice_tifeedback for clarity
  • Add the possibility to change the thermal inertia while pore ices is forming in the soil: to do so, use the flag poreice_tifeedback. The computation is done in waterice_tifeedback_mod.F90.

For now, surfaceice_tifeedback and poreice_tifeedback can not be called together, we might think about how to merge later.
LL

Location:
trunk/LMDZ.MARS
Files:
1 added
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3225 r3230  
    45114511Remove interactive checking with XIOS whether a field should be sent to it;
    45124512some yet unresolved issues arise when using this in mixed MPI-OpenMP mode...
     4513
     4514== 20/02/2024 == LL
     4515* Move soil_tifeedback into a module waterice_tifeedback_mod.F90
     4516* The flag to call tifeedback has been changed from "tifeedback" to surfaceice_tifeedback for clarity
     4517* Add the possibility to change the thermal inertia while pore ices is forming in the soil: to do so, use the flag poreice_tifeedback. The computation is done i
     4518n waterice_tifeedback_mod.F90.
     4519For now, surfaceice_tifeedback and poreice_tifeedback can not be called together
     4520, we might think about how to merge later.
  • trunk/LMDZ.MARS/libf/phymars/callkeys.h

    r3167 r3230  
    1212     &   ,callg2d,linear,rayleigh                                       &
    1313     &   ,scavenging,sedimentation                                      &
    14      &   ,activice,water,tifeedback,microphys,supersat,caps,photochem   &
     14     &   ,activice,water,microphys,supersat,caps,photochem              &
    1515     &   ,calltherm,callrichsl,callslope,tituscap,callyamada4,co2clouds &
    1616     &   ,co2useh2o,meteo_flux,activeco2ice,CLFvaryingCO2,spantCO2      &
     
    1818     &   ,latentheat_surfwater,gwd_convective_source,startphy_file      &
    1919     &   ,hdo,hdofrac,cst_cap_albedo,temp_dependent_m,refill_watercap   &
    20      &   ,cloud_adapt_ts, callatke
     20     &   ,cloud_adapt_ts,callatke,surfaceice_tifeedback                 &
     21     &   , poreice_tifeedback
    2122!$OMP THREADPRIVATE(/callkeys_l/)
    2223
     
    7980      logical cloud_adapt_ts ! adaptative timestep for cloud microphysics
    8081      logical sedimentation
    81       logical activice,tifeedback,supersat,caps
     82      logical activice,surfaceice_tifeedback,supersat,caps
     83      logical poreice_tifeedback
    8284      logical co2clouds,co2useh2o,meteo_flux,CLFvaryingCO2,satindexco2
    8385      logical activeco2ice
  • trunk/LMDZ.MARS/libf/phymars/comsoil_h.F90

    r3183 r3230  
    3030
    3131! Subsurface tracers:
    32 logical, save                                  :: adsorption_soil ! boolean to call adosrption (or not)
    33 real,    save                                  :: choice_ads      ! Choice for adsorption isotherm (3 means no adsorption, see soilwater.F90)
    34 real,    save, allocatable, dimension(:,:,:,:) :: qsoil           ! subsurface tracers (kg/m^3 of regol)
    35 integer, parameter :: nqsoil = 3                                  ! number of subsurface tracers, only three when working with water
     32logical, save                                  :: adsorption_soil      ! boolean to call adosrption (or not)
     33real,    save                                  :: choice_ads           ! Choice for adsorption isotherm (3 means no adsorption, see soilwater.F90)
     34real,    save, allocatable, dimension(:,:,:,:) :: qsoil                ! subsurface tracers (kg/m^3 of regol)
     35integer, parameter :: nqsoil = 3                                       ! number of subsurface tracers, only three when working with water
    3636integer, parameter :: igcm_h2o_vap_soil = 1
    3737integer, parameter :: igcm_h2o_ice_soil = 2
    3838integer, parameter :: igcm_h2o_vap_ads  = 3
    39 
     39REAL, parameter :: porosity_reg  = 0.45
    4040!$OMP THREADPRIVATE(adsorption_soil,qsoil,choice_ads)
    4141
  • trunk/LMDZ.MARS/libf/phymars/conf_phys.F

    r3167 r3230  
    683683! thermal inertia feedback
    684684         write(*,*) "Activate the thermal inertia feedback ?"
    685          tifeedback=.false. ! default value
    686          call getin_p("tifeedback",tifeedback)
    687          write(*,*) " tifeedback = ",tifeedback
     685         surfaceice_tifeedback=.false. ! default value
     686         call getin_p("surfaceice_tifeedback",surfaceice_tifeedback)
     687         write(*,*) " surfaceice_tifeedback = ",surfaceice_tifeedback
    688688
    689689! Test of incompatibility:
    690690
    691          if (tifeedback.and..not.water) then
    692            print*,'if tifeedback is used,'
     691         if (surfaceice_tifeedback.and..not.water) then
     692           print*,'if surfaceice_tifeedback is used,'
    693693           print*,'water should be used too'
    694694           call abort_physic(modname,
    695      &          "tifeedback requires water",1)
    696          endif
    697 
    698          if (tifeedback.and..not.callsoil) then
    699            print*,'if tifeedback is used,'
     695     &          "surfaceice_tifeedback requires water",1)
     696         endif
     697
     698         if (surfaceice_tifeedback.and..not.callsoil) then
     699           print*,'if surfaceice_tifeedback is used,'
    700700           print*,'callsoil should be used too'
    701701           call abort_physic(modname,
    702      &          "tifeedback requires callsoil",1)
     702     &          "surfaceice_tifeedback requires callsoil",1)
    703703         endif
    704704
     
    10411041         if (adsorption_soil) choice_ads = 1
    10421042         call getin_p("choice_ads",choice_ads)
    1043            
     1043         
     1044         poreice_tifeedback = .false.
     1045         call getin_p("poreice_tifeedback",poreice_tifeedback)
     1046         write(*,*) 'poreice_tifeedback=',poreice_tifeedback
     1047         if (poreice_tifeedback .and. (.not. adsorption_soil)) then
     1048              write(*,*)"Pore ice TI feedback can be run only if
     1049     &                   adsorption_soil = True"
     1050              call abort_physic(modname,
     1051     &        "Pore ice TI feedback be used with adsorption_soil
     1052     &         = true",1)
     1053         endif
    10441054c        ----------------------------------------------------------
    10451055
  • trunk/LMDZ.MARS/libf/phymars/physiq_mod.F

    r3219 r3230  
    123123      use pbl_parameters_mod, only: pbl_parameters
    124124      use lmdz_atke_turbulence_ini, only : atke_ini
     125      use waterice_tifeedback_mod, only : waterice_tifeedback
    125126      IMPLICIT NONE
    126127c=======================================================================
     
    282283      REAL inertiesoil_tifeedback(ngrid,nsoilmx,nslope) ! Time varying subsurface
    283284                                      ! thermal inertia (J.s-1/2.m-2.K-1)
    284                                       ! (used only when tifeedback=.true.)
     285                                      ! (used only when tifeedback surface or pore =.true.)
    285286c     Variables used by the CO2 clouds microphysical scheme:
    286287      DOUBLE PRECISION riceco2(ngrid,nlayer)   ! co2 ice geometric mean radius (m)
     
    540541
    541542! Variable for ice table
    542       REAL :: rhowater_surf(ngrid,nslope)         ! Water density at the surface [kg/m^3]
    543       REAL :: rhowater_surf_sat(ngrid,nslope)     ! Water density at the surface at saturation [kg/m^3]
    544       REAL :: rhowater_soil(ngrid,nsoilmx,nslope) ! Water density in soil layers [kg/m^3]
    545       REAL,PARAMETER :: alpha_clap_h2o = 28.9074  ! Coeff for Clapeyron law [/]
    546       REAL,PARAMETER :: beta_clap_h2o = -6143.7   ! Coeff for Clapeyron law [K]
    547       REAL :: pvap_surf(ngrid)                    ! Water vapor partial pressure in first layer [Pa]
    548       REAL,PARAMETER :: m_co2 = 44.01E-3          ! CO2 molecular mass [kg/mol]
    549       REAL,PARAMETER :: m_noco2 = 33.37E-3        ! Non condensible mol mass [kg/mol]
    550       REAL :: ztmp1,ztmp2                         ! intermediate variables to compute the mean molar mass of the layer
    551 
     543      REAL :: rhowater_surf(ngrid,nslope)            ! Water density at the surface [kg/m^3]
     544      REAL :: rhowater_surf_sat(ngrid,nslope)        ! Water density at the surface at saturation [kg/m^3]
     545      REAL :: rhowater_soil(ngrid,nsoilmx,nslope)    ! Water density in soil layers [kg/m^3]
     546      REAL,PARAMETER :: alpha_clap_h2o = 28.9074     ! Coeff for Clapeyron law [/]
     547      REAL,PARAMETER :: beta_clap_h2o = -6143.7      ! Coeff for Clapeyron law [K]
     548      REAL :: pvap_surf(ngrid)                       ! Water vapor partial pressure in first layer [Pa]
     549      REAL,PARAMETER :: m_co2 = 44.01E-3             ! CO2 molecular mass [kg/mol]
     550      REAL,PARAMETER :: m_noco2 = 33.37E-3           ! Non condensible mol mass [kg/mol]
     551      REAL :: ztmp1,ztmp2                            ! intermediate variables to compute the mean molar mass of the layer
     552      REAL :: pore_icefraction(ngrid,nsoilmx,nslope) ! ice filling fraction in the pores
    552553! Variable for the computation of the TKE with parameterization from ATKE working group
    553554      REAL :: viscom                              ! kinematic molecular viscosity for momentum
     
    694695         IF (callsoil) THEN
    695696c           Thermal inertia feedback:
    696             IF (tifeedback) THEN
     697            IF (surfaceice_tifeedback.or.poreice_tifeedback) THEN
    697698             DO islope = 1,nslope
    698                 CALL soil_tifeedback(ngrid,nsoilmx,
    699      s               qsurf(:,:,islope),
    700      s               inertiesoil_tifeedback(:,:,islope))
     699                CALL waterice_tifeedback(ngrid,nsoilmx,nslope,
     700     s               qsurf(:,igcm_h2o_ice,:),pore_icefraction,
     701     s               inertiesoil_tifeedback)
    701702             ENDDO
    702703                CALL soil(ngrid,nsoilmx,firstcall,
     
    14981499c        Calling vdif (Martian version WITH CO2 condensation)
    14991500         dwatercap_dif(:,:) = 0.
    1500 
    15011501         CALL vdifc(ngrid,nlayer,nsoilmx,nq,nqsoil,zpopsk,
    15021502     $        ptimestep,capcal,lwrite,
    15031503     $        zplay,zplev,zzlay,zzlev,z0,
    1504      $        pu,pv,zh,pq,tsurf,tsoil,emis,qsurf,qsoil,
     1504     $        pu,pv,zh,pq,tsurf,tsoil,emis,qsurf,
     1505     $        qsoil,pore_icefraction,
    15051506     $        zdum1,zdum2,zdh,pdq,zflubid,
    15061507     $        zdudif,zdvdif,zdhdif,zdtsdif,q2,
     
    23852386      IF (callsoil) THEN
    23862387c       Thermal inertia feedback
    2387         IF (tifeedback) THEN
    2388          DO islope = 1,nslope
    2389            CALL soil_tifeedback(ngrid,nsoilmx,
    2390      s               qsurf(:,:,islope),
    2391      s               inertiesoil_tifeedback(:,:,islope))
    2392          ENDDO
     2388        IF (surfaceice_tifeedback.or.poreice_tifeedback) THEN
     2389       
     2390           CALL waterice_tifeedback(ngrid,nsoilmx,nslope,
     2391     s               qsurf(:,igcm_h2o_ice,:),pore_icefraction,
     2392     s               inertiesoil_tifeedback(:,:,:))
     2393     
    23932394         CALL soil(ngrid,nsoilmx,.false.,inertiesoil_tifeedback,
    23942395     s          ptimestep,tsurf,tsoil,capcal,fluxgrd)
     
    35513552     &                         '',albedo(:,1,islope))
    35523553         ENDDO
    3553               if (tifeedback) then
     3554              if (surfaceice_tifeedback.or.poreice_tifeedback) then
    35543555                 call write_output("soiltemp",
    35553556     &                              "Soil temperature","K",
     
    35583559     &                       'Soil Thermal Inertia',
    35593560     &         'J.s-1/2.m-2.K-1',inertiesoil_tifeedback(:,:,iflat))
     3561
    35603562         do islope=1,nslope
    35613563          write(str2(1:2),'(i2.2)') islope
  • trunk/LMDZ.MARS/libf/phymars/soil.F

    r2919 r3230  
    4141
    4242! 0. Initialisations and preprocessing step
    43       if (firstcall.or.tifeedback) then
     43      if(firstcall.or.surfaceice_tifeedback.or.poreice_tifeedback) then
    4444      ! note: firstcall is set to .true. or .false. by the caller
    4545      !       and not changed by soil.F
  • trunk/LMDZ.MARS/libf/phymars/soilwater.F90

    r3223 r3230  
    11subroutine soilwater(ngrid, nlayer, nq, nsoil, nqsoil, ptsrf, ptsoil, ptimestep,  &
    22      exchange, qsat_surf, pq, pa, pb, pc, pd, pdqsdifpot, pqsurf,  &
    3       pqsoil, pplev, rhoatmo, writeoutput, zdqsdifrego, zq1temp2)
    4 
    5 
    6       use comsoil_h, only: igcm_h2o_vap_soil, igcm_h2o_ice_soil, igcm_h2o_vap_ads, layer, mlayer, choice_ads
     3      pqsoil, pplev, rhoatmo, writeoutput, zdqsdifrego, zq1temp2, saturation_water_ice)
     4
     5
     6      use comsoil_h, only: igcm_h2o_vap_soil, igcm_h2o_ice_soil, igcm_h2o_vap_ads, layer, mlayer, choice_ads, porosity_reg
    77      use comcstfi_h
    88      use tracer_mod
     
    9292! Outputs :
    9393! ----------------------------------------------------------------------
    94 real, intent(out) :: zdqsdifrego(ngrid)         ! Flux from subsurface (positive pointing outwards)
    95 real, intent(out) :: zq1temp2(ngrid)            ! Temporary atmospheric mixing ratio after exchange with subsurface (kg / kg)
     94real, intent(out) :: zdqsdifrego(ngrid)                     ! Flux from subsurface (positive pointing outwards)
     95real, intent(out) :: zq1temp2(ngrid)                        ! Temporary atmospheric mixing ratio after exchange with subsurface (kg / kg)
     96real*8, intent(out) :: saturation_water_ice(ngrid, nsoil)   ! Water pore ice saturation level (formerly Sw)
    9697
    9798! Outputs for the output files
     
    162163real*8, allocatable, save :: tortuosity(:, :)         ! Tortuosity factor (formerly tortuo)
    163164
    164 real*8 :: saturation_water_ice(ngrid, nsoil)          ! Water pore ice saturation level (formerly Sw)
    165165real*8 :: saturation_water_ice_inter(ngrid, nsoil)          ! Water pore ice saturation level at the interlayer
    166166
     
    346346                       
    347347                        ! These properties are defined here in order to enable custom profiles
    348                         porosity_ice_free(ig, ik) = 0.45D0
     348                        porosity_ice_free(ig, ik) = porosity_reg
    349349                        tortuosity(ig, ik) = 1.5D0
    350350                        rho_soil(ig, ik) = 1.3D3 ! in kg/m3 of regolith (incl. porosity)
  • trunk/LMDZ.MARS/libf/phymars/vdifc_mod.F

    r3203 r3230  
    99     $                pplay,pplev,pzlay,pzlev,pz0,
    1010     $                pu,pv,ph,pq,ptsrf,ptsoil,pemis,pqsurf,qsoil,
    11      $                pdufi,pdvfi,pdhfi,pdqfi,pfluxsrf,
     11     $                pore_icefraction,pdufi,pdvfi,pdhfi,
     12     $                pdqfi,pfluxsrf,
    1213     $                pdudif,pdvdif,pdhdif,pdtsrf,pq2,
    1314     $                pdqdif,pdqsdif,wstar,
     
    239240      REAL zdqsdif_tot(ngrid)         ! subtimestep pdqsdif for water ice
    240241      LOGICAL :: writeoutput          ! boolean to say to soilexchange.F if we are at the last iteration and thus if he  can write in the diagsoil
    241      
     242      REAL, INTENT(out) :: pore_icefraction(ngrid,nsoil,nslope) ! ice filling fraction in the pores
    242243!! Water buyoncy
    243244      LOGICAL :: virtual
     
    307308      h2o_ice_depth(1:ngrid,1:nslope)=1
    308309      virtual = .false.
    309      
     310      pore_icefraction(:,:,:) = 0.
    310311c    ** calcul de rho*dz et dt*rho/dz=dt*rho**2 g/dp
    311312c       avec rho=p/RT=p/ (R Theta) (p/ps)**kappa
     
    10841085     &                     qsoil(ig,:,:,islope), pplev(ig,1), rho(ig),
    10851086     &                     writeoutput,zdqsdif_regolith(ig,islope),
    1086      &                     zq1temp_regolith(ig))
     1087     &                     zq1temp_regolith(ig),
     1088     &                     pore_icefraction(ig,:,islope))
    10871089
    10881090
Note: See TracChangeset for help on using the changeset viewer.