Changeset 5756 for LMDZ6/trunk/libf/phylmd
- Timestamp:
- Jul 3, 2025, 3:25:59 PM (3 days ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/infotrac_phy.F90
r5748 r5756 3 3 MODULE infotrac_phy 4 4 5 USE strings_mod, ONLY: msg, maxlen, cat, dispTable, num2str, strStack, strParse, strCount, strIdx 5 USE strings_mod, ONLY: msg, maxlen, cat, dispTable, num2str, strStack, strParse, strCount, strIdx, maxTableWidth 6 6 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, tracers, addPhase, addKey, iH2O, & 7 7 isoSelect, indexUpdate, isot_type, testTracersFiles, isotope, delPhase, getKey, tran0, & 8 8 isoKeys, isoName, isoZone, isoPhas, processIsotopes, isoCheck, itZonIso, nbIso, & 9 niso, ntiso, nzone, nphas, maxTableWidth,iqIsoPha, iqWIsoPha, ixIso, new2oldH2O9 niso, ntiso, nzone, nphas, isoF=>isoFamilies,iqIsoPha, iqWIsoPha, ixIso, new2oldH2O 10 10 IMPLICIT NONE 11 11 … … 24 24 !=== FOR ISOTOPES: General 25 25 PUBLIC :: isot_type, nbIso !--- Derived type, full isotopes families database + nb of families 26 PUBLIC :: isoSelect, ixIso 26 PUBLIC :: isoSelect, ixIso, isoFamilies !--- Isotopes family selection tool + selected family index 27 27 !=== FOR ISOTOPES: Specific to water 28 28 PUBLIC :: iH2O !--- Value of "ixIso" for "H2O" isotopes class … … 84 84 ! | iso_iName | Isotope name index in isotopes(iso_iGroup)%trac(:) | iso_indnum | 1:niso | 85 85 ! | iso_iZone | Isotope zone index in isotopes(iso_iGroup)%zone(:) | zone_num | 1:nzone | 86 ! | iso_iPhas 86 ! | iso_iPhase | Isotope phase index in isotopes(iso_iGroup)%phas(:) | phase_num | 1:nphas | 87 87 ! +-------------+------------------------------------------------------+-------------+------------------------+ 88 88 ! … … 106 106 !$OMP THREADPRIVATE(ivap, iliq, isol, ibs, icf, irvc) 107 107 108 !=== DIMENSIONS OF THE TRACERS TABLES AND OTHER SCALAR VARIABLES108 !=== DIMENSIONS OF THE TRACERS TABLES, TRACERS TYPE(S) 109 109 INTEGER, SAVE :: nqtot !--- Tracers nb in dynamics (incl. higher moments + H2O) 110 110 INTEGER, SAVE :: nbtr !--- Tracers nb in physics (excl. higher moments + H2O) … … 118 118 INTEGER, SAVE, ALLOCATABLE :: conv_flg(:), pbl_flg(:) !--- Convection / boundary layer activation (nbtr) 119 119 !$OMP THREADPRIVATE(conv_flg, pbl_flg) 120 121 !=== LIST OF DEFINED ISOTOPES FAMILIES 122 CHARACTER(LEN=maxlen), SAVE, ALLOCATABLE :: isoFamilies(:) !--- Generation 0 tracer name for each isotopes family (nbIso) 123 !$OMP THREADPRIVATE(isoFamilies) 120 124 121 125 !=== SPECIFIC TO STRATOSPHERIC AEROSOLS (CK/OB) … … 167 171 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 168 172 INTEGER :: iad !--- Advection scheme number 169 INTEGER :: iq, jq, nt, im, nm!--- Indexes and temporary variables173 INTEGER :: iq, jq, it, nt, im, nm !--- Indexes and temporary variables 170 174 LOGICAL :: lerr, lInit 171 175 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) … … 294 298 IF(iad == -1) CALL abort_physic(modname, msg1, 1) 295 299 296 !--- SET FIELDS longName ,isInPhysics300 !--- SET FIELDS longName AND isInPhysics 297 301 t1%longName = t1%name; IF(iad > 0) t1%longName=TRIM(t1%name)//descrq(iad) 298 302 t1%isInPhysics= iad >= 0 .AND. (delPhase(t1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz') … … 315 319 CALL MOVE_ALLOC(FROM=ttr, TO=tracers) 316 320 317 !--- SET FIELDS iqParent, iqDescen, nqDescen, nqChildren , iGeneration321 !--- SET FIELDS iqParent, iqDescen, nqDescen, nqChildren 318 322 IF(indexUpdate(tracers)) CALL abort_physic(modname, 'problem with tracers indices update', 1) 319 323 320 !=== READ PHYSICAL PARAMETERS FOR ISOTOPES 321 niso = 0; nzone = 0; nphas = nqo; ntiso = 0; isoCheck = .FALSE. 324 !=== DETERMINE ISOTOPES RELATED PARAMETERS ; DEFINE THE EXPLICIT KEYS iso_i* 322 325 IF(processIsotopes()) CALL abort_physic(modname, 'Problem when processing isotopes parameters', 1) 326 iH2O = -1 327 IF(nbIso /= 0) THEN 328 IF(isoSelect('H2O', .TRUE.)) THEN 329 IF(isoSelect(1, .TRUE.)) CALL abort_physic(modname, "Can't select the first isotopes family", 1) 330 ELSE 331 iH2O = ixIso; CALL getin_p('ok_iso_verif', isotope%check) 332 END IF 333 END IF 323 334 324 335 !############################################################################################################################## … … 326 337 !############################################################################################################################## 327 338 DO iq = 1, nqtrue 328 t1 => tracers(iq)329 339 IF(hadv(iq) == vadv(iq) ) iad = hadv(iq) 330 340 IF(hadv(iq)==10 .AND. vadv(iq)==16) iad = 11 331 tracers(iq)%isInPhysics= iad >= 0 .AND. (delPhase(t 1%gen0Name) /= 'H2O' .OR. t1%component /= 'lmdz')341 tracers(iq)%isInPhysics= iad >= 0 .AND. (delPhase(tracers(iq)%gen0Name) /= 'H2O' .OR. tracers(iq)%component /= 'lmdz') 332 342 END DO 333 !############################################################################################################################## 334 END IF 335 !############################################################################################################################## 343 tracers(nqtrue+1:nqtot)%isInPhysics = .FALSE. 344 !############################################################################################################################## 345 END IF 346 !############################################################################################################################## 347 isoFamilies = isoF(:) 336 348 337 349 !--- Convection / boundary layer activation for all tracers … … 377 389 IF(dispTable('issssssssiiiiiiii', ['iq ', 'name', 'lNam', 'g0Nm', 'prnt', 'type', 'phas', 'comp', & 378 390 'isPh', 'iGen', 'iqPr', 'nqDe', 'nqCh', 'iGrp', 'iNam', 'iZon', 'iPha'], & 379 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, num2str(t%isInPhysics)),&391 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, t%component, num2str(t%isInPhysics)),& 380 392 cat([(iq, iq=1, nqtot)], t%iGeneration, t%iqParent, t%nqDescen, t%nqChildren, t%iso_iGroup, & 381 393 t%iso_iName, t%iso_iZone, t%iso_iPhase), nColMax=maxTableWidth, nHead=2, sub=modname)) & … … 383 395 CALL msg('No isotopes identified.', modname, nbIso == 0) 384 396 IF(nbIso == 0) RETURN 385 CALL msg('For isotopes family "H2O":', modname) 386 CALL msg(' isoKeys%name = '//strStack(isoKeys%name), modname) 387 CALL msg(' isoName = '//strStack(isoName), modname) 388 CALL msg(' isoZone = '//strStack(isoZone), modname) 389 CALL msg(' isoPhas = '//TRIM(isoPhas), modname) 397 DO it = 1, nbIso 398 IF(isoSelect(it, .TRUE.)) CALL abort_physic(modname, 'Problem when selecting isotopes class', 1) 399 CALL msg('For isotopes family "'//TRIM(isoFamilies(it))//'":', modname) 400 CALL msg(' isoKeys%name = '//strStack(isoKeys%name), modname) 401 CALL msg(' isoName = '//strStack(isoName), modname) 402 CALL msg(' isoZone = '//strStack(isoZone), modname) 403 CALL msg(' isoPhas = '//TRIM(isoPhas), modname) 404 END DO 405 IF(isoSelect(iH2O, .TRUE.)) lerr = isoSelect(1, .TRUE.) 390 406 391 407 IF(CPPKEY_STRATAER .AND. type_trac == 'coag') THEN
Note: See TracChangeset
for help on using the changeset viewer.