| 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, parameter :: nsoilmx = 18 |
|---|
| 8 | ! Full soil layer depths are set as: layer(k)=lay1*alpha**(k-1) , k=1,nsoil |
|---|
| 9 | ! Mid soil layer depths are set as: mlayer(k)=lay1*alpha**(k-1/2) , k=0,nsoil-1 |
|---|
| 10 | real,parameter :: lay1=2.e-4 ! depth of first full soil layer |
|---|
| 11 | real,parameter :: alpha=2 |
|---|
| 12 | |
|---|
| 13 | real,save,allocatable,dimension(:) :: layer ! soil layer depths |
|---|
| 14 | real,save,allocatable,dimension(:) :: mlayer ! soil mid-layer depths |
|---|
| 15 | real,save,allocatable,dimension(:,:) :: inertiedat ! soil thermal inertia |
|---|
| 16 | real,save :: volcapa ! soil volumetric heat capacity |
|---|
| 17 | ! NB: volcapa is read fromn control(35) from physicq start file |
|---|
| 18 | ! in physdem (or set via tabfi, or initialized in |
|---|
| 19 | ! soil_settings.F) |
|---|
| 20 | !$OMP THREADPRIVATE(layer,mlayer,inertiedat,volcapa) |
|---|
| 21 | |
|---|
| 22 | contains |
|---|
| 23 | |
|---|
| 24 | subroutine ini_comsoil_h(ngrid) |
|---|
| 25 | |
|---|
| 26 | implicit none |
|---|
| 27 | integer,intent(in) :: ngrid ! number of atmospheric columns |
|---|
| 28 | |
|---|
| 29 | if (.not.allocated(layer)) allocate(layer(nsoilmx)) !soil layer depths |
|---|
| 30 | if (.not.allocated(mlayer)) allocate(mlayer(0:nsoilmx-1)) ! soil mid-layer depths |
|---|
| 31 | if (.not.allocated(inertiedat)) allocate(inertiedat(ngrid,nsoilmx)) ! soil thermal inertia |
|---|
| 32 | |
|---|
| 33 | end subroutine ini_comsoil_h |
|---|
| 34 | |
|---|
| 35 | end module comsoil_h |
|---|
| 36 | |
|---|