- Timestamp:
- Jul 1, 2024, 3:02:29 PM (5 months ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/dyn3d_common/infotrac.F90
r5001 r5003 156 156 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 157 157 INTEGER :: iad !--- Advection scheme number 158 INTEGER :: i c, iq, jq, it, nt, im, nm, iz, k!--- Indexes and temporary variables158 INTEGER :: iq, jq, nt, im, nm !--- Indexes and temporary variables 159 159 LOGICAL :: lerr, ll 160 CHARACTER(LEN=1) :: p161 160 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 162 161 TYPE(trac_type), POINTER :: t1, t(:) 163 INTEGER :: ierr164 162 CHARACTER(LEN=maxlen), ALLOCATABLE :: types_trac(:) !--- Keyword for tracers type(s), parsed version 165 163 … … 245 243 ttr(1+nqo:nqCO2+nqo )%component = 'co2i' 246 244 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] 248 246 ttr(1+nqo+nqCO2:nqtrue)%parent = tran0 249 247 ttr(1+nqo+nqCO2:nqtrue)%phase = 'g' -
LMDZ6/trunk/libf/misc/readTracFiles_mod.f90
r5002 r5003 599 599 INTEGER :: iq, jq, ig 600 600 CHARACTER(LEN=maxlen), ALLOCATABLE :: parent(:), name(:) 601 CHARACTER(LEN=maxlen) :: gen0N602 601 !------------------------------------------------------------------------------------------------------------------------------ 603 602 CHARACTER(LEN=maxlen) :: modname … … 723 722 INTEGER, ALLOCATABLE :: i0(:), iGen(:) 724 723 CHARACTER(LEN=maxlen), ALLOCATABLE :: tname(:), gen0N(:), phase(:), parents(:), dType(:) 725 CHARACTER(LEN=maxlen) :: nam, gen0Nm, pha, parent , typ724 CHARACTER(LEN=maxlen) :: nam, gen0Nm, pha, parent 726 725 CHARACTER(LEN=1) :: p 727 726 INTEGER :: ip, np, iq, jq, nq, it, nt, nc, i, n … … 927 926 TYPE(trac_type), ALLOCATABLE, INTENT(OUT) :: tr(:) 928 927 LOGICAL, OPTIONAL, INTENT(IN) :: lRename !--- .TRUE.: add a section suffix to identical names 929 CHARACTER(LEN=maxlen) :: tnam , tnam_new, modname928 CHARACTER(LEN=maxlen) :: tnam_new, modname 930 929 CHARACTER(LEN=maxlen), ALLOCATABLE :: tname(:), parent(:), comp(:) 931 930 INTEGER :: iq, jq, is … … 988 987 CHARACTER(LEN=*), OPTIONAL, INTENT(IN) :: snam 989 988 INTEGER :: m 990 CHARACTER(LEN=maxlen), ALLOCATABLE :: s0(:,:),n0(:)989 CHARACTER(LEN=maxlen), ALLOCATABLE :: n0(:) 991 990 CHARACTER(LEN=maxlen) :: nm 992 991 lerr = .FALSE. … … 1061 1060 INTEGER, ALLOCATABLE :: iqDescen(:), ix(:), iy(:) 1062 1061 CHARACTER(LEN=maxlen), ALLOCATABLE :: tnames(:), parent(:) 1063 INTEGER, DIMENSION(SIZE(tr)) :: iqParent, iGen , nqChildren, nqDescen1062 INTEGER, DIMENSION(SIZE(tr)) :: iqParent, iGen 1064 1063 lerr = getKey('name', tnames, tr%keys); IF(lerr) RETURN !--- Names 1065 1064 lerr = getKey('parent', parent, tr%keys); IF(lerr) RETURN !--- Parents … … 1321 1320 !------------------------------------------------------------------------------------------------------------------------------ 1322 1321 INTEGER :: ix, it, ip, np, iz, nz, npha, nzon 1323 CHARACTER(LEN=maxlen) :: s1324 1322 TYPE(isot_type), POINTER :: i 1325 1323 DO ix = 1, nbIso … … 1841 1839 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 1842 1840 !------------------------------------------------------------------------------------------------------------------------------ 1843 CHARACTER(LEN=maxlen) :: sval 1844 CHARACTER(LEN=maxlen), ALLOCATABLE :: svals(:) 1841 CHARACTER(LEN=maxlen) :: sval 1845 1842 lerr = getKeyByIndex_sm11(keyn, sval, itr, ky, def, lDisp); IF(lerr) RETURN 1846 1843 lerr = strParse(sval, ',', val) … … 2295 2292 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 2296 2293 !------------------------------------------------------------------------------------------------------------------------------ 2297 CHARACTER(LEN=maxlen) :: sval 2298 CHARACTER(LEN=maxlen), ALLOCATABLE :: svals(:) 2294 CHARACTER(LEN=maxlen) :: sval 2299 2295 lerr = getKeyByName_sm11(keyn, sval, tname, ky, def, lDisp); IF(lerr) RETURN 2300 2296 lerr = strParse(sval, ',', val) … … 2487 2483 LOGICAL, OPTIONAL, INTENT(IN) :: lDisp 2488 2484 !------------------------------------------------------------------------------------------------------------------------------ 2489 CHARACTER(LEN=maxlen) :: s , sval2485 CHARACTER(LEN=maxlen) :: s 2490 2486 CHARACTER(LEN=maxlen), ALLOCATABLE :: svals(:) 2491 2487 LOGICAL, ALLOCATABLE :: ll(:) -
LMDZ6/trunk/libf/misc/strings_mod.F90
r5001 r5003 621 621 IF(PRESENT(vals)) CALL parseV(vals) !--- PARSE <key>=<val> PAIRS 622 622 IF(PRESENT(n)) n = nk !--- RETURN THE NUMBER OF KEYS 623 IF(PRESENT(vals)) &624 print*,'key ; val = '//TRIM(strStack(keys))//' ; '//TRIM(strStack(vals))625 623 626 624 CONTAINS … … 814 812 nc = SIZE(s0) 815 813 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] 817 816 END FUNCTION horzcat_s10 818 817 !============================================================================================================================== … … 850 849 nc = SIZE(s0, 2) 851 850 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]) 853 853 END FUNCTION horzcat_s21 854 854 !============================================================================================================================== … … 883 883 nc = SIZE(i0) 884 884 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] 886 887 END FUNCTION horzcat_i10 887 888 !============================================================================================================================== … … 919 920 nc = SIZE(i0, 2) 920 921 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]) 922 924 END FUNCTION horzcat_i21 923 925 !============================================================================================================================== … … 952 954 nc = SIZE(r0) 953 955 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] 955 958 END FUNCTION horzcat_r10 956 959 !============================================================================================================================== … … 988 991 nc = SIZE(r0, 2) 989 992 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]) 991 995 END FUNCTION horzcat_r21 992 996 !============================================================================================================================== … … 1021 1025 nc = SIZE(d0) 1022 1026 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] 1024 1029 END FUNCTION horzcat_d10 1025 1030 !============================================================================================================================== … … 1056 1061 nc = SIZE(d0, 2) 1057 1062 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]) 1059 1065 END FUNCTION horzcat_d21 1060 1066 !============================================================================================================================== -
LMDZ6/trunk/libf/phylmd/infotrac_phy.F90
r5001 r5003 178 178 INTEGER :: nqtrue !--- Tracers nb from tracer.def (no higher order moments) 179 179 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 183 182 TYPE(trac_type), ALLOCATABLE, TARGET :: ttr(:) 184 183 TYPE(trac_type), POINTER :: t1, t(:) 185 INTEGER :: ierr186 184 CHARACTER(LEN=maxlen), ALLOCATABLE :: types_trac(:) !--- Keyword for tracers type(s), parsed version 187 185
Note: See TracChangeset
for help on using the changeset viewer.