Ignore:
Timestamp:
Apr 10, 2026, 7:17:55 PM (6 hours ago)
Author:
jbclement
Message:

PEM:

  • Rework layering-related logic, especially clarify interactions between surface and subsurface water tendencies and disable CO2 lag resistance (inconsistent without updating pressure and mass balance + PCM).
  • Prevent simultaneous activation of layering and ice flows.
  • Add warning when flux_geo /= 0 while soil is disabled.
  • Add new utility function "is_lvl_enabled" for displaying.
  • Replace deprecated 'minieps' with 'eps'/'tol'.

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/sorption.F90

    r4174 r4180  
    1818! DEPENDENCIES
    1919! ------------
    20 use numerics, only: dp, qp, di, k4, minieps
     20use numerics, only: dp, qp, di, k4, eps
    2121
    2222! DECLARATION
     
    230230        deltam_reg_slope(ig,islope) = 0._dp
    231231        do iloop = 1,index_breccia
    232             if (TI(ig,iloop,islope) < inertie_thresold .and. abs(h2o_ice(ig,islope)) < minieps .and. abs(co2_ice(ig,islope)) < minieps) then
     232            if (TI(ig,iloop,islope) < inertie_thresold .and. abs(h2o_ice(ig,islope)) < eps .and. abs(co2_ice(ig,islope)) < eps) then
    233233                if (iloop == 1) then
    234234                    deltam_reg_complete(ig,iloop,islope) = (dm_h2o_regolith_slope(ig,iloop,islope) - h2o_ads_reg(ig,iloop,islope))*(layer(iloop))
     
    347347    do islope = 1,nslope
    348348        do iloop = 1,index_breccia
    349             if (TI(ig,iloop,islope) < inertie_thresold .and. abs(h2o_ice(ig,islope)) < minieps .and. abs(co2_ice(ig,islope)) < minieps) then
     349            if (TI(ig,iloop,islope) < inertie_thresold .and. abs(h2o_ice(ig,islope)) < eps .and. abs(co2_ice(ig,islope)) < eps) then
    350350                dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1._dp - theta_h2o_ads(ig,iloop,islope))*alpha*pco2_avg(ig)/ &
    351351                                                         (alpha*pco2_avg(ig) + sqrt(tsoil(ig,iloop,islope))*exp(beta/tsoil(ig,iloop,islope)))
    352352            else
    353                 if (abs(co2_ads_reg(ig,iloop,islope)) < minieps) then !!! we are at first call
     353                if (abs(co2_ads_reg(ig,iloop,islope)) < eps) then !!! we are at first call
    354354                    dm_co2_regolith_slope(ig,iloop,islope) = as*rho_regolith*m_theta*(1._dp - theta_h2o_ads(ig,iloop,islope))*alpha*pco2_avg(ig) &
    355355                                                             /(alpha*pco2_avg(ig)+sqrt(tsoil(ig,iloop,islope))*exp(beta/tsoil(ig,iloop,islope)))
     
    368368        deltam_reg_slope(ig,islope) = 0._dp
    369369        do iloop = 1,index_breccia
    370             if (TI(ig,iloop,islope) < inertie_thresold .and. abs(h2o_ice(ig,islope)) < minieps .and. abs(co2_ice(ig,islope)) < minieps) then
     370            if (TI(ig,iloop,islope) < inertie_thresold .and. abs(h2o_ice(ig,islope)) < eps .and. abs(co2_ice(ig,islope)) < eps) then
    371371                if (iloop == 1) then
    372372                    deltam_reg_complete(ig,iloop,islope) = (dm_co2_regolith_slope(ig,iloop,islope) - co2_ads_reg(ig,iloop,islope))*(layer(iloop))
Note: See TracChangeset for help on using the changeset viewer.