source: trunk/LMDZ.MARS/libf/phymars/tracer_mod.F90 @ 1689

Last change on this file since 1689 was 1660, checked in by emillour, 8 years ago

Mars GCM:

  • Added possibility to run with an Helium "he" tracer (to be initialized at constant value of 3.6e-7 kg/kg_air, i.e. the 4ppm of Krasnopolsky 1996 EUVE satellite, using newstart).
  • corrected case for CH4 in aeronomars/photochemistry.F (was using undefined indexes when there is no CH4).
  • updated aki/cpi coefficients for Argon used to compute mean atmospheric Cp and thermal conductivity in aeronomars/concentrations.F

JYC+EM

File size: 5.2 KB
Line 
1module tracer_mod
2
3 implicit none
4 
5      ! number of tracers:
6      integer,save :: nqmx ! initialized in conf_phys
7   
8      character*20,allocatable,save ::  noms(:)  ! name of the tracer
9      real,allocatable,save :: mmol(:)           ! mole mass of tracer (g/mol-1)
10      real,allocatable,save :: radius(:)   ! dust and ice particle radius (m)
11      real,allocatable,save :: rho_q(:)    ! tracer densities (kg.m-3)
12      real,allocatable,save :: alpha_lift(:) ! saltation vertical flux/horiz flux ratio (m-1)
13      real,allocatable,save :: alpha_devil(:) ! lifting coeeficient by dust devil
14
15      real,save :: varian      ! Characteristic variance of log-normal distribution
16      real,save :: r3n_q     ! used to compute r0 from number and mass mixing ratio
17      real,save :: rho_dust     ! Mars dust density (kg.m-3)
18      real,save :: rho_ice     ! Water ice density (kg.m-3)
19      real,save :: nuice_ref   ! Effective variance of the water ice dist.
20      real,save :: nuice_sed   ! Sedimentation effective variance of the water ice dist.
21      real,save :: ref_r0        ! for computing reff=ref_r0*r0 (in log.n. distribution)
22      real,save :: rho_ice_co2     ! co2 ice density (kg.m-3)
23      real,save :: nuiceco2_sed   ! Sedimentation effective variance of the co2 ice dist.
24      real,save :: nuiceco2_ref   ! Effective variance of the co2 ice dist.
25
26      real,save :: ccn_factor  ! ratio of nuclei for water ice particles
27
28      real,save :: meteo_flux_mass   ! meteoritic flux of dust - mmr
29      real,save :: meteo_flux_number ! meteoritic flux of dust - nd
30      integer,save :: meteo_alt
31
32      INTEGER,ALLOCATABLE,SAVE :: nqdust(:) ! to store the indexes of dust tracers (cf aeropacity)
33      real,allocatable,save :: dryness(:)!"Dryness coefficient" for grnd water ice sublimation
34
35
36! tracer indexes: these are initialized in initracer and should be 0 if the
37!                 corresponding tracer does not exist
38      ! dust
39      integer,allocatable,save :: igcm_dustbin(:) ! for dustbin 'dust' tracers
40      ! dust, special doubleq case
41      integer,save :: igcm_dust_mass   ! dust mass mixing ratio
42                                  !   (for transported dust)
43      integer,save :: igcm_dust_number ! dust number mixing ratio
44                                  !   (transported dust)
45      integer,save :: igcm_ccn_mass   ! CCN mass mixing ratio
46      integer,save :: igcm_ccn_number ! CCN number mixing ratio
47      integer,save :: igcm_dust_submicron ! submicron dust mixing ratio
48   
49      integer,save :: igcm_ccnco2_mass   ! CCN (dust and/or water ice) for CO2 mass mixing ratio
50      integer,save :: igcm_ccnco2_number ! CCN (dust and/or water ice) for CO2 number mixing ratio
51
52      ! water
53      integer,save :: igcm_h2o_vap ! water vapour
54      integer,save :: igcm_h2o_ice ! water ice
55      integer,save :: igcm_co2_ice ! co2 ice
56
57      ! chemistry:
58      integer,save :: igcm_co2
59      integer,save :: igcm_co
60      integer,save :: igcm_o
61      integer,save :: igcm_o1d
62      integer,save :: igcm_o2
63      integer,save :: igcm_o3
64      integer,save :: igcm_h
65      integer,save :: igcm_h2
66      integer,save :: igcm_oh
67      integer,save :: igcm_ho2
68      integer,save :: igcm_h2o2
69      integer,save :: igcm_n2
70      integer,save :: igcm_ar
71      integer,save :: igcm_n
72      integer,save :: igcm_no
73      integer,save :: igcm_no2
74      integer,save :: igcm_n2d
75      integer,save :: igcm_he
76      integer,save :: igcm_ch4
77      ! Ions
78      integer,save :: igcm_co2plus
79      integer,save :: igcm_oplus
80      integer,save :: igcm_o2plus
81      integer,save :: igcm_coplus
82      integer,save :: igcm_cplus
83      integer,save :: igcm_nplus
84      integer,save :: igcm_noplus
85      integer,save :: igcm_n2plus
86      integer,save :: igcm_hplus
87      integer,save :: igcm_hco2plus
88      integer,save :: igcm_elec
89      ! other tracers
90      integer,save :: igcm_ar_n2 ! for simulations using co2 +neutral gas
91
92
93!-----------------------------------------------------------------------
94
95  contains
96 
97    subroutine ini_tracer_mod(nq,tname)
98      implicit none
99     
100      integer,intent(in) :: nq ! number of tracers
101      character(len=*),intent(in) :: tname(nq) ! tracer names
102     
103      integer :: iq, count
104      character(len=20) :: txt ! to store some text
105     
106      ! set dimension and tracer names
107      nqmx=nq
108      allocate(noms(nq))
109      do iq=1,nq
110        noms(iq)=tname(iq)
111        write(*,*) "tracer_mod names : ", trim(noms(iq))
112      enddo
113     
114#ifndef MESOSCALE
115      ! check if tracers have 'old' names
116      count=0
117      do iq=1,nq
118        txt=" "
119        write(txt,'(a1,i2.2)') 'q',iq
120        if (txt.eq.tname(iq)) then
121          count=count+1
122        endif
123      enddo ! of do iq=1,nq
124     
125      if (count.eq.nq) then
126        write(*,*) "ini_tracer_mod: tracers seem to follow old naming ", &
127                   "convention (q01,q02,...)"
128        write(*,*) "you should run newstart to rename them"
129        stop
130      endif
131#endif
132           
133      ! allocate module arrays:
134      allocate(mmol(nq))
135      allocate(radius(nq))
136      allocate(rho_q(nq))
137      allocate(alpha_lift(nq))
138      allocate(alpha_devil(nq))
139      allocate(igcm_dustbin(nq))
140      allocate(nqdust(nq))
141     
142    end subroutine ini_tracer_mod
143
144end module tracer_mod
Note: See TracBrowser for help on using the repository browser.