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/surf_ice.F90

    r4174 r4180  
    1616! DEPENDENCIES
    1717! ------------
    18 use numerics, only: dp, qp, di, k4, minieps
     18use numerics, only: dp, qp, di, k4, eps, tol
    1919
    2020! DECLARATION
     
    3030integer(di),                              parameter :: WEIGHT_RESERVOIR = 5_di ! Weight by locally available H2O ice mass
    3131integer(di),                              parameter :: WEIGHT_DIRECTION = 6_di ! Weight by directional capacity (up/down)
    32 integer(di),                              private   :: weight_method = WEIGHT_DIRECTION ! Default method for balancing
     32integer(di),                              private   :: weight_method = WEIGHT_COMBINED ! Default method for balancing
    3333real(dp),                                 parameter :: rho_co2ice = 1650._dp ! Density of CO2 ice [kg.m-3]
    3434real(dp),                                 parameter :: rho_h2oice = 920._dp  ! Density of H2O ice [kg.m-3]
     
    420420! ---------------
    421421integer(di), parameter :: max_iter = 50_di ! Maximum number of iterations for the balancing procedure
    422 real(dp),    parameter :: eps = 1.e-12_dp ! Small number to prevent division by zero in weights normalization
    423 real(dp),    parameter :: tiny_corr = minieps ! Minimum correction to consider that progress is made in the balancing procedure
    424422integer(di)                              :: i, islope, iter
    425423integer(di)                              :: method_used
     
    556554    Delta = Delta - Delta_used
    557555
    558     if (abs(Delta_used) < tiny_corr) exit
     556    ! Test if the balancing procedure progresses
     557    if (abs(Delta_used) < tol) exit
    559558end do
    560559
Note: See TracChangeset for help on using the changeset viewer.