Changeset 1910
- Timestamp:
- May 26, 2016 6:49:46 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/SOURCE/init_grid.f90
r1903 r1910 19 19 ! Current revisions: 20 20 ! ----------------- 21 ! 21 ! Bugfix: if topography is read from file, Neumann conditions are used for the 22 ! nzb_local array (instead of cyclic conditions) in case that non-cyclic 23 ! boundary conditions are used for the run 22 24 ! 23 25 ! Former revisions: … … 26 28 ! 27 29 ! 1902 2016-05-09 11:18:56Z suehring 28 ! Set topography flags only for multigrid solver, not for multigrid_fast30 ! Set topography flags for multigrid solver only (not for multigrid_fast) 29 31 ! 30 32 ! 1886 2016-04-21 11:20:47Z suehring … … 169 171 170 172 USE control_parameters, & 171 ONLY: bc_lr , bc_ns, building_height, building_length_x,&173 ONLY: bc_lr_cyc, bc_ns_cyc, building_height, building_length_x, & 172 174 building_length_y, building_wall_left, building_wall_south, & 173 175 canyon_height, canyon_wall_left, canyon_wall_south, & … … 745 747 746 748 DEALLOCATE ( topo_height ) 747 ! 748 !-- Add cyclic boundaries (additional layers are for calculating 749 !-- flag arrays needed for the multigrid sover) 750 nzb_local(-gls:-1,0:nx) = nzb_local(ny-gls+1:ny,0:nx) 751 nzb_local(ny+1:ny+gls,0:nx) = nzb_local(0:gls-1,0:nx) 752 nzb_local(:,-gls:-1) = nzb_local(:,nx-gls+1:nx) 753 nzb_local(:,nx+1:nx+gls) = nzb_local(:,0:gls-1) 749 750 ! 751 !-- Add cyclic or Neumann boundary conditions (additional layers are for 752 !-- calculating flag arrays needed for the multigrid sover) 753 IF ( bc_ns_cyc ) THEN 754 nzb_local(-gls:-1,0:nx) = nzb_local(ny-gls+1:ny,0:nx) 755 nzb_local(ny+1:ny+gls,0:nx) = nzb_local(0:gls-1,0:nx) 756 ELSE 757 DO j = -gls, -1 758 nzb_local(j,0:nx) = nzb_local(0,0:nx) 759 ENDDO 760 DO j = ny+1, ny+gls 761 nzb_local(j,0:nx) = nzb_local(ny,0:nx) 762 ENDDO 763 ENDIF 764 765 IF ( bc_lr_cyc ) THEN 766 nzb_local(:,-gls:-1) = nzb_local(:,nx-gls+1:nx) 767 nzb_local(:,nx+1:nx+gls) = nzb_local(:,0:gls-1) 768 ELSE 769 DO i = -gls, -1 770 nzb_local(:,i) = nzb_local(:,0) 771 ENDDO 772 DO i = nx+1, nx+gls 773 nzb_local(:,i) = nzb_local(:,nx) 774 ENDDO 775 ENDIF 754 776 755 777 CASE DEFAULT … … 791 813 ENDIF 792 814 793 IF ( bc_lr == 'cyclic') THEN815 IF ( bc_lr_cyc ) THEN 794 816 IF ( ANY( nzb_local(:,-1) /= nzb_local(:,nx) ) .OR. & 795 817 ANY( nzb_local(:,0) /= nzb_local(:,nx+1) ) ) THEN … … 799 821 ENDIF 800 822 ENDIF 801 IF ( bc_ns == 'cyclic') THEN823 IF ( bc_ns_cyc ) THEN 802 824 IF ( ANY( nzb_local(-1,:) /= nzb_local(ny,:) ) .OR. & 803 825 ANY( nzb_local(0,:) /= nzb_local(ny+1,:) ) ) THEN
Note: See TracChangeset
for help on using the changeset viewer.