source: LMDZ6/trunk/libf/misc/trac_types_mod.F90 @ 4120

Last change on this file since 4120 was 4120, checked in by dcugnet, 2 years ago
  • New water names: H2Ov, H2Ol, H2Oi, H2Or -> H2O_g, H2O_l, H2O_s, H2O_r.
  • Corrections for the lOldCode=.FALSE., not activated yet.
File size: 4.7 KB
Line 
1MODULE trac_types_mod
2
3  USE strings_mod, ONLY: maxlen
4  PRIVATE
5
6!=== TRACERS DESCRIPTOR DERIVED TYPE AND ASSOCIATED ROUTINES INTERFACES =======================================================
7  PUBLIC :: trac_type, isot_type, keys_type
8!------------------------------------------------------------------------------------------------------------------------------
9  TYPE :: keys_type                                        !=== TYPE FOR A SET OF KEYS ASSOCIATED TO AN ELEMENT
10    CHARACTER(LEN=maxlen)              :: name             !--- Tracer name
11    CHARACTER(LEN=maxlen), ALLOCATABLE :: key(:)           !--- Keys string list
12    CHARACTER(LEN=maxlen), ALLOCATABLE :: val(:)           !--- Corresponding values string list
13  END TYPE keys_type
14!------------------------------------------------------------------------------------------------------------------------------
15  TYPE :: trac_type                                        !=== TYPE FOR A SINGLE TRACER NAMED "name"
16    CHARACTER(LEN=maxlen) :: name        = ''              !--- Name of the tracer
17    CHARACTER(LEN=maxlen) :: gen0Name    = ''              !--- First generation ancestor name
18    CHARACTER(LEN=maxlen) :: parent      = ''              !--- Parent name
19    CHARACTER(LEN=maxlen) :: longName    = ''              !--- Long name (with advection scheme suffix)
20    CHARACTER(LEN=maxlen) :: type        = 'tracer'        !--- Type  (so far: 'tracer' / 'tag')
21    CHARACTER(LEN=maxlen) :: phase       = 'g'             !--- Phase ('g'as / 'l'iquid / 's'olid)
22    CHARACTER(LEN=maxlen) :: component   = ''              !--- Coma-separated list of components (Ex: lmdz,inca)
23    INTEGER               :: iadv        = 10              !--- Advection scheme used
24    INTEGER               :: iGeneration = -1              !--- Generation number (>=0)
25    LOGICAL               :: isAdvected  = .FALSE.         !--- "true" tracers: iadv > 0.   COUNT(isAdvected )=nqtrue
26    LOGICAL               :: isInPhysics = .TRUE.          !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr
27    INTEGER               :: iqParent    = 0               !--- Parent index
28    INTEGER,  ALLOCATABLE :: iqDescen(:)                   !--- Descendants index (in growing generation order)
29    INTEGER               :: nqDescen    = 0               !--- Number of descendants (all generations)
30    INTEGER               :: nqChilds    = 0               !--- Number of childs    (first generation)
31    INTEGER               :: iso_iGroup  = 0               !--- Isotopes group index in isotopes(:)
32    INTEGER               :: iso_iName   = 0               !--- Isotope  name  index in isotopes(iso_iGroup)%trac(:)
33    INTEGER               :: iso_iZone   = 0               !--- Isotope  zone  index in isotopes(iso_iGroup)%zone(:)
34    INTEGER               :: iso_iPhase  = 0               !--- Isotope  phase index in isotopes(iso_iGroup)%phas
35    TYPE(keys_type)       :: keys                          !--- <key>=<val> pairs vector
36  END TYPE trac_type
37!------------------------------------------------------------------------------------------------------------------------------
38  TYPE :: isot_type                                        !=== TYPE FOR AN ISOTOPES FAMILY DESCENDING ON TRACER "parent"
39    CHARACTER(LEN=maxlen)              :: parent           !--- Isotopes family name (parent tracer name ; ex: H2O)
40    LOGICAL                            :: check=.FALSE.    !--- Triggering of the checking routines
41    TYPE(keys_type),       ALLOCATABLE :: keys(:)          !--- Isotopes keys/values pairs list     (length: niso)
42    CHARACTER(LEN=maxlen), ALLOCATABLE :: trac(:)          !--- Isotopes + tagging tracers list     (length: ntiso)
43    CHARACTER(LEN=maxlen), ALLOCATABLE :: zone(:)          !--- Geographic tagging zones names list (length: nzone)
44    CHARACTER(LEN=maxlen)              :: phase = 'g'      !--- Phases list: [g][l][s]              (length: nphas)
45    INTEGER                            :: niso  = 0        !--- Number of isotopes, excluding tagging tracers
46    INTEGER                            :: nzone = 0        !--- Number of geographic tagging zones
47    INTEGER                            :: ntiso = 0        !--- Number of isotopes, including tagging tracers
48    INTEGER                            :: nphas = 0        !--- Number phases
49    INTEGER,               ALLOCATABLE :: iqTraPha(:,:)    !--- Idx in "tracers(1:nqtot)" = f(name(1:ntiso)),phas)
50                                                           !---        "iqTraPha" former name: "iqiso"
51    INTEGER,               ALLOCATABLE :: itZonIso(:,:)    !--- Idx in "trac(1:ntiso)" = f(zone, name(1:niso))
52                                                           !---        "itZonIso" former name: "index_trac"
53  END TYPE isot_type
54
55END MODULE trac_types_mod
Note: See TracBrowser for help on using the repository browser.