Changeset 5756 for LMDZ6/trunk/libf/dyn3d_common
- Timestamp:
- Jul 3, 2025, 3:25:59 PM (5 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d_common/infotrac.f90
r5748 r5756 3 3 MODULE infotrac 4 4 5 USE strings_mod, ONLY: msg, maxlen, cat, dispTable, num2str, strStack, strParse, strCount, strIdx6 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, addPhase, addKey, iH2O, &7 isoSelect, indexUpdate, isot_type, testTracersFiles, isotope, delPhase, getKey, tran0, &8 isoKeys, isoName, isoZone, isoPhas, processIsotopes, isoCheck, itZonIso, nbIso, 9 niso, ntiso, nzone, nphas, maxTableWidth, iqIsoPha, iqWIsoPha, ixIso, new2oldH2O, newHNO3, oldHNO35 USE strings_mod, ONLY: msg, maxlen, cat, dispTable, num2str, strStack, strParse, strCount, strIdx, maxTableWidth 6 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, addPhase, addKey, iH2O, & 7 isoSelect, indexUpdate, isot_type, testTracersFiles, isotope, delPhase, getKey, tran0, & 8 isoKeys, isoName, isoZone, isoPhas, processIsotopes, isoCheck, itZonIso, nbIso, newHNO3, & 9 niso, ntiso, nzone, nphas, isoF=>isoFamilies,iqIsoPha, iqWIsoPha, ixIso, oldHNO3, new2oldH2O 10 10 IMPLICIT NONE 11 11 … … 22 22 !=== FOR ISOTOPES: General 23 23 PUBLIC :: isot_type, nbIso !--- Derived type, full isotopes families database + nb of families 24 PUBLIC :: isoSelect, ixIso !--- Isotopes familyselection tool + selected family index24 PUBLIC :: isoSelect, ixIso, isoFamilies !--- Isotopes families selection tool + selected family index 25 25 !=== FOR ISOTOPES: Specific to water 26 26 PUBLIC :: iH2O !--- Value of "ixIso" for "H2O" isotopes class … … 81 81 ! | iso_iName | Isotope name index in isotopes(iso_iGroup)%trac(:) | iso_indnum | 1:niso | 82 82 ! | iso_iZone | Isotope zone index in isotopes(iso_iGroup)%zone(:) | zone_num | 1:nzone | 83 ! | iso_iPhas 83 ! | iso_iPhase | Isotope phase index in isotopes(iso_iGroup)%phas(:) | phase_num | 1:nphas | 84 84 ! +-------------+------------------------------------------------------+-------------+------------------------+ 85 85 ! … … 98 98 ! +-----------------+--------------------------------------------------+--------------------+-----------------+ 99 99 100 !=== THRESHOLDS FOR WATER 100 101 REAL, PARAMETER :: min_qParent = 1.e-30, min_qMass = 1.e-18, min_ratio = 1.e-16 ! MVals et CRisi 101 102 102 !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES103 !=== DIMENSIONS OF THE TRACERS TABLES, TRACERS TYPE(S) 103 104 INTEGER, SAVE :: nqtot !--- Tracers nb in dynamics (incl. higher moments + H2O) 104 105 INTEGER, SAVE :: nbtr !--- Tracers nb in physics (excl. higher moments + H2O) … … 111 112 INTEGER, SAVE, ALLOCATABLE :: conv_flg(:), pbl_flg(:) !--- Convection / boundary layer activation (nbtr) 112 113 114 !=== LIST OF DEFINED ISOTOPES FAMILIES 115 CHARACTER(LEN=maxlen), SAVE, ALLOCATABLE :: isoFamilies(:) !--- Generation 0 tracer name for each isotopes family (nbIso) 116 113 117 CONTAINS 114 118 … … 116 120 USE iniprint_mod_h 117 121 USE control_mod, ONLY: planet_type 122 USE ioipsl, ONLY: getin 118 123 USE lmdz_reprobus_wrappers, ONLY: Init_chem_rep_trac 119 124 USE lmdz_cppkeys_wrapper, ONLY: CPPKEY_INCA, CPPKEY_REPROBUS, CPPKEY_STRATAER 120 125 USE dimensions_mod, ONLY: iim, jjm, llm, ndm 121 IMPLICIT NONE126 IMPLICIT NONE 122 127 !============================================================================================================================== 123 128 ! … … 152 157 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 153 158 INTEGER :: iad !--- Advection scheme number 154 INTEGER :: iq, jq, nt, im, nm, ig!--- Indexes and temporary variables159 INTEGER :: iq, jq, it, nt, im, nm, ig !--- Indexes and temporary variables 155 160 LOGICAL :: lerr 156 161 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) … … 284 289 IF(iad == -1) CALL abort_gcm(modname, msg1, 1) 285 290 286 !--- SET FIELDS longName andiadv291 !--- SET FIELDS longName AND iadv 287 292 t1%longName = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad) 288 293 t1%iadv = iad … … 329 334 END DO 330 335 331 !=== READ PHYSICAL PARAMETERS FOR ISOTOPES ; DONE HERE BECAUSE dynetat0 AND iniacademic NEED "tnat" AND "alpha_ideal" 332 niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE. 336 !=== DETERMINE ISOTOPES RELATED PARAMETERS ; DEFINE THE EXPLICIT KEYS iso_i* 333 337 IF(processIsotopes()) CALL abort_gcm(modname, 'problem when processing isotopes parameters', 1) 338 iH2O = -1 339 IF(nbIso /= 0) THEN 340 IF(isoSelect('H2O', .TRUE.)) THEN 341 IF(isoSelect(1, .TRUE.)) CALL abort_physic(modname, "Can't select the first isotopes family", 1) 342 ELSE 343 iH2O = ixIso; CALL getin('ok_iso_verif', isotope%check) 344 END IF 345 END IF 346 isoFamilies = isoF(:) 334 347 335 348 !--- Convection / boundary layer activation for all tracers … … 362 375 CALL msg('No isotopes identified.', modname, nbIso == 0) 363 376 IF(nbIso == 0) RETURN 364 CALL msg('For isotopes family "H2O":', modname) 365 CALL msg(' isoKeys%name = '//strStack(isoKeys%name), modname) 366 CALL msg(' isoName = '//strStack(isoName), modname) 367 CALL msg(' isoZone = '//strStack(isoZone), modname) 368 CALL msg(' isoPhas = '//TRIM(isoPhas), modname) 377 DO it = 1, nbIso 378 IF(isoSelect(it, .TRUE.)) CALL abort_physic(modname, 'Problem when selecting isotopes class', 1) 379 CALL msg('For isotopes family "'//TRIM(isoFamilies(it))//'":', modname) 380 CALL msg(' isoKeys%name = '//strStack(isoKeys%name), modname) 381 CALL msg(' isoName = '//strStack(isoName), modname) 382 CALL msg(' isoZone = '//strStack(isoZone), modname) 383 CALL msg(' isoPhas = '//TRIM(isoPhas), modname) 384 END DO 385 IF(isoSelect(iH2O, .TRUE.)) lerr = isoSelect(1, .TRUE.) 369 386 370 387 END SUBROUTINE init_infotrac
Note: See TracChangeset
for help on using the changeset viewer.