source: trunk/LMDZ.MARS/libf/phymars/conc_mod.F90 @ 2091

Last change on this file since 2091 was 1770, checked in by aslmd, 7 years ago

LMDZ.MARS setting the stage for maybe fixing nesting in the LMD_MM_MARS 1. add the possibility to deallocate common modules with subroutines

File size: 946 bytes
Line 
1module conc_mod
2
3implicit none
4
5  real,save,allocatable :: mmean(:,:)  ! mean molecular mass of the atmosphere
6  real,save,allocatable :: Akknew(:,:) ! thermal conductivity cofficient
7  real,save,allocatable :: cpnew(:,:)  ! specicic heat
8  real,save,allocatable :: rnew(:,:)   ! specific gas constant
9 
10contains
11
12  subroutine ini_conc_mod(ngrid,nlayer)
13 
14  implicit none
15  integer,intent(in) :: ngrid ! number of atmospheric columns
16  integer,intent(in) :: nlayer ! number of atmospheric levels
17 
18    allocate(mmean(ngrid,nlayer))
19    allocate(Akknew(ngrid,nlayer))
20    allocate(cpnew(ngrid,nlayer))
21    allocate(rnew(ngrid,nlayer))
22   
23  end subroutine ini_conc_mod
24
25
26  subroutine end_conc_mod
27
28  implicit none
29
30    if (allocated(mmean)) deallocate(mmean)
31    if (allocated(Akknew)) deallocate(Akknew)
32    if (allocated(cpnew)) deallocate(cpnew)
33    if (allocated(rnew)) deallocate(rnew)
34
35  end subroutine end_conc_mod
36
37end module conc_mod
Note: See TracBrowser for help on using the repository browser.