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

    r4170 r4180  
    1717! DEPENDENCIES
    1818! ------------
    19 use numerics, only: dp, di, k4, minieps
     19use numerics, only: dp, di, k4, eps
    2020
    2121! DECLARATION
     
    240240! DEPENDENCIES
    241241! ------------
    242 use stoppage,  only: stop_clean
    243 use soil,      only: do_soil, reg_thprop_dependp, flux_geo
    244 use sorption,  only: do_sorption
    245 use orbit,     only: evo_orbit
    246 use evolution, only: pem_ini_date
    247 use ice_table, only: icetable_equilibrium, icetable_dynamic
    248 use display,   only: print_msg, LVL_WRN
     242use stoppage,         only: stop_clean
     243use soil,             only: do_soil, reg_thprop_dependp, flux_geo
     244use sorption,         only: do_sorption
     245use orbit,            only: evo_orbit
     246use evolution,        only: pem_ini_date
     247use ice_table,        only: icetable_equilibrium, icetable_dynamic
     248use glaciers,         only: h2oice_flow, co2ice_flow
     249use layered_deposits, only: do_layering
     250use display,          only: print_msg, LVL_WRN
    249251
    250252! DECLARATION
     
    255257! ----
    256258! Warnings (possible incompatibilities)
    257 if (evo_orbit .and. abs(pem_ini_date) < minieps) call print_msg('''evo_orbit = .true.'' but the initial date of the PEM is set to 0!',LVL_WRN)
     259if (evo_orbit .and. abs(pem_ini_date) < eps) call print_msg('''evo_orbit = .true.'' but the initial date of the PEM is set to 0!',LVL_WRN)
     260if (abs(flux_geo) > eps .and. .not. do_soil) call print_msg('soil is not activated but flux_geo /= 0!',LVL_WRN)
    258261
    259262! Errors (true incompatibilities)
    260263if (.not. do_soil) then
    261264    if (icetable_equilibrium .or. icetable_dynamic) call stop_clean(__FILE__,__LINE__,'ice table must be used when do_soil = true!',1)
    262     if (abs(flux_geo) > minieps) call stop_clean(__FILE__,__LINE__,'soil is not activated but flux_geo /= 0!',1)
    263265    if (reg_thprop_dependp) call stop_clean(__FILE__,__LINE__,'regolith properties vary according to Ps only when soil = true!',1)
    264266    if (do_sorption) call stop_clean(__FILE__,__LINE__,'do_soil must be true when do_sorption = true!',1)
    265267end if
     268if (do_layering .and. h2oice_flow) call stop_clean(__FILE__,__LINE__,'layering and H2O ice flow cannot be activated at the same time!',1)
     269if (do_layering .and. co2ice_flow) call stop_clean(__FILE__,__LINE__,'layering and CO2 ice flow cannot be activated at the same time!',1)
    266270
    267271END SUBROUTINE check_config_incompatibility
     
    458462call print_msg('> Initializing soil parameters',LVL_NFO)
    459463volcapa = controle(35)
    460 if (abs(volcapa) < minieps) call stop_clean(__FILE__,__LINE__,'volcapa is 0 in "'//startfi_name//'"!',1)
     464if (abs(volcapa) < eps) call stop_clean(__FILE__,__LINE__,'volcapa is 0 in "'//startfi_name//'"!',1)
    461465
    462466! Initialize orbital data
Note: See TracChangeset for help on using the changeset viewer.