Changeset 4363


Ignore:
Timestamp:
Dec 1, 2022, 6:56:48 PM (2 years ago)
Author:
dcugnet
Message:

Cleaning: remove unused variables

Location:
LMDZ6/trunk/libf/misc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/misc/readTracFiles_mod.f90

    r4358 r4363  
    185185  LOGICAL, OPTIONAL, INTENT(IN)  :: lRepr                            !--- Activate the HNNO3 exceptions for REPROBUS
    186186  CHARACTER(LEN=maxlen),  ALLOCATABLE :: s(:), sections(:), trac_files(:)
    187   CHARACTER(LEN=maxlen) :: str, fname, mesg, tname, pname, cname
     187  CHARACTER(LEN=maxlen) :: str, fname, tname, pname, cname
    188188  INTEGER               :: nsec, ierr, it, ntrac, ns, ip, ix, fType
    189   LOGICAL, ALLOCATABLE  :: ll(:), lGen3(:)
    190189  LOGICAL :: lRep
    191190  TYPE(keys_type), POINTER :: k
     
    194193  modname = 'readTracersFiles'
    195194  IF(.NOT.ALLOCATED(dBase)) ALLOCATE(dBase(0))
    196   lRep=0; IF(PRESENT(lRepr)) lRep = lRepr
     195  lRep=.FALSE.; IF(PRESENT(lRepr)) lRep = lRepr
    197196
    198197  !--- Required sections + corresponding files names (new style single section case) for tests
     
    338337  INTEGER,  ALLOCATABLE :: ndb(:)                                    !--- Number of sections for each file
    339338  INTEGER,  ALLOCATABLE :: ixf(:)                                    !--- File index for each section of the expanded list
    340   LOGICAL,  ALLOCATABLE :: lTg(:)                                    !--- Tagging tracers mask
    341339  CHARACTER(LEN=maxlen) :: fnm, snm
    342340  INTEGER               :: idb, i
     
    378376  CHARACTER(LEN=maxlen), ALLOCATABLE :: sec(:)
    379377  INTEGER,               ALLOCATABLE ::  ix(:)
    380   INTEGER :: n0, idb, ndb, i, j
     378  INTEGER :: n0, idb, ndb
    381379  LOGICAL :: ll
    382380!------------------------------------------------------------------------------------------------------------------------------
     
    512510  TYPE(trac_type),       ALLOCATABLE :: ttr(:)
    513511  CHARACTER(LEN=maxlen), ALLOCATABLE :: ta(:), pa(:)
    514   CHARACTER(LEN=maxlen) :: msg1, modname, tname, cname , pname
    515   INTEGER :: it, nt, iq, nq, jq, itr, ntr, ipr, npr, i
     512  CHARACTER(LEN=maxlen) :: msg1, modname
     513  INTEGER :: it, nt, iq, nq, itr, ntr, ipr, npr
    516514  LOGICAL :: ll
    517515  modname = 'expandSection'
     
    686684  INTEGER,   ALLOCATABLE ::  i0(:)
    687685  CHARACTER(LEN=maxlen)  :: nam, pha, tname
    688   CHARACTER(LEN=maxlen), allocatable :: ph(:)
    689686  CHARACTER(LEN=1) :: p
    690687  INTEGER :: ip, np, iq, jq, nq, it, nt, nc, i, n
     
    756753  INTEGER,         ALLOCATABLE        :: iy(:), iz(:)
    757754  INTEGER                             :: ig, ng, iq, jq, ip, nq, n, ix(SIZE(tr)), k
    758   INTEGER                             :: it
    759755!  tr2 is introduced in order to cope with a bug in gfortran 4.8.5 compiler
    760756!------------------------------------------------------------------------------------------------------------------------------
     
    869865  TYPE(dataBase_type),  TARGET, INTENT(IN)  :: sections(:)
    870866  TYPE(trac_type), ALLOCATABLE, INTENT(OUT) ::       tr(:)
    871   TYPE(trac_type), POINTER     :: t1(:), t2(:)
     867  TYPE(trac_type), POINTER     :: t(:)
    872868  INTEGER,   ALLOCATABLE :: nt(:)
    873869  CHARACTER(LEN=maxlen)  :: tnam, tnam_new
     
    880876  DO is=1, nsec                                                      !=== LOOP ON SECTIONS
    881877  !----------------------------------------------------------------------------------------------------------------------------
    882     t1 => sections(is)%trac(:)
     878    t => sections(is)%trac(:)
    883879    !--------------------------------------------------------------------------------------------------------------------------
    884880    DO iq=1, nt(is)                                                  !=== LOOP ON TRACERS
    885881    !--------------------------------------------------------------------------------------------------------------------------
    886       tnam = TRIM(t1(iq)%name)                                       !--- Original name
    887       IF(COUNT(t1%name == tnam) == 1) CYCLE                          !--- Current tracer is not duplicated: finished
     882      tnam = TRIM(t(iq)%name)                                        !--- Original name
     883      IF(COUNT(t%name == tnam) == 1) CYCLE                           !--- Current tracer is not duplicated: finished
    888884      tnam_new = TRIM(tnam)//'_'//TRIM(sections(is)%name)            !--- Same with section extension
    889885      nq = SUM(nt(1:is-1))                                           !--- Number of tracers in previous sections
     
    999995SUBROUTINE indexUpdate(tr)
    1000996  TYPE(trac_type), INTENT(INOUT) :: tr(:)
    1001   INTEGER :: iq, ig, ng, igen, ngen, ix(SIZE(tr))
     997  INTEGER :: iq, ig, igen, ngen, ix(SIZE(tr))
    1002998  tr(:)%iqParent = strIdx( tr(:)%name, tr(:)%parent )                !--- Parent index
    1003999  DO iq = 1, SIZE(tr); CALL addKey_1('iqParent', int2str(tr(iq)%iqParent), tr(iq)%keys); END DO
     
    10391035  CHARACTER(LEN=*),        INTENT(IN)    :: fnam                     !--- Input file name
    10401036  TYPE(isot_type), TARGET, INTENT(INOUT) :: isot(:)                  !--- Isotopes descriptors (field %parent must be defined!)
    1041   INTEGER :: ik, is, it, idb, nk0, i, iis
    1042   INTEGER :: nk, ns, nt, ndb, nb0, i0
    1043   CHARACTER(LEN=maxlen), POINTER     :: k(:), v(:), k0(:), v0(:)
     1037  INTEGER :: is, iis, it, idb, ndb, nb0
    10441038  CHARACTER(LEN=maxlen), ALLOCATABLE :: vals(:)
    1045   CHARACTER(LEN=maxlen)              :: val, modname
    1046   TYPE(keys_type),           POINTER ::   ky(:)
     1039  CHARACTER(LEN=maxlen)              :: modname
    10471040  TYPE(trac_type),           POINTER ::   tt(:), t
    10481041  TYPE(dataBase_type),   ALLOCATABLE ::  tdb(:)
     
    14891482!------------------------------------------------------------------------------------------------------------------------------
    14901483  TYPE(keys_type), POINTER ::  keys(:)
    1491   LOGICAL :: lk, lt, li, ll
     1484  LOGICAL :: lk, lt, li
    14921485  INTEGER :: iq, nq
    14931486
     
    15741567    IF(test(fmsg('key "'//TRIM(keyn)//'" of tracer "'//TRIM(names(iq))//'" is not an integer', modname, ierr/=0), lerr)) RETURN
    15751568  END DO
     1569  IF(PRESENT(nam)) nam = names(:)
    15761570END FUNCTION getKeyByName_im
    15771571!==============================================================================================================================
     
    16641658!------------------------------------------------------------------------------------------------------------------------------
    16651659  CHARACTER(LEN=maxlen) :: sval
    1666   INTEGER :: ierr
    16671660  lerr = getKeyByName_s1(keyn, sval, tname, ky)
    16681661  IF(test(fmsg('key "'//TRIM(keyn)//'" or tracer "'//TRIM(tname)//'" is missing', modname, lerr), lerr)) RETURN
     
    16781671!------------------------------------------------------------------------------------------------------------------------------
    16791672  CHARACTER(LEN=maxlen), ALLOCATABLE :: sval(:)
    1680   INTEGER :: ierr, iq, nq
     1673  INTEGER :: iq, nq
    16811674  IF(test(getKeyByName_s1m(keyn, sval, tname, ky), lerr)) RETURN
    16821675  nq = SIZE(sval); ALLOCATE(val(nq))
     
    16931686!------------------------------------------------------------------------------------------------------------------------------
    16941687  CHARACTER(LEN=maxlen), ALLOCATABLE :: sval(:)
    1695   INTEGER :: ierr, iq, nq
     1688  INTEGER :: iq, nq
    16961689  IF(test(getKeyByName_sm(keyn, sval, tname, ky, nam), lerr)) RETURN
    16971690  nq = SIZE(sval); ALLOCATE(val(nq))
     
    17071700!------------------------------------------------------------------------------------------------------------------------------
    17081701  CHARACTER(LEN=maxlen), ALLOCATABLE :: sval(:)
    1709   INTEGER :: ierr, iq, nq
     1702  INTEGER :: iq, nq
    17101703  IF(test(getKey_sm(keyn, sval, ky, nam), lerr)) RETURN
    17111704  nq = SIZE(sval); ALLOCATE(val(nq))
     
    18881881  INTEGER, OPTIONAL, INTENT(OUT) :: iPhase
    18891882!------------------------------------------------------------------------------------------------------------------------------
    1890   CHARACTER(LEN=maxlen), ALLOCATABLE :: tmp(:)
    18911883  INTEGER :: ix, ip
    18921884  CHARACTER(LEN=maxlen) :: var
  • LMDZ6/trunk/libf/misc/strings_mod.F90

    r4358 r4363  
    4949SUBROUTINE init_printout(lunout_, prt_level_)
    5050  INTEGER, INTENT(IN) :: lunout_, prt_level_
    51   lunout = lunout_
     51  lunout    = lunout_
     52  prt_level = prt_level_
    5253END SUBROUTINE init_printout
    5354!==============================================================================================================================
     
    457458  LOGICAL, OPTIONAL, INTENT(IN)  :: lSc                              !--- Care about nbs with front sign or in scient. notation
    458459!------------------------------------------------------------------------------------------------------------------------------
    459   INTEGER               :: idx0                                      !--- Used to display an identified non-numeric string
    460   INTEGER, ALLOCATABLE  :: ii(:)
    461   LOGICAL               :: ll, ls
    462   CHARACTER(LEN=maxlen) :: d
     460  INTEGER :: idx0                                                    !--- Used to display an identified non-numeric string
    463461  lerr = .FALSE.
    464462  idx = strIdx1(rawList, del, ibeg, idel)                            !--- idx/=0: del(idel) is at position "idx" in "rawList"
     
    681679  LOGICAL, OPTIONAL, INTENT(IN)    :: lsurr      !--- TRUE => key must be surrounded by special characters to be substituted
    682680!------------------------------------------------------------------------------------------------------------------------------
    683   CHARACTER(LEN=1024) :: s, t
    684681  INTEGER :: i0, ix, nk, ns
    685682  LOGICAL :: lsur, lb, le
     
    11811178  CHARACTER(LEN=maxlen)                   :: mes, sub, fm='(f12.9)', prf
    11821179  CHARACTER(LEN=maxlen),      ALLOCATABLE :: ttl(:), vnm(:)
    1183   LOGICAL,                    ALLOCATABLE :: m(:)
    11841180  INTEGER,                    ALLOCATABLE :: ki(:), kj(:), kl(:)
    1185   INTEGER                                 :: i, j, k, rk, ib, ie, itr, nm, nv, unt, nRmx, nCmx, nHd, rk1
     1181  INTEGER                                 :: i, j, k, rk, nv, unt, nRmx, nCmx, nHd
    11861182  REAL,                       ALLOCATABLE :: val(:,:)
    11871183
     
    11991195  lerr= SIZE(a,1) /= PRODUCT(n); IF(fmsg('profile "n" does not match "a" and "ll"', sub, lerr, unt)) RETURN
    12001196
    1201   SELECT CASE(rk1)                                                   !--- Indices list
     1197  SELECT CASE(rk)                                                   !--- Indices list
    12021198    CASE(0); IF(ll(1)) THEN; WRITE(unt,'(a,", ",a," = ",2f12.9)')TRIM(vnm(1)),TRIM(vnm(2)),a(1,1),a(1,2); RETURN; END IF
    12031199    CASE(1); ki = [  (i,i=1,n(1)) ]
Note: See TracChangeset for help on using the changeset viewer.