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

Last change on this file since 1242 was 1224, checked in by aslmd, 11 years ago

LMDZ.MARS. If not major, a quite important commit.

  1. No more SAVE,ALLOCATABLE arrays outside modules.

This is important to solve the nesting conundrum in MESOSCALE.
And overall this is good for the harmony of the universe.
(Joke apart, this is good for any interfacing task. And compliant with a F90 spirit).
Note that bit-to-bit compatibility of results in debug mode was checked.

  1. inifis is split in two : phys_state_var_init + conf_phys

This makes interfacing with MESOSCALE more transparent.
This is also clearer for LMDZ.MARS.
Before, inifis has two very different tasks to do.

  1. a bit of cleaning as far as modules and saves are concerned

Point 1

  • Removed SAVE,ALLOCATABLE arrays from

physiq, aeropacity, updatereffrad, soil

and put those in

dimradmars_mod, surfdat_h, tracer_mod, comsoil_h

and changed accordingly the initialization subroutines associated to each module.
Allocating these arrays is thus done at initialization.

Point 2

  • Created a subroutine phys_state_var_init which does all the allocation / initialization work for modules. This was previously done in inifis.
  • Replaced inifis which was then (after the previous modification) just about reading callphys.def and setting a few constants by conf_phys. This mimics the new LMDZ terminology (cf. LMDZ.VENUS for instance)
  • Bye bye inifis.

Point 3

  • Removed comdiurn and put everything in comgeomfi
  • Created a turb_mod module for turbulence variables (e.g. l0 in yamada4)
  • dryness had nothing to do in tracer_h, put it in surfdat_h (like watercaptag)
  • topdust0 does not need to be SAVE in aeropacity. better use sinlat.
  • emisref does not need to be SAVE in newcondens. made it automatic array.
  • Removed useless co2ice argument in initracer.
File size: 3.3 KB
RevLine 
[1036]1module tracer_mod
2
3 implicit none
4 
5      ! number of tracers:
[1224]6      integer,save :: nqmx ! initialized in conf_phys
[1036]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     
23      real,save :: ccn_factor  ! ratio of nuclei for water ice particles
24
[1224]25      INTEGER,ALLOCATABLE,SAVE :: nqdust(:) ! to store the indexes of dust tracers (cf aeropacity)
26
[1036]27! tracer indexes: these are initialized in initracer and should be 0 if the
28!                 corresponding tracer does not exist
29      ! dust
30      integer,allocatable,save :: igcm_dustbin(:) ! for dustbin 'dust' tracers
31      ! dust, special doubleq case
32      integer,save :: igcm_dust_mass   ! dust mass mixing ratio
33                                  !   (for transported dust)
34      integer,save :: igcm_dust_number ! dust number mixing ratio
35                                  !   (transported dust)
36      integer,save :: igcm_ccn_mass   ! CCN mass mixing ratio
37      integer,save :: igcm_ccn_number ! CCN number mixing ratio
38      integer,save :: igcm_dust_submicron ! submicron dust mixing ratio
39                                     !   (transported dust)
40      ! water
41      integer,save :: igcm_h2o_vap ! water vapour
42      integer,save :: igcm_h2o_ice ! water ice
43      ! chemistry:
44      integer,save :: igcm_co2
45      integer,save :: igcm_co
46      integer,save :: igcm_o
47      integer,save :: igcm_o1d
48      integer,save :: igcm_o2
49      integer,save :: igcm_o3
50      integer,save :: igcm_h
51      integer,save :: igcm_h2
52      integer,save :: igcm_oh
53      integer,save :: igcm_ho2
54      integer,save :: igcm_h2o2
55      integer,save :: igcm_n2
56      integer,save :: igcm_ar
57      integer,save :: igcm_n
58      integer,save :: igcm_no
59      integer,save :: igcm_no2
60      integer,save :: igcm_n2d
61      integer,save :: igcm_ch4
62      ! Ions
63      integer,save :: igcm_co2plus
64      integer,save :: igcm_oplus
65      integer,save :: igcm_o2plus
66      integer,save :: igcm_coplus
67      integer,save :: igcm_cplus
68      integer,save :: igcm_nplus
69      integer,save :: igcm_noplus
70      integer,save :: igcm_n2plus
71      integer,save :: igcm_hplus
72      integer,save :: igcm_hco2plus
73      integer,save :: igcm_elec
74      ! other tracers
75      integer,save :: igcm_ar_n2 ! for simulations using co2 +neutral gas
76
77
78!-----------------------------------------------------------------------
79
80end module tracer_mod
Note: See TracBrowser for help on using the repository browser.