1 | module comsoil_h |
---|
2 | |
---|
3 | implicit none |
---|
4 | ! nsoilmx : number of subterranean layers |
---|
5 | !EM: old soil routine: integer, parameter :: nsoilmx = 10 |
---|
6 | integer, parameter :: nsoilmx = 18 |
---|
7 | |
---|
8 | real,save,allocatable,dimension(:) :: layer ! soil layer depths |
---|
9 | real,save,allocatable,dimension(:) :: mlayer ! soil mid-layer depths |
---|
10 | real,save,allocatable,dimension(:,:) :: inertiedat ! soil thermal inertia |
---|
11 | real,save :: volcapa ! soil volumetric heat capacity |
---|
12 | ! NB: volcapa is read fromn control(35) from physicq start file |
---|
13 | ! in physdem (or set via tabfi, or initialized in |
---|
14 | ! soil_settings.F) |
---|
15 | |
---|
16 | ! variables |
---|
17 | REAL,SAVE,ALLOCATABLE :: tsoil(:,:) ! sub-surface temperatures (K) |
---|
18 | real,save,allocatable :: mthermdiff(:,:) ! mid-layer thermal diffusivity |
---|
19 | real,save,allocatable :: thermdiff(:,:) ! inter-layer thermal diffusivity |
---|
20 | real,save,allocatable :: coefq(:) ! q_{k+1/2} coefficients |
---|
21 | real,save,allocatable :: coefd(:,:) ! d_k coefficients |
---|
22 | real,save,allocatable :: alph(:,:) ! alpha_k coefficients |
---|
23 | real,save,allocatable :: beta(:,:) ! beta_k coefficients |
---|
24 | real,save :: mu |
---|
25 | |
---|
26 | contains |
---|
27 | |
---|
28 | subroutine ini_comsoil_h(ngrid) |
---|
29 | |
---|
30 | implicit none |
---|
31 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
32 | |
---|
33 | allocate(layer(nsoilmx)) !soil layer depths |
---|
34 | allocate(mlayer(0:nsoilmx-1)) ! soil mid-layer depths |
---|
35 | allocate(inertiedat(ngrid,nsoilmx)) ! soil thermal inertia |
---|
36 | |
---|
37 | allocate(tsoil(ngrid,nsoilmx)) ! soil temperatures |
---|
38 | |
---|
39 | allocate(mthermdiff(ngrid,0:nsoilmx-1)) |
---|
40 | allocate(thermdiff(ngrid,nsoilmx-1)) |
---|
41 | allocate(coefq(0:nsoilmx-1)) |
---|
42 | allocate(coefd(ngrid,nsoilmx-1)) |
---|
43 | allocate(alph(ngrid,nsoilmx-1)) |
---|
44 | allocate(beta(ngrid,nsoilmx-1)) |
---|
45 | |
---|
46 | |
---|
47 | end subroutine ini_comsoil_h |
---|
48 | |
---|
49 | end module comsoil_h |
---|