Changeset 2229 for palm/trunk/SOURCE/pmc_interface_mod.f90
- Timestamp:
- May 30, 2017 2:52:52 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/pmc_interface_mod.f90
r2220 r2229 21 21 ! Current revisions: 22 22 ! ------------------ 23 ! 23 ! A minor indexing error in init_anterp_tophat is corrected. 24 24 ! 25 25 ! Former revisions: … … 27 27 ! $Id$ 28 28 ! 29 ! 2219 2017-05-09 14:16:14Z hellstea30 ! Two near-wall correction-related array indexing bugs corrected in the31 ! interpolation routines.32 !33 29 ! 2174 2017-03-13 08:18:57Z maronga 34 30 ! Added support for cloud physics quantities, syntax layout improvements. Data … … 2159 2155 INTEGER(iwp) :: ii !: Coarse-grid index 2160 2156 INTEGER(iwp) :: istart !: 2157 INTEGER(iwp) :: ir !: 2161 2158 INTEGER(iwp) :: j !: Fine-grid index 2162 2159 INTEGER(iwp) :: jj !: Coarse-grid index 2163 2160 INTEGER(iwp) :: jstart !: 2161 INTEGER(iwp) :: jr !: 2164 2162 INTEGER(iwp) :: k !: Fine-grid index 2165 2163 INTEGER(iwp) :: kk !: Coarse-grid index … … 2228 2226 DO WHILE ( ( coord_x(i) < cg%coord_x(ii) - 0.5_wp * cg%dx ) .AND. & 2229 2227 ( i < nxrg ) ) 2230 i = i + 12228 i = i + 1 2231 2229 ENDDO 2232 2230 iflu(ii) = MIN( MAX( i, nxlg ), nxrg ) 2233 DO WHILE ( ( coord_x(i) <= cg%coord_x(ii) + 0.5_wp * cg%dx ) .AND. & 2231 ir = i 2232 DO WHILE ( ( coord_x(ir) <= cg%coord_x(ii) + 0.5_wp * cg%dx ) .AND. & 2234 2233 ( i < nxrg+1 ) ) 2235 i = i + 1 2234 i = i + 1 2235 ir = MIN( i, nxrg ) 2236 2236 ENDDO 2237 2237 ifuu(ii) = MIN( MAX( i-1, iflu(ii) ), nxrg ) … … 2249 2249 DO WHILE ( ( coord_x(i) + 0.5_wp * dx < cg%coord_x(ii) ) .AND. & 2250 2250 ( i < nxrg ) ) 2251 i = i + 12251 i = i + 1 2252 2252 ENDDO 2253 2253 iflo(ii) = MIN( MAX( i, nxlg ), nxrg ) 2254 DO WHILE ( ( coord_x(i) + 0.5_wp * dx <= cg%coord_x(ii) + cg%dx ) & 2254 ir = i 2255 DO WHILE ( ( coord_x(ir) + 0.5_wp * dx <= cg%coord_x(ii) + cg%dx ) & 2255 2256 .AND. ( i < nxrg+1 ) ) 2256 i = i + 1 2257 i = i + 1 2258 ir = MIN( i, nxrg ) 2257 2259 ENDDO 2258 2260 ifuo(ii) = MIN( MAX( i-1, iflo(ii) ), nxrg ) … … 2270 2272 DO WHILE ( ( coord_y(j) < cg%coord_y(jj) - 0.5_wp * cg%dy ) .AND. & 2271 2273 ( j < nyng ) ) 2272 j = j + 12274 j = j + 1 2273 2275 ENDDO 2274 2276 jflv(jj) = MIN( MAX( j, nysg ), nyng ) 2275 DO WHILE ( ( coord_y(j) <= cg%coord_y(jj) + 0.5_wp * cg%dy ) .AND. & 2277 jr = j 2278 DO WHILE ( ( coord_y(jr) <= cg%coord_y(jj) + 0.5_wp * cg%dy ) .AND. & 2276 2279 ( j < nyng+1 ) ) 2277 j = j + 1 2280 j = j + 1 2281 jr = MIN( j, nyng ) 2278 2282 ENDDO 2279 2283 jfuv(jj) = MIN( MAX( j-1, jflv(jj) ), nyng ) … … 2290 2294 DO WHILE ( ( coord_y(j) + 0.5_wp * dy < cg%coord_y(jj) ) .AND. & 2291 2295 ( j < nyng ) ) 2292 j = j + 12296 j = j + 1 2293 2297 ENDDO 2294 2298 jflo(jj) = MIN( MAX( j, nysg ), nyng ) 2295 DO WHILE ( ( coord_y(j) + 0.5_wp * dy <= cg%coord_y(jj) + cg%dy ) & 2299 jr = j 2300 DO WHILE ( ( coord_y(jr) + 0.5_wp * dy <= cg%coord_y(jj) + cg%dy ) & 2296 2301 .AND. ( j < nyng+1 ) ) 2297 j = j + 1 2302 j = j + 1 2303 jr = MIN( j, nyng ) 2298 2304 ENDDO 2299 2305 jfuo(jj) = MIN( MAX( j-1, jflo(jj) ), nyng ) … … 2315 2321 kflw(kk) = MIN( MAX( k, 1 ), nzt + 1 ) 2316 2322 DO WHILE ( ( zw(k) <= cg%zu(kk+1) ) .AND. ( k < nzt+1 ) ) 2317 k = k + 12323 k = k + 1 2318 2324 ENDDO 2319 2325 kfuw(kk) = MIN( MAX( k-1, kflw(kk) ), nzt + 1 )
Note: See TracChangeset
for help on using the changeset viewer.