1 | MODULE trac_types_mod |
---|
2 | |
---|
3 | !=== TRACERS DESCRIPTOR DERIVED TYPE AND ASSOCIATED ROUTINES INTERFACES ======================================================= |
---|
4 | PRIVATE |
---|
5 | PUBLIC :: tra, iso, kys |
---|
6 | !------------------------------------------------------------------------------------------------------------------------------ |
---|
7 | TYPE kys !=== TYPE FOR A SET OF KEYS ASSOCIATED TO AN ELEMENT |
---|
8 | CHARACTER(LEN=256) :: name !--- Tracer name |
---|
9 | CHARACTER(LEN=256), ALLOCATABLE :: key(:) !--- Keys string list |
---|
10 | CHARACTER(LEN=256), ALLOCATABLE :: val(:) !--- Corresponding values string list |
---|
11 | END TYPE kys |
---|
12 | !------------------------------------------------------------------------------------------------------------------------------ |
---|
13 | TYPE tra !=== TYPE FOR SINGLE TRACER |
---|
14 | CHARACTER(LEN=256) :: name = '' !--- Name |
---|
15 | CHARACTER(LEN=256) :: nam1 = '' !--- Generation 1 ancestor name |
---|
16 | CHARACTER(LEN=256) :: prnt = '' !--- Parent name |
---|
17 | CHARACTER(LEN=256) :: lnam = '' !--- Long name (with adv. scheme) |
---|
18 | CHARACTER(LEN=256) :: type = 'tracer' !--- Type (so far: 'tracer'/'tag') |
---|
19 | CHARACTER(LEN=256) :: phas = 'g' !--- Phase ('g'as/'l'iquid/'s'olid) |
---|
20 | CHARACTER(LEN=256) :: comp !--- Coma-separated list of components (Ex: lmdz,inca) |
---|
21 | INTEGER :: iadv = 10 !--- Advection scheme used |
---|
22 | INTEGER :: igen = 1 !--- Generation number (>=1) |
---|
23 | INTEGER :: itr = 0 !--- Index in tr_seri (0: not in physics) |
---|
24 | INTEGER :: iprnt = 0 !--- Parent index |
---|
25 | INTEGER, ALLOCATABLE :: idesc(:) !--- Descendants index (in growing generation order) |
---|
26 | INTEGER :: ndesc = 0 !--- Number of descendants (all generations) |
---|
27 | INTEGER :: nchld = 0 !--- Number of childs (first generation) |
---|
28 | INTEGER :: iso_igr = 0 !--- Isotopes group index in isotopes(:) |
---|
29 | INTEGER :: iso_num = 0 !--- Isotope name index in isotopes(iso_igr)%trac(:) |
---|
30 | INTEGER :: iso_zon = 0 !--- Isotope zone index in isotopes(iso_igr)%zone(:) |
---|
31 | INTEGER :: iso_pha = 0 !--- Isotope phase index in isotopes(iso_igr)%phas |
---|
32 | TYPE(kys) :: keys !--- <key>=<val> pairs vector |
---|
33 | END TYPE tra |
---|
34 | !------------------------------------------------------------------------------------------------------------------------------ |
---|
35 | TYPE iso !=== TYPE FOR ISOTOPES FAMILY DESCENDING ON TRACER "prnt" |
---|
36 | CHARACTER(LEN=256) :: prnt !--- Isotopes family name (parent tracer name ; ex: H2O) |
---|
37 | LOGICAL :: check=.FALSE. !--- Triggering of the checking routines |
---|
38 | TYPE(kys), ALLOCATABLE :: keys(:) !--- Isotopes keys/values pairs list (length: niso) |
---|
39 | CHARACTER(LEN=256), ALLOCATABLE :: trac(:) !--- Isotopes + tagging tracers list (length: nitr) |
---|
40 | CHARACTER(LEN=256), ALLOCATABLE :: zone(:) !--- Geographic tagging zones names list |
---|
41 | CHARACTER(LEN=256) :: phas = 'g' !--- Phases list: [g][l][s] |
---|
42 | INTEGER :: niso=0, nzon=0, nitr=0, npha=0!--- Number of isotopes, zones, total isotopes and phases |
---|
43 | INTEGER, ALLOCATABLE :: iTraPha(:,:) ! (iqiso) !--- Idx in "trac(1:niso)" = f(name(1:nitr)),phas) |
---|
44 | INTEGER, ALLOCATABLE :: iZonIso(:,:) ! (index_trac) !--- Idx in "trac(1:nitr)" = f(zone, name(1:niso)) |
---|
45 | END TYPE iso |
---|
46 | |
---|
47 | END MODULE trac_types_mod |
---|