source: trunk/LMDZ.COMMON/libf/evolution/comsoil_h_PEM.F90 @ 3552

Last change on this file since 3552 was 3532, checked in by jbclement, 3 weeks ago

PEM:
Removing unecessary module/subroutine "interpol_TI_PEM2PCM.F90" + Few small corrections/cleanings.
JBC

File size: 3.6 KB
Line 
1MODULE comsoil_h_PEM
2
3implicit none
4
5integer, parameter                  :: nsoilmx_PEM = 68   ! number of layers in the PEM
6real, allocatable, dimension(:)     :: layer_PEM          ! soil layer depths [m]
7real, allocatable, dimension(:)     :: mlayer_PEM         ! soil mid-layer depths [m]
8real, allocatable, dimension(:,:,:) :: TI_PEM             ! soil thermal inertia [SI]
9real, allocatable, dimension(:,:)   :: inertiedat_PEM     ! soil thermal inertia saved as reference for current climate [SI]
10! Variables (FC: built in firstcall in soil.F)
11real, allocatable, dimension(:,:,:) :: tsoil_PEM          ! sub-surface temperatures [K]
12real, allocatable, dimension(:,:)   :: mthermdiff_PEM     ! (FC) mid-layer thermal diffusivity [SI]
13real, allocatable, dimension(:,:)   :: thermdiff_PEM      ! (FC) inter-layer thermal diffusivity [SI]
14real, allocatable, dimension(:)     :: coefq_PEM          ! (FC) q_{k+1/2} coefficients [SI]
15real, allocatable, dimension(:,:)   :: coefd_PEM          ! (FC) d_k coefficients [SI]
16real, allocatable, dimension(:,:)   :: alph_PEM           ! (FC) alpha_k coefficients [SI]
17real, allocatable, dimension(:,:)   :: beta_PEM           ! beta_k coefficients [SI]
18real                                :: mu_PEM             ! mu coefficient [SI]
19real                                :: fluxgeo            ! Geothermal flux [W/m^2]
20real                                :: depth_breccia      ! Depth at which we have breccia [m]
21real                                :: depth_bedrock      ! Depth at which we have bedrock [m]
22integer                             :: index_breccia      ! last index of the depth grid before having breccia
23integer                             :: index_bedrock      ! last index of the depth grid before having bedrock
24logical                             :: soil_pem           ! True by default, to run with the subsurface physic. Read in pem.def
25real                                :: ini_huge_h2oice    ! Initial value for huge reservoirs of H2O ice [kg/m^2]
26logical                             :: reg_thprop_dependp ! thermal properites of the regolith vary with the surface pressure
27
28!=======================================================================
29contains
30!=======================================================================
31
32SUBROUTINE ini_comsoil_h_PEM(ngrid,nslope)
33
34implicit none
35
36integer, intent(in) :: ngrid  ! number of atmospheric columns
37integer, intent(in) :: nslope ! number of slope within a mesh
38
39allocate(layer_PEM(nsoilmx_PEM))
40allocate(mlayer_PEM(0:nsoilmx_PEM - 1))
41allocate(TI_PEM(ngrid,nsoilmx_PEM,nslope))
42allocate(tsoil_PEM(ngrid,nsoilmx_PEM,nslope))
43allocate(mthermdiff_PEM(ngrid,0:nsoilmx_PEM - 1))
44allocate(thermdiff_PEM(ngrid,nsoilmx_PEM - 1))
45allocate(coefq_PEM(0:nsoilmx_PEM - 1))
46allocate(coefd_PEM(ngrid,nsoilmx_PEM - 1))
47allocate(alph_PEM(ngrid,nsoilmx_PEM - 1))
48allocate(beta_PEM(ngrid,nsoilmx_PEM - 1))
49allocate(inertiedat_PEM(ngrid,nsoilmx_PEM))
50
51END SUBROUTINE ini_comsoil_h_PEM
52
53!=======================================================================
54
55SUBROUTINE end_comsoil_h_PEM
56
57implicit none
58
59if (allocated(layer_PEM)) deallocate(layer_PEM)
60if (allocated(mlayer_PEM)) deallocate(mlayer_PEM)
61if (allocated(TI_PEM)) deallocate(TI_PEM)
62if (allocated(tsoil_PEM)) deallocate(tsoil_PEM)
63if (allocated(mthermdiff_PEM)) deallocate(mthermdiff_PEM)
64if (allocated(thermdiff_PEM)) deallocate(thermdiff_PEM)
65if (allocated(coefq_PEM)) deallocate(coefq_PEM)
66if (allocated(coefd_PEM)) deallocate(coefd_PEM)
67if (allocated(alph_PEM)) deallocate(alph_PEM)
68if (allocated(beta_PEM)) deallocate(beta_PEM)
69if (allocated(inertiedat_PEM)) deallocate(inertiedat_PEM)
70
71END SUBROUTINE end_comsoil_h_PEM
72
73END MODULE comsoil_h_PEM
Note: See TracBrowser for help on using the repository browser.