Changeset 217
- Timestamp:
- Dec 9, 2008 6:00:48 PM (16 years ago)
- Location:
- palm/trunk
- Files:
-
- 7 added
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_3.5.1.html
r212 r217 106 106 new <a href="chapter_4.1.html#topography">topography</a> mode 107 107 in the <tt><font style="font-size: 10pt;" size="2">SELECT CASE( TRIM(topography) ) </font></tt>command 108 in <tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>.108 and the definition of <a href="chapter_4.3.html#topography_grid_convention">topography_grid_convention</a> in <tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>. 109 109 Note that the <a href="chapter_4.1.html#topography">topography</a> modes 110 <span style="font-style: italic;">'flat'</span> 111 and <span style="font-style: italic;">'single_building'</span> 112 are not allowed here since these are the standard cases used in the 110 <span style="font-style: italic;">'flat'</span>, <span style="font-style: italic;">'single_building'</span> 111 and <span style="font-style: italic;">'read_from_file'</span> are not allowed here since these are the standard cases used in the 113 112 calling routine <tt><font style="font-size: 10pt;" size="2">init_grid</font></tt>. </p> <p>CPU 114 113 time for <tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt> 115 114 is considered in the local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a> 116 115 within the category “initialisation”.</p> </td> 117 </tr> <tr><td style="vertical-align: top;"> In116 </tr> <tr><td style="vertical-align: top;">End of <code>check_parameters</code></td><td style="vertical-align: top;"><code><a name="user_check_parameters"></a>user_check_parameters</code></td><td style="vertical-align: top;">Check &userpar control parameters and deduce further quantities.</td></tr><tr><td style="vertical-align: top;">In 118 117 the middle of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></td><td style="vertical-align: top;"><span style="font-family: monospace;"></span><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_init_3d_model"></a>user_init_3d_<br>model</font></font></tt></td><td style="vertical-align: top;">Initialization of the 3d-model.<br><br>Allows 119 118 the complete initialization of the 3d model. The user is responsible to -
palm/trunk/DOC/app/chapter_4.1.html
r197 r217 13985 13985 13986 13986 13987 The building size and location can be specified with the parameters <a href="#building_height">building_height</a>, <a href="#building_length_x">building_length_x</a>, <a href="#building_length_y">building_length_y</a>, <a href="#building_wall_left">building_wall_left</a> and <a href="#building_wall_south">building_wall_south</a>.<br> 13988 13989 <font color="#000000">Due to the staggered grid the building will be displaced by -0.5 <a href="chapter_4.1.html#dx">dx</a> in x-direction and -0.5 <a href="chapter_4.1.html#dy">dy</a> in y-direction.</font></div> 13987 The building size and location can be specified with the parameters <a href="#building_height">building_height</a>, <a href="#building_length_x">building_length_x</a>, <a href="#building_length_y">building_length_y</a>, <a href="#building_wall_left">building_wall_left</a> and <a href="#building_wall_south">building_wall_south</a>.<font color="#000000"><br></font></div> 13990 13988 13991 13989 … … 14036 14034 information</font></font><font color="#000000"> 14037 14035 in m. These data <span style="font-style: italic;"></span>must 14038 exactly match the horizontal grid.<br> 14039 14040 Due to the staggered grid the topography will be displaced by -0.5 <a href="#dx">dx</a> in x-direction and -0.5 <a href="#dy">dy</a> in y-direction.</font> </div> 14036 exactly match the horizontal grid.<br></font> </div> 14041 14037 14042 14038 … … 14054 14050 </span><font color="#000000"> 14055 14051 Alternatively, the user may add code to the user interface subroutine <a href="chapter_3.5.1.html#user_init_grid">user_init_grid</a> 14056 to allow further topography modes. Again, </font><font color="#000000">due to the staggered grid the topography will be displaced by -0.5 <a href="chapter_4.1.html#dx">dx</a> in x-direction and -0.5 <a href="chapter_4.1.html#dy">dy</a> in y-direction.</font><br>14052 to allow further topography modes. </font>These require to explicitly set the<span style="font-weight: bold;"> </span><a href="chapter_4.3.html#topography_grid_convention">topography_grid_convention</a> to either <span style="font-style: italic;">'cell_edge'</span> or <span style="font-style: italic;">'cell_center'</span>.<br> 14057 14053 14058 14054 <font color="#000000"> -
palm/trunk/DOC/app/chapter_4.3.html
r89 r217 55 55 (1) to <b>region</b> (9)), the total domain has the index 56 56 0 (<b>region</b> 57 (0)).</p> </td> </tr> </tbody> 57 (0)).</p> </td> </tr><tr><td style="vertical-align: top;"><a name="topography_grid_convention"></a><span style="font-weight: bold;">topography_grid_</span><br style="font-weight: bold;"><span style="font-weight: bold;">convention</span></td><td style="vertical-align: top;">C*11</td><td style="vertical-align: top;"><span style="font-style: italic;">default depends on value of <a href="chapter_4.1.html#topography">topography</a>; see text for details</span><span style="font-style: italic;"></span></td><td style="vertical-align: top;">Convention for defining the topography grid.<br><br>Possible values are<br><ul><li><span style="font-style: italic;">'cell_edge': </span>the distance between cell edges defines the extent of topography. This setting is normally for <span style="font-style: italic;">generic topographies</span>, i.e. topographies that are constructed using length parameters. For example, <a href="chapter_4.1.html#topography">topography</a> = <span style="font-style: italic;">'single_building'</span> is constructed using <a href="chapter_4.1.html#building_length_x">building_length_x</a> and <a href="chapter_4.1.html#building_length_y">building_length_y</a>. The advantage of this setting is that the actual size of generic topography is independent of the grid size, provided that the length parameters are an integer multiple of the grid lengths <a href="chapter_4.1.html#dx">dx</a> and <a href="chapter_4.1.html#dy">dy</a>. This is convenient for resolution parameter studies.</li><li><span style="font-style: italic;">'cell_center'</span><span style="font-style: italic;">: </span>the number of topography cells define the extent of topography. This setting is normally for <span style="font-style: italic;">rastered real topographies</span> derived from digital elevation models. For example, <a href="chapter_4.1.html#topography">topography</a> = <span style="font-style: italic;">'read_from_file'</span> is constructed using the input file <a href="chapter_3.4.html#TOPOGRAPHY_DATA">TOPOGRAPHY_DATA</a><font color="#000000">. </font>The 58 advantage of this setting is that the rastered topography cells of 59 the input file are directly mapped to topography grid boxes in PALM. <span style="font-style: italic;"></span></li></ul>The example files for <big><code>sgl_bldg_cell_center</code></big> and 60 <big><code>sgl_bldg_cell_edge</code></big> in <big><code>trunk/EXAMPLES/</code></big> 61 illustrate the difference between 62 both approaches. Both examples simulate a single building and yield the 63 same results. The former uses a rastered topography input file with <span style="font-style: italic;">'cell_center'</span> convention, the latter applies a generic topography with <span style="font-style: italic;">'cell_edge'</span> convention.<br><br>The default value is<br><ul><li><span style="font-style: italic;">'cell_edge' </span>if <a href="chapter_4.1.html#topography">topography</a> = <span style="font-style: italic;">'single_building'</span>,</li><li><span style="font-style: italic;">'cell_center'</span><span style="font-style: italic;"></span> if <a href="chapter_4.1.html#topography">topography</a> = <span style="font-style: italic;">'read_from_file'</span>,</li><li><span style="font-style: italic;">none (' '</span> ) otherwise, leading to an abort if <span style="font-weight: bold;">topography_grid_convention</span> is not set.</li></ul>This means that <br><ul><li>For PALM simulations using a <span style="font-style: italic;">user-defined topography</span>, the<span style="font-weight: bold;"> topography_grid_convention</span> must be explicitly set to either <span style="font-style: italic;">'cell_edge'</span> or <span style="font-style: italic;">'cell_center'</span>.</li><li>For PALM simulations using a <span style="font-style: italic;">standard topography</span> <span style="font-style: italic;">('single_building'</span> or <span style="font-style: italic;">'read_from_file')</span>, it is possible but not required to set the <span style="font-weight: bold;">topography_grid_convention</span> because appropriate default values apply</li></ul></td></tr> </tbody> 58 64 </table><p style="line-height: 200%;"> <br> 59 65 </p> -
palm/trunk/DOC/app/chapter_4.6.html
r197 r217 13787 13787 13788 13788 13789 <tr> 13789 <tr><td style="vertical-align: top;"><a style="font-weight: bold;" href="chapter_4.3.html#topography_grid_convention">topography_grid_convention</a></td><td style="vertical-align: top;">U</td><td style="vertical-align: top;">C * 11</td><td><span style="font-style: italic;">default depends on value of <a href="chapter_4.1.html#topography">topography</a>; see text for details</span><span style="font-style: italic;"></span></td><td style="vertical-align: top;">Convention for defining the topography grid.</td></tr><tr> 13790 13790 13791 13791 -
palm/trunk/SOURCE/CURRENT_MODIFICATIONS
r216 r217 11 11 User can add additional routines in files user_additional_routines.f90 12 12 13 User can check user parameters and deduce further quantities in user_check_parameters 14 13 15 check_for_restart, check_parameters, data_output_dvrp, init_dvrp, init_pegrid, local_stop, modules, package_parin, palm, surface_coupler, timestep, user_additional_routines 14 16 Makefile, mrun, mbuild, subjob 15 17 16 New: init_coupling 18 New: init_coupling, user_check_parameters 17 19 18 20 … … 41 43 Origin of the xy-coordinate system shifted from the center of the first 42 44 grid cell (indices i=0, j=0) to the south-left corner of this cell. (netcdf) 45 46 Topography definition according to new user parameter topography_grid_convention 47 (init_grid, modules, user_header, user_init_grid, user_parin) 43 48 44 49 Makefile, mbuild, mrun, advec_s_bc, check_parameters, local_stop, modules, netcdf, read_var_list, read_3d_binary, user_read_restart_data -
palm/trunk/SOURCE/Makefile
r213 r217 76 76 timestep_scheme_steering.f90 transpose.f90 user_3d_data_averaging.f90 \ 77 77 user_actions.f90 user_additional_routines.f90 user_advec_particles.f90 \ 78 user_check_data_output.f90 \79 user_check_ data_output_pr.f90 user_data_output_2d.f90 \78 user_check_data_output.f90 user_check_data_output_pr.f90 \ 79 user_check_parameters.f90 user_data_output_2d.f90 \ 80 80 user_data_output_3d.f90 user_data_output_dvrp.f90 \ 81 81 user_define_netcdf_grid.f90 user_dvrp_coltab.f90 user_header.f90 \ … … 116 116 timestep.o timestep_scheme_steering.o transpose.o \ 117 117 user_3d_data_averaging.o user_actions.o user_additional_routines.o \ 118 user_advec_particles.o \119 user_check_data_output .o user_check_data_output_pr.o \118 user_advec_particles.o user_check_data_output.o \ 119 user_check_data_output_pr.o user_check_parameters.o \ 120 120 user_data_output_2d.o user_data_output_3d.o user_data_output_dvrp.o \ 121 121 user_define_netcdf_grid.o user_dvrp_coltab.o user_header.o \ … … 271 271 user_check_data_output.o: modules.o user_module.o 272 272 user_check_data_output_pr.o: modules.o user_module.o 273 user_check_parameters.o: modules.o user_module.o 273 274 user_data_output_2d.o: modules.o user_module.o 274 275 user_data_output_3d.o: modules.o user_module.o -
palm/trunk/SOURCE/check_parameters.f90
r215 r217 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +user_check_parameters 6 7 ! Output of messages replaced by message handling routine. 7 8 ! Implementation of an MPI-1 coupling: replaced myid with target_id, … … 2900 2901 ENDIF 2901 2902 2903 ! 2904 !-- Check &userpar parameters 2905 CALL user_check_parameters 2906 2902 2907 2903 2908 END SUBROUTINE check_parameters -
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 ! -
palm/trunk/SOURCE/modules.f90
r216 r217 5 5 ! Actual revisions: 6 6 ! ----------------- 7 ! +topography_grid_convention 7 8 ! some dvrp-variables changed to single precision, variables for dvrp-mode 8 9 ! pathlines added, +target_id, abort_mode, message_string … … 263 264 CHARACTER (LEN=8) :: run_date, run_time 264 265 CHARACTER (LEN=9) :: simulated_time_chr 266 CHARACTER (LEN=11) :: topography_grid_convention = ' ' 265 267 CHARACTER (LEN=12) :: version = ' ', revision = ' ' 266 268 CHARACTER (LEN=16) :: loop_optimization = 'default', & -
palm/trunk/SOURCE/user_header.f90
r211 r217 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +topography_grid_convention 6 7 ! Former file user_interface.f90 split into one file per subroutine 7 8 ! … … 15 16 !------------------------------------------------------------------------------! 16 17 18 USE control_parameters 17 19 USE statistics 18 20 USE user … … 41 43 ENDIF 42 44 43 45 IF ( TRIM( topography ) /= 'flat' ) THEN 46 WRITE ( io, 300 ) 47 IF ( TRIM( topography_grid_convention ) == ' ' ) THEN 48 IF ( TRIM( topography ) == 'single_building' ) THEN 49 WRITE ( io, 301 ) 50 ELSEIF ( TRIM( topography ) == 'read_from_file' ) THEN 51 WRITE ( io, 302 ) 52 ENDIF 53 ELSEIF ( TRIM( topography_grid_convention ) == 'cell_edge' ) THEN 54 WRITE ( io, 301 ) 55 ELSEIF ( TRIM( topography_grid_convention ) == 'cell_center' ) THEN 56 WRITE ( io, 302 ) 57 ENDIF 58 ENDIF 44 59 45 60 ! … … 51 66 200 FORMAT (' Output of profiles and time series for following regions:' /) 52 67 201 FORMAT (4X,'Region ',I1,': ',A) 68 300 FORMAT (' Topography grid definition convention:'/) 69 301 FORMAT (' cell edge (staggered grid points'/ & 70 ' (u in x-direction, v in y-direction))' /) 71 302 FORMAT (' cell center (scalar grid points)' /) 53 72 54 73 -
palm/trunk/SOURCE/user_init_grid.f90
r211 r217 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +topography_grid_convention 6 7 ! Former file user_interface.f90 split into one file per subroutine 7 8 ! … … 41 42 CASE ( 'user_defined_topography_1' ) 42 43 ! 43 !-- Here the user can define his own topography. After definition, please 44 !-- remove the following three lines! 44 !-- Here the user can define his own topography. 45 46 ! 47 !-- For each user-defined topography, the topography grid convention has 48 !-- to be explicitly set to either 'cell_edge' or 'cell_center'. 49 !-- topography_grid_convention = 'cell_edge' ! OR: 50 !-- topography_grid_convention = 'cell_center' 51 52 ! 53 !-- After definition, please remove the following three lines! 45 54 PRINT*, '+++ user_init_grid: topography "', & 46 55 topography, '" not available yet' -
palm/trunk/SOURCE/user_parin.f90
r211 r217 4 4 ! Actual revisions: 5 5 ! ----------------- 6 ! +topography_grid_convention 6 7 ! Former file user_interface.f90 split into one file per subroutine 7 8 ! … … 27 28 28 29 29 NAMELIST /userpar/ data_output_pr_user, data_output_user, region 30 NAMELIST /userpar/ data_output_pr_user, data_output_user, region, & 31 topography_grid_convention 30 32 31 33 !
Note: See TracChangeset
for help on using the changeset viewer.