Ignore:
Timestamp:
Dec 11, 2025, 12:56:05 PM (5 weeks ago)
Author:
jbclement
Message:

PEM:
Massive structural refactor of the PEM codebase for improved readability, consistency and maintainability. The goal is to modernize, standardize and consolidate the code while removing legacy complexity. In detail, this change:

  • Performs large-scale cleanup removing unused code, obsolete routines, duplicated functionality and deprecated initialization logic;
  • Removes "*_mod" wrappers;
  • Replaces mixed naming conventions with clearer variable names, domain-based file/module names and purpose-based routine names;
  • Adds native reading/writing capabilities to the PEM removing the cumbersome dependency on Mars PCM subroutines;
  • Centralizes soil/ice/orbital/PEM configuration logic into dedicated modules;
  • Simplifies routines and updates calls/interfaces to match the new structure.

This refactor significantly clarifies the codebase and provides a cleaner foundation for forthcoming developments.
JBC

File:
1 moved

Legend:

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

    r3988 r3989  
    1 MODULE adsorption_mod
    2 
    3 implicit none
    4 
    5 logical                             :: adsorption_pem     ! True by default, to compute adsorption/desorption. Read in pem.def
     1MODULE sorption
     2
     3implicit none
     4
     5logical                             :: do_sorption       ! Flag to compute adsorption/desorption
    66real, allocatable, dimension(:,:,:) :: co2_adsorbed_phys ! co2 that is in the regolith [kg/m^2]
    77real, allocatable, dimension(:,:,:) :: h2o_adsorbed_phys ! h2o that is in the regolith [kg/m^2]
     
    8585!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    8686
    87 use comsoil_h_PEM,         only: layer_PEM, index_breccia
     87use soil,         only: layer_PEM, index_breccia
    8888use comslope_mod,          only: subslope_dist, def_slope_mean
    8989use vertical_layers_mod,   only: ap, bp
     
    218218SUBROUTINE regolith_co2adsorption(ngrid,nslope,nsoil_PEM,timelen,d_h2oglaciers,d_co2glaciers,waterice,co2ice,ps,q_co2,q_h2o,tsoil_PEM,TI_PEM,m_co2_completesoil,delta_mreg)
    219219
    220 use comsoil_h_PEM,         only: layer_PEM, index_breccia, index_breccia
     220use soil,                  only: layer_PEM, index_breccia, index_breccia
    221221use comslope_mod,          only: subslope_dist, def_slope_mean
    222222use vertical_layers_mod,   only: ap, bp
     
    349349END SUBROUTINE regolith_co2adsorption
    350350
    351 END MODULE adsorption_mod
    352 
     351END MODULE sorption
Note: See TracChangeset for help on using the changeset viewer.