Changeset 217 for palm/trunk/SOURCE/init_grid.f90
- Timestamp:
- Dec 9, 2008 6:00:48 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r145 r217 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! 6 ! +topography_grid_convention 7 7 ! 8 8 ! Former revisions: … … 372 372 373 373 ! 374 !-- Set the actual total size of the building. Due to the staggered grid, 375 !-- the building will be displaced by -0.5dx in x-direction and by -0.5dy 376 !-- in y-direction compared to the scalar grid. 374 !-- Define the building. 377 375 nzb_local = 0 378 376 nzb_local(bys:byn,bxl:bxr) = bh … … 419 417 ! 420 418 !-- The DEFAULT case is reached either if the parameter topography 421 !-- contains a wrong character string or if the user has coded a special419 !-- contains a wrong character string or if the user has defined a special 422 420 !-- case in the user interface. There, the subroutine user_init_grid 423 421 !-- checks which of these two conditions applies. … … 435 433 ! 436 434 !-- Consistency checks and index array initialization are only required for 437 !-- non-flat topography, also the initialization of topography heig tharrays435 !-- non-flat topography, also the initialization of topography height arrays 438 436 !-- zu_s_inner and zw_w_inner 439 437 IF ( TRIM( topography ) /= 'flat' ) THEN … … 472 470 ENDIF 473 471 472 IF ( topography_grid_convention == 'cell_edge' ) THEN 474 473 ! 475 !-- The array nzb_local as defined above describes the actual total size of 476 !-- topography which is defined by u=0 on the topography walls in x-direction 477 !-- and by v=0 on the topography walls in y-direction. However, PALM uses 478 !-- individual arrays nzb_u|v|w|s_inner|outer that are based on nzb_s_inner. 479 !-- Therefore, the extent of topography in nzb_local is now reduced by 1dx 480 !-- at the E topography walls and by 1dy at the N topography walls to form 481 !-- the basis for nzb_s_inner. 482 DO j = -gls, ny + gls 483 DO i = -gls, nx 484 nzb_local(j,i) = MIN( nzb_local(j,i), nzb_local(j,i+1) ) 485 ENDDO 486 ENDDO 487 !-- apply cyclic boundary conditions in x-direction 488 nzb_local(:,nx+1:nx+gls) = nzb_local(:,0:gls-1) 489 DO i = -gls, nx + gls 490 DO j = -gls, ny 491 nzb_local(j,i) = MIN( nzb_local(j,i), nzb_local(j+1,i) ) 492 ENDDO 493 ENDDO 494 !-- apply cyclic boundary conditions in y-direction 495 nzb_local(ny+1:ny+gls,:) = nzb_local(0:gls-1,:) 474 !-- The array nzb_local as defined using the 'cell_edge' convention 475 !-- describes the actual total size of topography which is defined at the 476 !-- cell edges where u=0 on the topography walls in x-direction and v=0 477 !-- on the topography walls in y-direction. However, PALM uses individual 478 !-- arrays nzb_u|v|w|s_inner|outer that are based on nzb_s_inner. 479 !-- Therefore, the extent of topography in nzb_local is now reduced by 480 !-- 1dx at the E topography walls and by 1dy at the N topography walls 481 !-- to form the basis for nzb_s_inner. 482 DO j = -gls, ny + gls 483 DO i = -gls, nx 484 nzb_local(j,i) = MIN( nzb_local(j,i), nzb_local(j,i+1) ) 485 ENDDO 486 ENDDO 487 !-- apply cyclic boundary conditions in x-direction 488 !(ist das erforderlich? Ursache von Seung Bus Fehler?) 489 nzb_local(:,nx+1:nx+gls) = nzb_local(:,0:gls-1) 490 DO i = -gls, nx + gls 491 DO j = -gls, ny 492 nzb_local(j,i) = MIN( nzb_local(j,i), nzb_local(j+1,i) ) 493 ENDDO 494 ENDDO 495 !-- apply cyclic boundary conditions in y-direction 496 !(ist das erforderlich? Ursache von Seung Bus Fehler?) 497 nzb_local(ny+1:ny+gls,:) = nzb_local(0:gls-1,:) 498 ENDIF 496 499 497 500 !
Note: See TracChangeset
for help on using the changeset viewer.