[2320] | 1 | |
---|
| 2 | ! $Id: $ |
---|
| 3 | |
---|
| 4 | MODULE infotrac_phy |
---|
| 5 | |
---|
[4244] | 6 | USE strings_mod, ONLY: maxlen |
---|
[4729] | 7 | ! PUBLIC :: tracers, type_trac !--- Full tracers database, tracers type keyword |
---|
| 8 | ! PUBLIC :: nqtot, nbtr, nqo, nqCO2, nqtottr !--- Main dimensions |
---|
| 9 | INTEGER,SAVE :: nqtot, nbtr, nqo, nqCO2, nqtottr !--- Main dimensions |
---|
| 10 | INTEGER,SAVE :: niso,ntiso |
---|
| 11 | CHARACTER(LEN=maxlen), SAVE :: type_trac !--- Keyword for tracers type(s) |
---|
[2320] | 12 | |
---|
[4729] | 13 | TYPE :: keys_type !=== TYPE FOR A SET OF KEYS ASSOCIATED TO AN ELEMENT |
---|
| 14 | CHARACTER(LEN=maxlen) :: name !--- Tracer name |
---|
| 15 | CHARACTER(LEN=maxlen), ALLOCATABLE :: key(:) !--- Keys string list |
---|
| 16 | CHARACTER(LEN=maxlen), ALLOCATABLE :: val(:) !--- Corresponding values string list |
---|
| 17 | END TYPE keys_type |
---|
| 18 | |
---|
| 19 | TYPE :: trac_type !=== TYPE FOR A SINGLE TRACER NAMED "name" |
---|
| 20 | CHARACTER(LEN=maxlen) :: name = '' !--- Name of the tracer |
---|
| 21 | CHARACTER(LEN=maxlen) :: gen0Name = '' !--- First generation ancestor name |
---|
| 22 | CHARACTER(LEN=maxlen) :: parent = '' !--- Parent name |
---|
| 23 | CHARACTER(LEN=maxlen) :: longName = '' !--- Long name (with advection scheme suffix) |
---|
| 24 | CHARACTER(LEN=maxlen) :: type = 'tracer' !--- Type (so far: 'tracer' / 'tag') |
---|
| 25 | CHARACTER(LEN=maxlen) :: phase = 'g' !--- Phase ('g'as / 'l'iquid / 's'olid) |
---|
| 26 | CHARACTER(LEN=maxlen) :: component = '' !--- Coma-separated list of components (Ex: lmdz,inca) |
---|
| 27 | INTEGER :: iGeneration = -1 !--- Generation number (>=0) |
---|
| 28 | INTEGER :: iqParent = 0 !--- Parent index |
---|
| 29 | INTEGER, ALLOCATABLE :: iqDescen(:) !--- Descendants index (in growing generation order) |
---|
| 30 | INTEGER :: nqDescen = 0 !--- Number of descendants (all generations) |
---|
| 31 | INTEGER :: nqChildren = 0 !--- Number of children (first generation) |
---|
| 32 | TYPE(keys_type) :: keys !--- <key>=<val> pairs vector |
---|
| 33 | INTEGER :: iadv = 10 !--- Advection scheme used |
---|
| 34 | LOGICAL :: isAdvected = .FALSE. !--- "true" tracers: iadv > 0. COUNT(isAdvected )=nqtrue |
---|
| 35 | LOGICAL :: isInPhysics = .TRUE. !--- "true" tracers: in tr_seri. COUNT(isInPhysics)=nqtottr |
---|
| 36 | INTEGER :: iso_iGroup = 0 !--- Isotopes group index in isotopes(:) |
---|
| 37 | INTEGER :: iso_iName = 0 !--- Isotope name index in isotopes(iso_iGroup)%trac(:) |
---|
| 38 | INTEGER :: iso_iZone = 0 !--- Isotope zone index in isotopes(iso_iGroup)%zone(:) |
---|
| 39 | INTEGER :: iso_iPhase = 0 !--- Isotope phase index in isotopes(iso_iGroup)%phase |
---|
| 40 | END TYPE trac_type |
---|
| 41 | |
---|
| 42 | TYPE(trac_type), ALLOCATABLE, TARGET, SAVE :: tracers(:) |
---|
| 43 | |
---|
| 44 | |
---|
| 45 | !$OMP THREADPRIVATE(nqtot, nbtr, nqo, nqtottr, nqCO2, type_trac) |
---|
| 46 | !$OMP THREADPRIVATE(niso,ntiso) |
---|
| 47 | !$OMP THREADPRIVATE(trac_type,tracers) |
---|
| 48 | |
---|
| 49 | |
---|
| 50 | |
---|
| 51 | |
---|
[2320] | 52 | CONTAINS |
---|
| 53 | |
---|
[4240] | 54 | SUBROUTINE init_infotrac_phy(nqtot_, type_trac_) |
---|
| 55 | IMPLICIT NONE |
---|
| 56 | INTEGER, INTENT(IN) :: nqtot_ |
---|
| 57 | CHARACTER(LEN=*), INTENT(IN) :: type_trac_ |
---|
[4244] | 58 | CHARACTER(LEN=maxlen) :: modname='init_infotrac_phy' |
---|
[2320] | 59 | |
---|
[4240] | 60 | nqtot = nqtot_ |
---|
| 61 | type_trac = type_trac_ |
---|
| 62 | |
---|
[2320] | 63 | END SUBROUTINE init_infotrac_phy |
---|
| 64 | |
---|
| 65 | END MODULE infotrac_phy |
---|