source: trunk/LMDZ.GENERIC/libf/phystd/comsoil_h.F90 @ 1477

Last change on this file since 1477 was 1315, checked in by milmd, 10 years ago

LMDZ.GENERIC. OpenMP directives added in generic physic. When running in pure OpenMP or hybrid OpenMP/MPI, may have some bugs with condense_cloud and wstats routines.

File size: 1.2 KB
Line 
1module comsoil_h
2
3implicit 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
9  real,save,allocatable,dimension(:) :: layer      ! soil layer depths
10  real,save,allocatable,dimension(:) :: mlayer     ! soil mid-layer depths
11  real,save,allocatable,dimension(:,:) :: inertiedat ! soil thermal inertia
12  real,save :: volcapa    ! soil volumetric heat capacity
13       ! NB: volcapa is read fromn control(35) from physicq start file
14       !     in physdem (or set via tabfi, or initialized in
15       !                 soil_settings.F)
16!$OMP THREADPRIVATE(layer,mlayer,inertiedat,volcapa)
17
18contains
19
20  subroutine ini_comsoil_h(ngrid)
21 
22  implicit none
23  integer,intent(in) :: ngrid ! number of atmospheric columns
24 
25    if (.not.allocated(layer)) allocate(layer(nsoilmx)) !soil layer depths
26    if (.not.allocated(mlayer)) allocate(mlayer(0:nsoilmx-1)) ! soil mid-layer depths
27    if (.not.allocated(inertiedat)) allocate(inertiedat(ngrid,nsoilmx)) ! soil thermal inertia
28 
29  end subroutine ini_comsoil_h
30
31end module comsoil_h
32
Note: See TracBrowser for help on using the repository browser.