MODULE trac_types_mod !=== TRACERS DESCRIPTOR DERIVED TYPE AND ASSOCIATED ROUTINES INTERFACES ======================================================= PRIVATE PUBLIC :: tra, iso, kys !------------------------------------------------------------------------------------------------------------------------------ TYPE kys !=== TYPE FOR A SET OF KEYS ASSOCIATED TO AN ELEMENT CHARACTER(LEN=256) :: name !--- Tracer name CHARACTER(LEN=256), ALLOCATABLE :: key(:) !--- Keys string list CHARACTER(LEN=256), ALLOCATABLE :: val(:) !--- Corresponding values string list END TYPE kys !------------------------------------------------------------------------------------------------------------------------------ TYPE tra !=== TYPE FOR SINGLE TRACER CHARACTER(LEN=256) :: name = '' !--- Name CHARACTER(LEN=256) :: nam1 = '' !--- Generation 1 ancestor name CHARACTER(LEN=256) :: prnt = '' !--- Parent name CHARACTER(LEN=256) :: lnam = '' !--- Long name (with adv. scheme) CHARACTER(LEN=256) :: type = 'tracer' !--- Type (so far: 'tracer'/'tag') CHARACTER(LEN=256) :: phas = 'g' !--- Phase ('g'as/'l'iquid/'s'olid) CHARACTER(LEN=256) :: comp !--- Coma-separated list of components (Ex: lmdz,inca) INTEGER :: iadv = 10 !--- Advection scheme used INTEGER :: igen = 1 !--- Generation number (>=1) INTEGER :: itr = 0 !--- Index in tr_seri (0: not in physics) INTEGER :: iprnt = 0 !--- Parent index INTEGER, ALLOCATABLE :: idesc(:) !--- Descendants index (in growing generation order) INTEGER :: ndesc = 0 !--- Number of descendants (all generations) INTEGER :: nchld = 0 !--- Number of childs (first generation) INTEGER :: iso_igr = 0 !--- Isotopes group index in isotopes(:) INTEGER :: iso_num = 0 !--- Isotope name index in isotopes(iso_igr)%trac(:) INTEGER :: iso_zon = 0 !--- Isotope zone index in isotopes(iso_igr)%zone(:) INTEGER :: iso_pha = 0 !--- Isotope phase index in isotopes(iso_igr)%phas TYPE(kys) :: keys !--- = pairs vector END TYPE tra !------------------------------------------------------------------------------------------------------------------------------ TYPE iso !=== TYPE FOR ISOTOPES FAMILY DESCENDING ON TRACER "prnt" CHARACTER(LEN=256) :: prnt !--- Isotopes family name (parent tracer name ; ex: H2O) LOGICAL :: check=.FALSE. !--- Triggering of the checking routines TYPE(kys), ALLOCATABLE :: keys(:) !--- Isotopes keys/values pairs list (length: niso) CHARACTER(LEN=256), ALLOCATABLE :: trac(:) !--- Isotopes + tagging tracers list (length: nitr) CHARACTER(LEN=256), ALLOCATABLE :: zone(:) !--- Geographic tagging zones names list CHARACTER(LEN=256) :: phas = 'g' !--- Phases list: [g][l][s] INTEGER :: niso=0, nzon=0, nitr=0, npha=0!--- Number of isotopes, zones, total isotopes and phases INTEGER, ALLOCATABLE :: iTraPha(:,:) ! (iqiso) !--- Idx in "trac(1:niso)" = f(name(1:nitr)),phas) INTEGER, ALLOCATABLE :: iZonIso(:,:) ! (index_trac) !--- Idx in "trac(1:nitr)" = f(zone, name(1:niso)) END TYPE iso END MODULE trac_types_mod