Ignore:
Timestamp:
Dec 16, 2025, 4:39:24 PM (2 months ago)
Author:
jbclement
Message:

PEM:
Apply documentation template everywhere: standardized headers format with short description, separators between functions/subroutines, normalized code sections, aligned dependencies/arguments/variables declaration.
JBC

File:
1 edited

Legend:

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

    r3989 r3991  
    11MODULE soil_thermal_inertia
    2 
     2!-----------------------------------------------------------------------
     3! NAME
     4!     soil_thermal_inertia
     5!
     6! DESCRIPTION
     7!     Compute and update soil thermal properties based on ice content,
     8!     pressure, and cementation state.
     9!
     10! AUTHORS & DATE
     11!     L. Lange, 2023
     12!     JB Clement, 2025
     13!
     14! NOTES
     15!
     16!-----------------------------------------------------------------------
     17
     18! DECLARATION
     19! -----------
    320implicit none
    421
    5 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    6 !!!
    7 !!! Purpose: Compute the soil thermal properties
    8 !!! Author:  LL, 04/2023
    9 !!!
    10 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    11 
    12 ! Constants:
     22! MODULE PARAMETERS
     23! -----------------
    1324real, parameter :: reg_inertie_thresold = 370. ! Above this thermal inertia, the regolith has too much cementation to be dependant on the pressure [J/m^2/K/s^1/2]
    1425real, parameter :: reg_inertie_minvalue = 50.  ! Minimum value of the Thermal Inertia at low pressure (Piqueux & Christensen 2009) [J/m^2/K/s^1/2]
     
    1930real, parameter :: Pa2Torr = 1./133.3          ! Conversion from Pa to tor [Pa/Torr]
    2031
    21 !=======================================================================
    2232contains
    23 !=======================================================================
    24 
     33!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
     34
     35!=======================================================================
    2536SUBROUTINE get_ice_TI(ispureice,pore_filling,surf_thermalinertia,ice_thermalinertia)
    26 !=======================================================================
    27 !   subject: Compute ice thermal properties
    28 !   --------
    29 !
    30 !   author: LL, 04/2023
    31 !   -------
    32 !
    33 !=======================================================================
    34 
     37!-----------------------------------------------------------------------
     38! NAME
     39!     get_ice_TI
     40!
     41! DESCRIPTION
     42!     Compute ice thermal properties based on pore filling and purity.
     43!
     44! AUTHORS & DATE
     45!     L. Lange, 2023
     46!     JB Clement, 2025
     47!
     48! NOTES
     49!     Uses Siegler et al. (2012) formula for pore-filling ice;
     50!     uses Mellon et al. (2004) value for pure water ice.
     51!-----------------------------------------------------------------------
     52
     53! DEPENDENCIES
     54! ------------
    3555use constants_marspem_mod, only: porosity
    3656
     57! DECLARATION
     58! -----------
    3759implicit none
    3860
    39 !-----------------------------------------------------------------------
    40 !=======================================================================
    41 !    Declarations :
    42 !=======================================================================
    43 !
    44 !    Input/Output
    45 !    ------------
    46 logical, intent(in) :: ispureice           ! Boolean to check if ice is massive or just pore filling
    47 real,    intent(in) :: pore_filling        ! ice pore filling in each layer (1)
    48 real,    intent(in) :: surf_thermalinertia ! surface thermal inertia (J/m^2/K/s^1/2)
    49 real,    intent(out) :: ice_thermalinertia ! Thermal inertia of ice when present in the pore (J/m^2/K/s^1/2)
    50 
    51 !    Local Variables
    52 !    --------------
    53 REAL :: inertie_purewaterice = 2100 ! 2050 is better according to my computations with the formula from Siegler et al., 2012, but let's follow Mellon et al. (2004)
    54 !=======================================================================
    55 !   Beginning of the code
    56 !=======================================================================
    57 
     61! ARGUMENTS
     62! ---------
     63logical, intent(in)  :: ispureice           ! Boolean to check if ice is massive or just pore filling
     64real,    intent(in)  :: pore_filling        ! ice pore filling in each layer (1)
     65real,    intent(in)  :: surf_thermalinertia ! surface thermal inertia (J/m^2/K/s^1/2)
     66real,    intent(out) :: ice_thermalinertia  ! Thermal inertia of ice when present in the pore (J/m^2/K/s^1/2)
     67
     68! LOCAL VARIABLES
     69! ---------------
     70real :: inertie_purewaterice = 2100 ! 2050 is better according to my computations with the formula from Siegler et al., 2012, but let's follow Mellon et al. (2004)
     71
     72! CODE
     73! ----
    5874if (ispureice) then
    5975    ice_thermalinertia = inertie_purewaterice
     
    6581!=======================================================================
    6682
     83!=======================================================================
    6784SUBROUTINE update_soil_TI(ngrid,nslope,nsoil,tendencies_waterice,waterice,p_avg_new,icetable_depth,icetable_thickness,ice_porefilling,icetable_equilibrium,icetable_dynamic,TI_PEM)
    68 
     85!-----------------------------------------------------------------------
     86! NAME
     87!     update_soil_TI
     88!
     89! DESCRIPTION
     90!     Update soil thermal inertia based on ice table, regolith properties,
     91!     and pressure-dependent cementation.
     92!
     93! AUTHORS & DATE
     94!     L. Lange, 2023
     95!     JB Clement, 2025
     96!
     97! NOTES
     98!
     99!-----------------------------------------------------------------------
     100
     101! DEPENDENCIES
     102! ------------
    69103use comsoil_h,             only: volcapa
    70104use soil,                  only: layer_PEM, inertiedat_PEM, depth_breccia, depth_bedrock, index_breccia, index_bedrock, reg_thprop_dependp
    71105use constants_marspem_mod, only: TI_breccia, TI_bedrock, TI_regolith_avg
    72106
     107! DECLARATION
     108! -----------
    73109implicit none
    74110
    75 ! Input:
    76 integer,                             intent(in) :: ngrid, nslope, nsoil ! Shape of the arrays: physical grid, number of sub-grid slopes, number of layer in the soil
    77 real,                                intent(in) :: p_avg_new            ! Global average surface pressure [Pa]
    78 real, dimension(ngrid,nslope),       intent(in) :: tendencies_waterice  ! Tendencies on the water ice [kg/m^2/year]
    79 real, dimension(ngrid,nslope),       intent(in) :: waterice             ! Surface Water ice [kg/m^2]
    80 real, dimension(ngrid,nslope),       intent(in) :: icetable_depth       ! Ice table depth [m]
    81 real, dimension(ngrid,nslope),       intent(in) :: icetable_thickness   ! Ice table thickness [m]
    82 real, dimension(ngrid,nsoil,nslope), intent(in) :: ice_porefilling      ! Ice porefilling [m^3/m^3]
    83 logical,                             intent(in) :: icetable_equilibrium, icetable_dynamic ! Computing method for ice table
    84 
    85 ! Outputs:
    86 real, dimension(ngrid,nsoil,nslope), intent(inout) :: TI_PEM ! Soil Thermal Inertia [J/m^2/K/s^1/2]
    87 
    88 ! Local variables:
    89 integer :: ig, islope, isoil, iref, iend          ! Loop variables
    90 real, dimension(ngrid,nslope) :: regolith_inertia ! Thermal inertia of the regolith (first layer in the GCM) [J/m^2/K/s^1/2]
    91 real    :: delta                                  ! Difference of depth to compute the  thermal inertia in a mixed layer [m]
    92 real    :: ice_bottom_depth                       ! Bottom depth of the subsurface ice [m]
    93 real    :: d_part                                 ! Regolith particle size [micrometer]
    94 real    :: ice_inertia                            ! Inertia of water ice [SI]
    95 
     111! ARGUMENTS
     112! ---------
     113integer,                             intent(in)    :: ngrid, nslope, nsoil ! Shape of the arrays: physical grid, number of sub-grid slopes, number of layer in the soil
     114real,                                intent(in)    :: p_avg_new            ! Global average surface pressure [Pa]
     115real, dimension(ngrid,nslope),       intent(in)    :: tendencies_waterice  ! Tendencies on the water ice [kg/m^2/year]
     116real, dimension(ngrid,nslope),       intent(in)    :: waterice             ! Surface Water ice [kg/m^2]
     117real, dimension(ngrid,nslope),       intent(in)    :: icetable_depth       ! Ice table depth [m]
     118real, dimension(ngrid,nslope),       intent(in)    :: icetable_thickness   ! Ice table thickness [m]
     119real, dimension(ngrid,nsoil,nslope), intent(in)    :: ice_porefilling      ! Ice porefilling [m^3/m^3]
     120logical,                             intent(in)    :: icetable_equilibrium, icetable_dynamic ! Computing method for ice table
     121real, dimension(ngrid,nsoil,nslope), intent(inout) :: TI_PEM               ! Soil Thermal Inertia [J/m^2/K/s^1/2]
     122
     123! LOCAL VARIABLES
     124! ---------------
     125integer                       :: ig, islope, isoil, iref, iend ! Loop variables
     126real, dimension(ngrid,nslope) :: regolith_inertia              ! Thermal inertia of the regolith (first layer in the GCM) [J/m^2/K/s^1/2]
     127real                          :: delta                         ! Difference of depth to compute the  thermal inertia in a mixed layer [m]
     128real                          :: ice_bottom_depth              ! Bottom depth of the subsurface ice [m]
     129real                          :: d_part                        ! Regolith particle size [micrometer]
     130real                          :: ice_inertia                   ! Inertia of water ice [SI]
     131
     132! CODE
     133! ----
    96134write(*,*) "> Updating soil properties"
    97135
     
    222260
    223261END SUBROUTINE update_soil_TI
     262!=======================================================================
    224263
    225264END MODULE soil_thermal_inertia
Note: See TracChangeset for help on using the changeset viewer.