Changeset 5003 for LMDZ6


Ignore:
Timestamp:
Jul 1, 2024, 3:02:29 PM (5 months ago)
Author:
dcugnet
Message:
  • Modifiy some horzcat* routines: gfortran does not like empty arrays (ie with one null dimension) in arrays constructors (ifort does)
  • Remove unused variables
Location:
LMDZ6/trunk/libf
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dyn3d_common/infotrac.F90

    r5001 r5003  
    156156   INTEGER :: nqtrue                                                 !--- Tracers nb from tracer.def (no higher order moments)
    157157   INTEGER :: iad                                                    !--- Advection scheme number
    158    INTEGER :: ic, iq, jq, it, nt, im, nm, iz, k                      !--- Indexes and temporary variables
     158   INTEGER :: iq, jq, nt, im, nm                                     !--- Indexes and temporary variables
    159159   LOGICAL :: lerr, ll
    160    CHARACTER(LEN=1) :: p
    161160   TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:)
    162161   TYPE(trac_type), POINTER             :: t1, t(:)
    163    INTEGER :: ierr
    164162   CHARACTER(LEN=maxlen),   ALLOCATABLE :: types_trac(:)  !--- Keyword for tracers type(s), parsed version
    165163
     
    245243      ttr(1+nqo:nqCO2+nqo   )%component = 'co2i'
    246244      ttr(1+nqo+nqCO2:nqtrue)%component = 'inca'
    247       ttr(1+nqo      :nqtrue)%name      = [('CO2     ', k=1, nqCO2), solsym_inca]
     245      ttr(1+nqo      :nqtrue)%name      = [('CO2     ', iq=1, nqCO2), solsym_inca]
    248246      ttr(1+nqo+nqCO2:nqtrue)%parent    = tran0
    249247      ttr(1+nqo+nqCO2:nqtrue)%phase     = 'g'
  • LMDZ6/trunk/libf/misc/readTracFiles_mod.f90

    r5002 r5003  
    599599  INTEGER                            :: iq, jq, ig
    600600  CHARACTER(LEN=maxlen), ALLOCATABLE :: parent(:), name(:)
    601   CHARACTER(LEN=maxlen) :: gen0N
    602601!------------------------------------------------------------------------------------------------------------------------------
    603602  CHARACTER(LEN=maxlen) :: modname
     
    723722  INTEGER,               ALLOCATABLE ::  i0(:), iGen(:)
    724723  CHARACTER(LEN=maxlen), ALLOCATABLE :: tname(:), gen0N(:), phase(:), parents(:), dType(:)
    725   CHARACTER(LEN=maxlen)              ::  nam,     gen0Nm,   pha,      parent,      typ
     724  CHARACTER(LEN=maxlen)              ::  nam,     gen0Nm,   pha,      parent
    726725  CHARACTER(LEN=1) :: p
    727726  INTEGER :: ip, np, iq, jq, nq, it, nt, nc, i, n
     
    927926  TYPE(trac_type), ALLOCATABLE, INTENT(OUT) ::       tr(:)
    928927  LOGICAL,            OPTIONAL, INTENT(IN)  :: lRename               !--- .TRUE.: add a section suffix to identical names
    929   CHARACTER(LEN=maxlen)  :: tnam, tnam_new, modname
     928  CHARACTER(LEN=maxlen)  :: tnam_new, modname
    930929  CHARACTER(LEN=maxlen), ALLOCATABLE :: tname(:), parent(:), comp(:)
    931930  INTEGER :: iq, jq, is
     
    988987  CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: snam
    989988  INTEGER :: m
    990   CHARACTER(LEN=maxlen), ALLOCATABLE :: s0(:,:), n0(:)
     989  CHARACTER(LEN=maxlen), ALLOCATABLE :: n0(:)
    991990  CHARACTER(LEN=maxlen) :: nm
    992991  lerr = .FALSE.
     
    10611060  INTEGER,               ALLOCATABLE :: iqDescen(:), ix(:), iy(:)
    10621061  CHARACTER(LEN=maxlen), ALLOCATABLE :: tnames(:), parent(:)
    1063   INTEGER,       DIMENSION(SIZE(tr)) :: iqParent, iGen, nqChildren, nqDescen
     1062  INTEGER,       DIMENSION(SIZE(tr)) :: iqParent, iGen
    10641063  lerr = getKey('name',   tnames, tr%keys); IF(lerr) RETURN          !--- Names
    10651064  lerr = getKey('parent', parent, tr%keys); IF(lerr) RETURN          !--- Parents
     
    13211320!------------------------------------------------------------------------------------------------------------------------------
    13221321  INTEGER :: ix, it, ip, np, iz, nz, npha, nzon
    1323   CHARACTER(LEN=maxlen) :: s
    13241322  TYPE(isot_type), POINTER :: i
    13251323  DO ix = 1, nbIso
     
    18411839  LOGICAL,                  OPTIONAL, INTENT(IN)  :: lDisp
    18421840!------------------------------------------------------------------------------------------------------------------------------
    1843   CHARACTER(LEN=maxlen)              :: sval
    1844   CHARACTER(LEN=maxlen), ALLOCATABLE :: svals(:)
     1841  CHARACTER(LEN=maxlen) :: sval
    18451842  lerr = getKeyByIndex_sm11(keyn, sval, itr, ky, def, lDisp); IF(lerr) RETURN
    18461843  lerr = strParse(sval, ',', val)
     
    22952292  LOGICAL,                  OPTIONAL, INTENT(IN)  :: lDisp
    22962293!------------------------------------------------------------------------------------------------------------------------------
    2297   CHARACTER(LEN=maxlen)              :: sval
    2298   CHARACTER(LEN=maxlen), ALLOCATABLE :: svals(:)
     2294  CHARACTER(LEN=maxlen) :: sval
    22992295  lerr = getKeyByName_sm11(keyn, sval, tname, ky, def, lDisp); IF(lerr) RETURN
    23002296  lerr = strParse(sval, ',', val)
     
    24872483  LOGICAL,         OPTIONAL, INTENT(IN)  :: lDisp
    24882484!------------------------------------------------------------------------------------------------------------------------------
    2489   CHARACTER(LEN=maxlen) :: s, sval
     2485  CHARACTER(LEN=maxlen) :: s
    24902486  CHARACTER(LEN=maxlen), ALLOCATABLE :: svals(:)
    24912487  LOGICAL,               ALLOCATABLE ::    ll(:)
  • LMDZ6/trunk/libf/misc/strings_mod.F90

    r5001 r5003  
    621621  IF(PRESENT(vals)) CALL parseV(vals)                                !--- PARSE <key>=<val> PAIRS
    622622  IF(PRESENT(n)) n = nk                                              !--- RETURN THE NUMBER OF KEYS
    623   IF(PRESENT(vals)) &
    624 print*,'key ; val = '//TRIM(strStack(keys))//' ; '//TRIM(strStack(vals))
    625623
    626624CONTAINS
     
    814812  nc = SIZE(s0)
    815813  tmp = horzcat_s00(s0(nc), s1, s2, s3, s4, s5, s6, s7, s8, s9)
    816   out = [s0(1:nc-1), tmp]
     814  IF(nc == 1) out = tmp
     815  IF(nc /= 1) out = [s0(1:nc-1), tmp]
    817816END FUNCTION horzcat_s10
    818817!==============================================================================================================================
     
    850849  nc  = SIZE(s0, 2)
    851850  tmp = horzcat_s11(s0(:,nc), s1, s2, s3, s4, s5, s6, s7, s8, s9)
    852   out = RESHAPE([PACK(s0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(s0, 1), nc + SIZE(tmp, 2)-1])
     851  IF(nc == 1) out = tmp
     852  IF(nc /= 1) out = RESHAPE([PACK(s0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(s0, 1), nc + SIZE(tmp, 2)-1])
    853853END FUNCTION horzcat_s21
    854854!==============================================================================================================================
     
    883883  nc = SIZE(i0)
    884884  tmp = horzcat_i00(i0(nc), i1, i2, i3, i4, i5, i6, i7, i8, i9)
    885   out = [i0(1:nc-1), tmp]
     885  IF(nc == 1) out = tmp
     886  IF(nc /= 1) out = [i0(1:nc-1), tmp]
    886887END FUNCTION horzcat_i10
    887888!==============================================================================================================================
     
    919920  nc  = SIZE(i0, 2)
    920921  tmp = horzcat_i11(i0(:,nc), i1, i2, i3, i4, i5, i6, i7, i8, i9)
    921   out = RESHAPE([PACK(i0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(i0, 1), nc + SIZE(tmp, 2)-1])
     922  IF(nc == 1) out = tmp
     923  IF(nc /= 1) out = RESHAPE([PACK(i0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(i0, 1), nc + SIZE(tmp, 2)-1])
    922924END FUNCTION horzcat_i21
    923925!==============================================================================================================================
     
    952954  nc  = SIZE(r0)
    953955  tmp = horzcat_r00(r0(nc), r1, r2, r3, r4, r5, r6, r7, r8, r9)
    954   out = [r0(1:nc-1), tmp]
     956  IF(nc == 1) out = tmp
     957  IF(nc /= 1) out = [r0(1:nc-1), tmp]
    955958END FUNCTION horzcat_r10
    956959!==============================================================================================================================
     
    988991  nc  = SIZE(r0, 2)
    989992  tmp = horzcat_r11(r0(:,nc), r1, r2, r3, r4, r5, r6, r7, r8, r9)
    990   out = RESHAPE([PACK(r0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(r0, 1), nc + SIZE(tmp, 2)-1])
     993  IF(nc == 1) out = tmp
     994  IF(nc /= 1) out = RESHAPE([PACK(r0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(r0, 1), nc + SIZE(tmp, 2)-1])
    991995END FUNCTION horzcat_r21
    992996!==============================================================================================================================
     
    10211025  nc = SIZE(d0)
    10221026  tmp = horzcat_d00(d0(nc), d1, d2, d3, d4, d5, d6, d7, d8, d9)
    1023   out = [d0(1:nc-1), tmp]
     1027  IF(nc == 1) out = tmp
     1028  IF(nc /= 1) out = [d0(1:nc-1), tmp]
    10241029END FUNCTION horzcat_d10
    10251030!==============================================================================================================================
     
    10561061  nc  = SIZE(d0, 2)
    10571062  tmp = horzcat_d11(d0(:,nc), d1, d2, d3, d4, d5, d6, d7, d8, d9)
    1058   out = RESHAPE([PACK(d0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(d0, 1), nc + SIZE(tmp, 2)-1])
     1063  IF(nc == 1) out = tmp
     1064  IF(nc /= 1) out = RESHAPE([PACK(d0(:,1:nc-1), .TRUE.), PACK(tmp, .TRUE.)], SHAPE=[SIZE(d0, 1), nc + SIZE(tmp, 2)-1])
    10591065END FUNCTION horzcat_d21
    10601066!==============================================================================================================================
  • LMDZ6/trunk/libf/phylmd/infotrac_phy.F90

    r5001 r5003  
    178178   INTEGER :: nqtrue                                                 !--- Tracers nb from tracer.def (no higher order moments)
    179179   INTEGER :: iad                                                    !--- Advection scheme number
    180    INTEGER :: ic, iq, jq, it, nt, im, nm, iz, k                      !--- Indexes and temporary variables
    181    LOGICAL :: lerr, ll, lInit
    182    CHARACTER(LEN=1) :: p
     180   INTEGER :: iq, jq, nt, im, nm, k                                 !--- Indexes and temporary variables
     181   LOGICAL :: lerr, lInit
    183182   TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:)
    184183   TYPE(trac_type), POINTER             :: t1, t(:)
    185    INTEGER :: ierr
    186184   CHARACTER(LEN=maxlen),   ALLOCATABLE :: types_trac(:)  !--- Keyword for tracers type(s), parsed version
    187185   
Note: See TracChangeset for help on using the changeset viewer.