Changeset 134 for palm/trunk/SOURCE/init_grid.f90
- Timestamp:
- Nov 21, 2007 7:28:38 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r116 r134 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! Redefine initial nzb_local as the actual total size of topography (later the 7 ! extent of topography in nzb_local is reduced by 1dx at the E topography walls 8 ! and by 1dy at the N topography walls to form the basis for nzb_s_inner); 9 ! for consistency redefine 'single_building' case. 6 10 ! Calculation of wall flag arrays 7 11 ! … … 365 369 366 370 ! 367 !-- Set the individual index arrays for all velocity components and 368 !-- scalars, taking into account the staggered grid. The horizontal 369 !-- wind component normal to a wall defines the position of the wall, and 370 !-- in the respective direction the building is as long as specified in 371 !-- building_length_?, but in the other horizontal direction (for w and s 372 !-- in both horizontal directions) the building appears shortened by one 373 !-- grid length due to the staggered grid. 371 !-- Set the actual total size of the building. Due to the staggered grid, 372 !-- the building will be displaced by -0.5dx in x-direction and by -0.5dy 373 !-- in y-direction compared to the scalar grid. 374 374 nzb_local = 0 375 nzb_local(bys:byn -1,bxl:bxr-1) = bh375 nzb_local(bys:byn,bxl:bxr) = bh 376 376 377 377 CASE ( 'read_from_file' ) … … 468 468 ENDIF 469 469 ENDIF 470 471 ! 472 !-- The array nzb_local as defined above describes the actual total size of 473 !-- topography which is defined by u=0 on the topography walls in x-direction 474 !-- and by v=0 on the topography walls in y-direction. However, PALM uses 475 !-- individual arrays nzb_u|v|w|s_inner|outer that are based on nzb_s_inner. 476 !-- Therefore, the extent of topography in nzb_local is now reduced by 1dx 477 !-- at the E topography walls and by 1dy at the N topography walls to form 478 !-- the basis for nzb_s_inner. 479 DO j = -gls, ny + gls 480 DO i = -gls, nx 481 nzb_local(j,i) = MIN( nzb_local(j,i), nzb_local(j,i+1) ) 482 ENDDO 483 ENDDO 484 !-- apply cyclic boundary conditions in x-direction 485 nzb_local(:,nx+1:nx+gls) = nzb_local(:,0:gls-1) 486 DO i = -gls, nx + gls 487 DO j = -gls, ny 488 nzb_local(j,i) = MIN( nzb_local(j,i), nzb_local(j+1,i) ) 489 ENDDO 490 ENDDO 491 !-- apply cyclic boundary conditions in y-direction 492 nzb_local(ny+1:ny+gls,:) = nzb_local(0:gls-1,:) 470 493 471 494 !
Note: See TracChangeset
for help on using the changeset viewer.