source: trunk/LMDZ.COMMON/libf/evolution/tracers.F90 @ 3985

Last change on this file since 3985 was 3985, checked in by jbclement, 7 days ago

PEM:
Addition of a module "phys_constants" to read and store physical parameter of the planet properly, i.e. without going through the module "comcstfi_h" and/or "comconst_mod".
JBC

File size: 1.5 KB
Line 
1MODULE tracers
2
3implicit none
4
5! Indices for tracers taken from the PCM
6integer :: iPCM_qh2o
7
8! Molar masses of tracers
9real, dimension(:), allocatable :: mmol
10
11!=======================================================================
12contains
13!=======================================================================
14
15SUBROUTINE ini_tracers_id(nqtot,noms)
16
17implicit none
18
19! Arguments
20!----------
21integer,                        intent(in) :: nqtot
22character(*), dimension(nqtot), intent(in) :: noms
23
24! Local variables
25!----------------
26integer :: i
27
28! Code
29!-----
30! Allocation
31call ini_tracers(nqtot)
32
33! Initialization
34iPCM_qh2o = -1
35
36! Getting the index
37do i = 1,nqtot
38    if (noms(i) == "h2o_vap") then
39        iPCM_qh2o = i
40        mmol(i) = 18.
41    endif
42enddo
43
44! Checking if everything has been found
45if (iPCM_qh2o < 0) error stop 'ini_frost_id: H2O vapour index not found!'
46
47END SUBROUTINE ini_tracers_id
48!=======================================================================
49
50SUBROUTINE ini_tracers(nqtot)
51
52implicit none
53
54! Arguments
55!----------
56integer, intent(in) :: nqtot
57
58! Local variables
59!----------------
60
61! Code
62!-----
63if (.not. allocated(mmol)) allocate(mmol(nqtot))
64
65END SUBROUTINE ini_tracers
66!=======================================================================
67
68SUBROUTINE end_tracers()
69
70implicit none
71
72! Arguments
73!----------
74
75! Local variables
76!----------------
77
78! Code
79!-----
80if (allocated(mmol)) deallocate(mmol)
81
82END SUBROUTINE end_tracers
83
84END MODULE tracers
Note: See TracBrowser for help on using the repository browser.