Ignore:
Timestamp:
Dec 16, 2025, 4:39:24 PM (5 weeks 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/subsurface_ice.F90

    r3989 r3991  
    11MODULE subsurface_ice
    2 
    3 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    4 !!!
    5 !!! Purpose:  Retreat and growth of subsurface ice on Mars
    6 !!!           orbital elements remain constant
    7 !!!
    8 !!!
    9 !!! Author: EV, updated NS MSIM dynamical program for the PEM
    10 !!!         Taken from Norbert Schorgofer's code
    11 !!!
    12 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    13 
    14 implicit none
    15 
    16   ! parameters for thermal model
    17   ! they are only used in the subroutines below
    18   real(8), parameter :: dt = 0.02  ! in units of Mars solar days
    19   !real(8), parameter :: Fgeotherm = 0.
    20   real(8), parameter :: Fgeotherm = 0 !0.028  ! [W/m^2]
    21   real(8), parameter :: Lco2frost=6.0e5, co2albedo=0.60, co2emiss=1.
    22   real(8), parameter :: emiss0 = 1.  ! emissivity of dry surface
    23   integer, parameter :: EQUILTIME =15 ! [Mars years]
    24 
    25   integer, parameter :: NMAX = 1000
     2!-----------------------------------------------------------------------
     3! NAME
     4!     subsurface_ice
     5!
     6! DESCRIPTION
     7!     Retreat and growth of subsurface ice on Mars with constant orbital
     8!     elements.
     9!
     10! AUTHORS & DATE
     11!     N. Schorghofer (MSIM dynamical program)
     12!     E. Vos, 2025
     13!     JB Clement, 2025
     14!
     15! NOTES
     16!    Based on Norbert Schorgofer's code. Updated for PEM.
     17!-----------------------------------------------------------------------
     18
     19! DECLARATION
     20! -----------
     21implicit none
     22
     23! MODULE PARAMETERS
     24! -----------------
     25real(8), parameter :: dt = 0.02  ! in units of Mars solar days
     26!real(8), parameter :: Fgeotherm = 0.
     27real(8), parameter :: Fgeotherm = 0 !0.028  ! [W/m^2]
     28real(8), parameter :: Lco2frost=6.0e5, co2albedo=0.60, co2emiss=1.
     29real(8), parameter :: emiss0 = 1.  ! emissivity of dry surface
     30integer, parameter :: EQUILTIME =15 ! [Mars years]
     31
     32integer, parameter :: NMAX = 1000
    2633
    2734contains
     35!++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
    2836
    2937
     
    4149  use constants_marspem_mod, only: sec_per_sol
    4250  use phys_constants,        only: pi
    43   implicit none
     51  ! DECLARATION
     52! -----------
     53implicit none
    4454  integer, parameter :: NP=1   ! # of sites
    4555  integer nz, i, k, iloop
     
    212222!     output are newti and newrhoc
    213223!***********************************************************************
    214   implicit none
     224  ! DECLARATION
     225! -----------
     226implicit none
    215227  integer, intent(IN) :: layertype
    216228  real(8), intent(IN) :: porosity, fill, rhocobs, tiobs
     
    282294!     input is partial pressure [Pascal]
    283295!     output is temperature [Kelvin]
    284       implicit none
     296      ! DECLARATION
     297! -----------
     298implicit none
    285299      real*8 p
    286300
     
    326340  use ice_table,      only: rho_ice
    327341  !use omp_lib
    328   implicit none
     342  ! DECLARATION
     343! -----------
     344implicit none
    329345  integer, intent(IN) :: nz, NP
    330346  real(8), intent(IN) :: bigstep
     
    442458!***********************************************************************
    443459  use constants_marspem_mod, only: sols_per_my, sec_per_sol
    444   implicit none
     460  ! DECLARATION
     461! -----------
     462implicit none
    445463  integer, intent(IN) :: nz, typeT
    446464!  real(8), intent(IN) :: latitude  ! in radians
     
    595613!     the inverse of function psvco2
    596614!     input is pressure in Pascal, output is temperature in Kelvin
     615! DECLARATION
     616! -----------
    597617implicit none
    598618real*8 p
     
    605625!     saturation vapor pressure of H2O ice [Pascal]
    606626!     input is temperature [Kelvin]
    607       implicit none
     627      ! DECLARATION
     628! -----------
     629implicit none
    608630      real*8 T
    609631
     
    642664pure function zint(y1,y2,z1,z2)
    643665  ! interpolate between two values, y1*y2<0
    644   implicit none
     666  ! DECLARATION
     667! -----------
     668implicit none
    645669  real(8), intent(IN) :: y1,y2,z1,z2
    646670  real(8) zint
     
    655679!  this is not the true (final) equilibrium depth
    656680!***********************************************************************
    657   implicit none
     681  ! DECLARATION
     682! -----------
     683implicit none
    658684  integer, intent(IN) :: nz
    659685  real(8), intent(IN) :: z(nz), rhosatav(nz)
     
    691717  use math_toolkit, only: deriv2_simple, deriv1_onesided, deriv1, colint
    692718  use ice_table,    only: constriction
    693   implicit none
     719  ! DECLARATION
     720! -----------
     721implicit none
    694722  integer, intent(IN) :: nz, typeT
    695723  real(8), intent(IN), dimension(nz) :: z, rhosatav, porefill
     
    822850  use math_toolkit, only: colint
    823851  use ice_table,    only: rho_ice
    824   implicit none
     852  ! DECLARATION
     853! -----------
     854implicit none
    825855  integer, intent(IN) :: nz, typeF, typeG
    826856  real(8), intent(IN) :: z(nz), ypp(nz), avdrho, avdrhoP
Note: See TracChangeset for help on using the changeset viewer.