Changeset 4064 for LMDZ6/trunk/libf/dyn3d_common
- Timestamp:
- Jan 25, 2022, 7:14:39 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r4063 r4064 1 ! 1 !$Id$ 2 2 ! 3 3 MODULE infotrac 4 4 5 USE strings_mod, ONLY: msg, find, strIdx, strFind, strParse, dispTable, int2str, reduceExpr,&6 fmsg, test, strTail, strHead, strStack, strReduce, maxlen, testFile, cat5 USE strings_mod, ONLY: msg, find, strIdx, strFind, strParse, dispTable, int2str, reduceExpr, & 6 cat, fmsg, test, strTail, strHead, strStack, strReduce, bool2str, maxlen, testFile 7 7 USE readTracFiles_mod, ONLY: trac_type, readTracersFiles, addPhase, phases_sep, nphases, ancestor, & 8 8 isot_type, readIsotopesFile, delPhase, old_phases, getKey_init, tran0, & … … 140 140 !--- Aliases for older names 141 141 INTEGER, POINTER, SAVE :: ntraciso, ntraceurs_zone 142 REAL, POINTER,SAVE :: qperemin, masseqmin, ratiomin142 REAL, SAVE :: qperemin, masseqmin, ratiomin 143 143 144 144 ! CRisi: cas particulier des isotopes … … 189 189 !------------------------------------------------------------------------------------------------------------------------------ 190 190 ! Local variables 191 INTEGER, ALLOCATABLE :: & 192 hadv(:), had(:), hadv_inca(:), conv_flg_inca(:), & !--- Horizontal/vertical transport scheme number 193 vadv(:), vad(:), vadv_inca(:), pbl_flg_inca(:) !--- + specific variables for INCA 191 INTEGER, ALLOCATABLE :: hadv(:), vadv(:) !--- Horizontal/vertical transport scheme number 192 #ifdef INCA 193 INTEGER, ALLOCATABLE :: had (:), hadv_inca(:), conv_flg_inca(:), &!--- Variables specific to INCA 194 vad (:), vadv_inca(:), pbl_flg_inca(:) 194 195 CHARACTER(LEN=8), ALLOCATABLE :: solsym_inca(:) !--- Tracers names for INCA 196 INTEGER :: nqINCA 197 #endif 195 198 CHARACTER(LEN=2) :: suff(9) !--- Suffixes for schemes of order 3 or 4 (Prather) 196 199 CHARACTER(LEN=3) :: descrq(30) !--- Advection scheme description tags 197 CHARACTER(LEN=maxlen) :: oldH2O, newH2O !--- Old and new water names 198 CHARACTER(LEN=maxlen) :: msg1, msg2 !--- Strings for messages 200 CHARACTER(LEN=maxlen) :: msg1 !--- String for messages 199 201 CHARACTER(LEN=maxlen), ALLOCATABLE :: str(:) !--- Temporary storage 200 202 INTEGER :: fType !--- Tracers description file type ; 0: none … … 206 208 CHARACTER(LEN=1) :: p 207 209 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 208 TYPE(trac_type), POINTER :: t1, t p, t(:)210 TYPE(trac_type), POINTER :: t1, t(:) 209 211 TYPE(isot_type), POINTER :: iso 210 212 211 213 CHARACTER(LEN=maxlen), ALLOCATABLE :: tnom_0(:), tnom_transp(:) !--- Tracer short name + transporting fluid name 212 214 CHARACTER(LEN=maxlen) :: tchaine 213 INTEGER :: ierr , nqINCA215 INTEGER :: ierr 214 216 LOGICAL :: lINCA 215 217 … … 523 525 IF(iad == 20) nm = 3 !--- 2nd order scheme 524 526 IF(iad == 30) nm = 9 !--- 3rd order scheme 527 IF(nm == 0) CYCLE !--- No higher moments 525 528 ttr(jq+1:jq+nm) = t1 526 529 ttr(jq+1:jq+nm)%name = [(TRIM(t1%name) //'-'//TRIM(suff(im)), im=1, nm) ] … … 564 567 565 568 CALL infotrac_setHeredity !--- SET FIELDS %iqParent, %nqChilds, %iGeneration, %gen0Name, %iqDescen, %nqDescen 566 CALL infotrac_isoinit (tnom_0, nqtrue)!--- SET FIELDS %type, %iso_iName, %iso_iZone, %iso_iPhase569 CALL infotrac_isoinit !--- SET FIELDS %type, %iso_iName, %iso_iZone, %iso_iPhase 567 570 CALL getKey_init(tracers, isotopes) 568 571 IF(isoSelect('H2O')) RETURN !--- Select water isotopes ; finished if no water isotopes … … 579 582 580 583 !--- Finalize : 581 DEALLOCATE(tnom_0, hadv, vadv,tnom_transp)584 DEALLOCATE(tnom_0, tnom_transp) 582 585 583 586 ELSE … … 618 621 t => tracers 619 622 CALL msg('Information stored in infotrac :') 620 IF(dispTable('issssiii', ['iq ', 'name ', 'longName', 'gen0Name', 'parent ', 'iadv ', 'iqParent', 'iGenerat'], & 621 cat(t%name, t%longName, t%gen0Name, t%parent), cat([(iq, iq=1, nqtot)], t%iadv, t%iqParent, t%iGeneration))) & 623 IF(dispTable('isssssssssiiiiiiiii', & 624 ['iq ', 'name ', 'longN. ', 'gen0N. ', 'parent ', 'type ', 'phase ', 'compon. ', 'isAdv. ', 'isH2O. '& 625 ,'iadv ', 'iGen. ', 'iqPar. ', 'nqDes. ', 'nqChil. ', 'iso_iG. ', 'iso_iN. ', 'iso_iZ. ', 'iso_iP. '], & 626 cat(t%name, t%longName, t%gen0Name, t%parent, t%type, t%phase, & 627 t%component, bool2str(t%isAdvected), bool2str(t%isH2Ofamily)), & 628 cat([(iq, iq=1, nqtot)], t%iadv, t%iGeneration, t%iqParent, t%nqDescen, & 629 t%nqChilds, t%iso_iGroup, t%iso_iName, t%iso_iZone, t%iso_iPhase))) & 622 630 CALL abort_gcm(modname, "problem with the tracers table content", 1) 623 631 624 632 !--- Some aliases to be removed later 625 ntraciso => iso %ntiso626 ntraceurs_zone => iso %nzone633 ntraciso => isotope%ntiso 634 ntraceurs_zone => isotope%nzone 627 635 qperemin = min_qParent 628 636 masseqmin = min_qMass … … 664 672 CALL msg('nqChilds = '//strStack(int2str(tracers(:)%nqChilds)), modname) 665 673 CALL msg('iqParent = '//strStack(int2str(tracers(:)%iqParent)), modname) 666 WRITE(lunout,*)TRIM(modname)//': iqfils = ',iqfils674 CALL msg('iqChilds = '//strStack(int2str(PACK(iqfils,MASK=.TRUE.))),modname) 667 675 668 676 !=== SET FIELDS %iGeneration, %iqDescen, %nqDescen … … 686 694 CALL msg('nqDescen = '//TRIM(strStack(int2str(tracers(:)%nqDescen))), modname) 687 695 CALL msg('nqDescen_tot = ' //TRIM(int2str(SUM(tracers(:)%nqDescen))), modname) 688 WRITE(lunout,*)TRIM(modname)//': iqfils = ',iqfils696 CALL msg('iqChilds = '//strStack(int2str(PACK(iqfils, MASK=.TRUE.))), modname) 689 697 690 698 END SUBROUTINE infotrac_setHeredity … … 692 700 693 701 694 SUBROUTINE infotrac_isoinit (tnom_0, nqtrue)702 SUBROUTINE infotrac_isoinit 695 703 696 704 #ifdef CPP_IOIPSL … … 700 708 #endif 701 709 IMPLICIT NONE 702 INTEGER, INTENT(IN) :: nqtrue703 CHARACTER(LEN=*), INTENT(IN) :: tnom_0(nqtrue)704 710 CHARACTER(LEN=3) :: tnom_iso(niso_possibles) 705 711 INTEGER, ALLOCATABLE :: nb_iso(:,:), nb_traciso(:,:) 706 INTEGER :: ii, ip, iq, it, iz, ixt, n , nb_isoind, nzone_prec712 INTEGER :: ii, ip, iq, it, iz, ixt, nb_isoind, nzone_prec 707 713 TYPE(isot_type), POINTER :: i 708 714 TYPE(trac_type), POINTER :: t(:) 709 CHARACTER(LEN=1) :: p710 715 CHARACTER(LEN=maxlen) :: tnom_trac 711 716 CHARACTER(LEN=maxlen), ALLOCATABLE :: str(:) … … 718 723 ALLOCATE(indnum_fn_num(niso_possibles)) 719 724 ALLOCATE(iso_indnum(nqtot)) 720 725 721 726 iso_indnum (:) = 0 722 727 use_iso (:) = .FALSE.
Note: See TracChangeset
for help on using the changeset viewer.