1 | module comsoil_h |
---|
2 | |
---|
3 | implicit none |
---|
4 | ! nsoilmx : number of subterranean layers |
---|
5 | !integer, parameter :: nsoilmx = 18 ! for z1=0.0002 m, depth = 18 m => mars case |
---|
6 | !integer, parameter :: nsoilmx = 13 ! for z1=0.03 m, depth = 104.8 m => earth case |
---|
7 | integer,save :: nsoilmx = 18 ! default, but may be set in callphys.def |
---|
8 | ! Full soil layer depths are set as: layer(k)=lay1_soil*alpha_soil**(k-1) , k=1,nsoil |
---|
9 | ! Mid soil layer depths are set as: mlayer(k)=lay1_soil*alpha_soil**(k-1/2) , k=0,nsoil-1 |
---|
10 | real,save :: lay1_soil=2.e-4 ! depth (m) of first full soil layer (may be set in callphys.def) |
---|
11 | real,save :: alpha_soil=2 ! coefficient for soil layer thickness (may be set in callphys.def) |
---|
12 | !$OMP THREADPRIVATE(nsoilmx,lay1_soil,alpha_soil) |
---|
13 | |
---|
14 | real,save,allocatable,dimension(:) :: layer ! soil layer depths |
---|
15 | real,save,allocatable,dimension(:) :: mlayer ! soil mid-layer depths |
---|
16 | real,save,allocatable,dimension(:,:) :: inertiedat ! soil thermal inertia |
---|
17 | real,save :: volcapa ! soil volumetric heat capacity |
---|
18 | ! NB: volcapa is read fromn control(35) from physicq start file |
---|
19 | ! in physdem (or set via tabfi, or initialized in |
---|
20 | ! soil_settings.F) |
---|
21 | !$OMP THREADPRIVATE(layer,mlayer,inertiedat,volcapa) |
---|
22 | |
---|
23 | contains |
---|
24 | |
---|
25 | subroutine ini_comsoil_h(ngrid) |
---|
26 | |
---|
27 | implicit none |
---|
28 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
29 | |
---|
30 | if (.not.allocated(layer)) allocate(layer(nsoilmx)) !soil layer depths |
---|
31 | if (.not.allocated(mlayer)) allocate(mlayer(0:nsoilmx-1)) ! soil mid-layer depths |
---|
32 | if (.not.allocated(inertiedat)) allocate(inertiedat(ngrid,nsoilmx)) ! soil thermal inertia |
---|
33 | |
---|
34 | end subroutine ini_comsoil_h |
---|
35 | |
---|
36 | end module comsoil_h |
---|
37 | |
---|