Changeset 1600 for trunk/LMDZ.GENERIC
- Timestamp:
- Sep 15, 2016, 4:33:30 PM (8 years ago)
- Location:
- trunk/LMDZ.GENERIC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.GENERIC/README
r1594 r1600 1257 1257 - Further cleanup to harmonize with LMDZ.COMMON turn "idissip" into 1258 1258 "dissip_period". 1259 1260 == 15/09/2016 == TB 1261 - bug fix in tpindex.F : when computing weights for abundance of species one 1262 should not return the maximum index (leads to out-of-bounds index use in 1263 the caller). -
trunk/LMDZ.GENERIC/libf/phystd/tpindex.F
r135 r1600 69 69 ! requested temperature. If the requested temperature is outside 70 70 ! the T-grid, set up to extrapolate from the appropriate end. 71 71 ! TW : temperature to be interpolated 72 ! TREF : grid array 73 ! MT : index of TREF for bounding new temperature 74 ! U : new index (real) for temperature interpolated 72 75 73 76 IF(TW.LE.TREF(1)) THEN … … 85 88 10 continue 86 89 END IF 90 91 !TB15 : case low temp : MT=1: fixed TW right above tref(1) 92 IF (MT.eq.1) THEN 93 TW=tref(1)*1.00 94 write(*,*) 'tpindex: Caution! Pressure of upper levels lower 95 $than ref pressure for k-coef: k-coeff fixed for upper levels' 96 ENDIF 87 97 88 98 U = (TW-TREF(MT))/(TREF(MT+1)-TREF(MT)) … … 104 114 105 115 20 continue 116 117 !TB15 : case low pressure : n=2 : fixed pwl, right above pref(1) 118 IF (MP.eq.1) THEN 119 PWL=Pref(1)*1.00 120 write(*,*) 'tpindex: Caution! Pressure of upper levels lower 121 $than ref pressure for k-coef: k-coeff fixed for upper levels' 122 ENDIF 106 123 124 ! interpolated pressure 107 125 T = (PWL-PREF(MP))/(PREF(MP+1)-PREF(MP)) 108 126 … … 118 136 IF(QVAR.le.WREFVAR(1)) then 119 137 NVAR = 1 120 WRATIO = 0.0D0 138 WRATIO = 0.0D0 ! put all the weight on the first point 121 139 ELSEIF(QVAR.ge.WREFVAR(L_REFVAR)) then 122 NVAR = L_REFVAR 123 WRATIO = 0.0D0 140 NVAR = L_REFVAR-1 ! TB16 in order to not oversize NVAr when doing 141 !NVAR+1 142 WRATIO = 1.00D0 ! put all the weight on the last point 124 143 ELSE 125 144 DO N=2,L_REFVAR
Note: See TracChangeset
for help on using the changeset viewer.