Changeset 2628 for palm/trunk/SOURCE/lpm_advec.f90
- Timestamp:
- Nov 20, 2017 12:40:38 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/lpm_advec.f90
r2610 r2628 20 20 ! Current revisions: 21 21 ! ------------------ 22 ! 22 ! Removed indices ilog and jlog which are no longer needed since particle box 23 ! locations are identical to scalar boxes and topography. 24 23 25 ! 24 26 ! Former revisions: … … 167 169 INTEGER(iwp) :: i !< index variable along x 168 170 INTEGER(iwp) :: ip !< index variable along x 169 INTEGER(iwp) :: ilog !< index variable along x170 171 INTEGER(iwp) :: j !< index variable along y 171 172 INTEGER(iwp) :: jp !< index variable along y 172 INTEGER(iwp) :: jlog !< index variable along y173 173 INTEGER(iwp) :: k !< index variable along z 174 174 INTEGER(iwp) :: k_wall !< vertical index of topography top … … 299 299 !-- First, check if particle is located below first vertical grid level 300 300 !-- above topography (Prandtl-layer height) 301 ilog = particles(n)%x * ddx302 jlog = particles(n)%y * ddy303 !304 301 !-- Determine vertical index of topography top 305 k_wall = get_topography_top_index( j log, ilog, 's' )302 k_wall = get_topography_top_index( jp, ip, 's' ) 306 303 307 304 IF ( constant_flux_layer .AND. zv(n) - zw(k_wall) < z_p ) THEN … … 327 324 !-- Get friction velocity and momentum flux from new surface data 328 325 !-- types. 329 IF ( surf_def_h(0)%start_index(j log,ilog) <= &330 surf_def_h(0)%end_index(j log,ilog) ) THEN331 surf_start = surf_def_h(0)%start_index(j log,ilog)326 IF ( surf_def_h(0)%start_index(jp,ip) <= & 327 surf_def_h(0)%end_index(jp,ip) ) THEN 328 surf_start = surf_def_h(0)%start_index(jp,ip) 332 329 !-- Limit friction velocity. In narrow canyons or holes the 333 330 !-- friction velocity can become very small, resulting in a too … … 335 332 us_int = MAX( surf_def_h(0)%us(surf_start), 0.01_wp ) 336 333 usws_int = surf_def_h(0)%usws(surf_start) 337 ELSEIF ( surf_lsm_h%start_index(j log,ilog) <= &338 surf_lsm_h%end_index(j log,ilog) ) THEN339 surf_start = surf_lsm_h%start_index(j log,ilog)334 ELSEIF ( surf_lsm_h%start_index(jp,ip) <= & 335 surf_lsm_h%end_index(jp,ip) ) THEN 336 surf_start = surf_lsm_h%start_index(jp,ip) 340 337 us_int = MAX( surf_lsm_h%us(surf_start), 0.01_wp ) 341 338 usws_int = surf_lsm_h%usws(surf_start) 342 ELSEIF ( surf_usm_h%start_index(j log,ilog) <= &343 surf_usm_h%end_index(j log,ilog) ) THEN344 surf_start = surf_usm_h%start_index(j log,ilog)339 ELSEIF ( surf_usm_h%start_index(jp,ip) <= & 340 surf_usm_h%end_index(jp,ip) ) THEN 341 surf_start = surf_usm_h%start_index(jp,ip) 345 342 us_int = MAX( surf_usm_h%us(surf_start), 0.01_wp ) 346 343 usws_int = surf_usm_h%usws(surf_start) … … 396 393 DO n = start_index(nb), end_index(nb) 397 394 398 ilog = particles(n)%x * ddx399 jlog = particles(n)%y * ddy400 395 ! 401 396 !-- Determine vertical index of topography top 402 k_wall = get_topography_top_index( j log,ilog, 's' )397 k_wall = get_topography_top_index( jp,ip, 's' ) 403 398 404 399 IF ( constant_flux_layer .AND. zv(n) - zw(k_wall) < z_p ) THEN … … 427 422 !-- Get friction velocity and momentum flux from new surface data 428 423 !-- types. 429 IF ( surf_def_h(0)%start_index(j log,ilog) <= &430 surf_def_h(0)%end_index(j log,ilog) ) THEN431 surf_start = surf_def_h(0)%start_index(j log,ilog)424 IF ( surf_def_h(0)%start_index(jp,ip) <= & 425 surf_def_h(0)%end_index(jp,ip) ) THEN 426 surf_start = surf_def_h(0)%start_index(jp,ip) 432 427 !-- Limit friction velocity. In narrow canyons or holes the 433 428 !-- friction velocity can become very small, resulting in a too … … 435 430 us_int = MAX( surf_def_h(0)%us(surf_start), 0.01_wp ) 436 431 vsws_int = surf_def_h(0)%vsws(surf_start) 437 ELSEIF ( surf_lsm_h%start_index(j log,ilog) <= &438 surf_lsm_h%end_index(j log,ilog) ) THEN439 surf_start = surf_lsm_h%start_index(j log,ilog)432 ELSEIF ( surf_lsm_h%start_index(jp,ip) <= & 433 surf_lsm_h%end_index(jp,ip) ) THEN 434 surf_start = surf_lsm_h%start_index(jp,ip) 440 435 us_int = MAX( surf_lsm_h%us(surf_start), 0.01_wp ) 441 436 vsws_int = surf_lsm_h%vsws(surf_start) 442 ELSEIF ( surf_usm_h%start_index(j log,ilog) <= &443 surf_usm_h%end_index(j log,ilog) ) THEN444 surf_start = surf_usm_h%start_index(j log,ilog)437 ELSEIF ( surf_usm_h%start_index(jp,ip) <= & 438 surf_usm_h%end_index(jp,ip) ) THEN 439 surf_start = surf_usm_h%start_index(jp,ip) 445 440 us_int = MAX( surf_usm_h%us(surf_start), 0.01_wp ) 446 441 vsws_int = surf_usm_h%vsws(surf_start)
Note: See TracChangeset
for help on using the changeset viewer.