Changeset 240 for palm/trunk/SOURCE/init_grid.f90
- Timestamp:
- Feb 18, 2009 5:50:38 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r226 r240 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! new topography case 'single_street_canyon' 7 7 ! 8 8 ! Former revisions: … … 54 54 IMPLICIT NONE 55 55 56 INTEGER :: bh, blx, bly, bxl, bxr, byn, bys, gls, i, inc, i_center, j, & 57 j_center, k, l, nxl_l, nxr_l, nyn_l, nys_l, nzb_si, nzt_l, vi 56 INTEGER :: bh, blx, bly, bxl, bxr, byn, bys, ch, cwx, cwy, cxl, cxr, cyn, & 57 cys, gls, i, inc, i_center, j, j_center, k, l, nxl_l, nxr_l, & 58 nyn_l, nys_l, nzb_si, nzt_l, vi 58 59 59 60 INTEGER, DIMENSION(:), ALLOCATABLE :: vertical_influence … … 379 380 nzb_local(bys:byn,bxl:bxr) = bh 380 381 382 CASE ( 'single_street_canyon' ) 383 ! 384 !-- Single quasi-2D street canyon of infinite length in x or y direction. 385 !-- The canyon is centered in the other direction by default. 386 IF ( canyon_width_x /= 9999999.9 ) THEN 387 ! 388 !-- Street canyon in y direction 389 cwx = NINT( canyon_width_x / dx ) 390 IF ( canyon_wall_left == 9999999.9 ) THEN 391 canyon_wall_left = ( nx + 1 - cwx ) / 2 * dx 392 ENDIF 393 cxl = NINT( canyon_wall_left / dx ) 394 cxr = cxl + cwx 395 396 ELSEIF ( canyon_width_y /= 9999999.9 ) THEN 397 ! 398 !-- Street canyon in x direction 399 cwy = NINT( canyon_width_y / dy ) 400 IF ( canyon_wall_south == 9999999.9 ) THEN 401 canyon_wall_south = ( ny + 1 - cwy ) / 2 * dy 402 ENDIF 403 cys = NINT( canyon_wall_south / dy ) 404 cyn = cys + cwy 405 406 ELSE 407 IF ( myid == 0 ) THEN 408 PRINT*, '+++ user_init_grid: no street canyon width given' 409 ENDIF 410 CALL local_stop 411 ENDIF 412 413 ch = NINT( canyon_height / dz ) 414 dp_level_ind_b = ch 415 ! 416 !-- Street canyon size has to meet some requirements 417 IF ( canyon_width_x /= 9999999.9 ) THEN 418 IF ( ( cxl < 1 ) .OR. ( cxr > nx-1 ) .OR. ( cwx < 3 ) .OR. & 419 ( ch < 3 ) ) THEN 420 IF ( myid == 0 ) THEN 421 PRINT*, '+++ user_init_grid: inconsistent canyon parameters:' 422 PRINT*, ' cxl=', cxl, 'cxr=', cxr, & 423 'cwx=', cwx, & 424 'ch=', ch, 'nx=', nx, 'ny=', ny 425 ENDIF 426 CALL local_stop 427 ENDIF 428 ELSEIF ( canyon_width_y /= 9999999.9 ) THEN 429 IF ( ( cys < 1 ) .OR. ( cyn > ny-1 ) .OR. ( cwy < 3 ) .OR. & 430 ( ch < 3 ) ) THEN 431 IF ( myid == 0 ) THEN 432 PRINT*, '+++ user_init_grid: inconsistent canyon parameters:' 433 PRINT*, ' cys=', cys, 'cyn=', cyn, & 434 'cwy=', cwy, & 435 'ch=', ch, 'nx=', nx, 'ny=', ny 436 ENDIF 437 CALL local_stop 438 ENDIF 439 ENDIF 440 IF ( canyon_width_x /= 9999999.9 .AND. canyon_width_y /= 9999999.9 ) & 441 THEN 442 IF ( myid == 0 ) THEN 443 PRINT*, '+++ user_init_grid: inconsistent canyon parameters:' 444 PRINT*, ' street canyon can only be oriented' 445 PRINT*, ' either in x- or in y-direction' 446 ENDIF 447 CALL local_stop 448 ENDIF 449 450 nzb_local = ch 451 IF ( canyon_width_x /= 9999999.9 ) THEN 452 nzb_local(:,cxl+1:cxr-1) = 0 453 ELSEIF ( canyon_width_y /= 9999999.9 ) THEN 454 nzb_local(cys+1:cyn-1,:) = 0 455 ENDIF 456 381 457 CASE ( 'read_from_file' ) 382 458 !
Note: See TracChangeset
for help on using the changeset viewer.