Changeset 217 for palm


Ignore:
Timestamp:
Dec 9, 2008 6:00:48 PM (16 years ago)
Author:
letzel
Message:
  • NCL scripts in trunk/SCRIPTS/NCL updated
Location:
palm/trunk
Files:
7 added
12 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/DOC/app/chapter_3.5.1.html

    r212 r217  
    106106new <a href="chapter_4.1.html#topography">topography</a>&nbsp;mode
    107107in the&nbsp;<tt><font style="font-size: 10pt;" size="2">SELECT CASE( TRIM(topography) ) </font></tt>command
    108 in&nbsp;<tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>.
     108and the definition of <a href="chapter_4.3.html#topography_grid_convention">topography_grid_convention</a> in&nbsp;<tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>.
    109109Note that the <a href="chapter_4.1.html#topography">topography</a>&nbsp;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>
     111and <span style="font-style: italic;">'read_from_file'</span> are not allowed here since these are the standard cases used in the
    113112calling routine <tt><font style="font-size: 10pt;" size="2">init_grid</font></tt>. </p> <p>CPU
    114113time for <tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>
    115114is considered in the local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a>
    116115within the category &ldquo;initialisation&rdquo;.</p> </td>
    117 </tr> <tr><td style="vertical-align: top;">In
     116</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 &amp;userpar control parameters and deduce further quantities.</td></tr><tr><td style="vertical-align: top;">In
    118117the 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
    119118the complete initialization of the 3d model. The user is responsible to
  • palm/trunk/DOC/app/chapter_4.1.html

    r197 r217  
    1398513985
    1398613986
    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>
     13987The 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>
    1399013988
    1399113989
     
    1403614034information</font></font><font color="#000000">
    1403714035in m. These data&nbsp;<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>
     14036exactly match the horizontal grid.<br></font> </div>
    1404114037
    1404214038
     
    1405414050 </span><font color="#000000">
    1405514051Alternatively, 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>
     14052to 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>&nbsp;to either <span style="font-style: italic;">'cell_edge'</span> or <span style="font-style: italic;">'cell_center'</span>.<br>
    1405714053
    1405814054      <font color="#000000">
  • palm/trunk/DOC/app/chapter_4.3.html

    r89 r217  
    5555(1) to <b>region</b> (9)), the total domain has the index
    56560 (<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&nbsp;topography grid.<br><br>Possible values are<br><ul><li><span style="font-style: italic;">'cell_edge':&nbsp;</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&nbsp;<a href="chapter_4.1.html#dx">dx</a> and&nbsp;<a href="chapter_4.1.html#dy">dy</a>. This is convenient&nbsp;for resolution parameter studies.</li><li><span style="font-style: italic;">'cell_center'</span><span style="font-style: italic;">:&nbsp;</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.&nbsp;For example, <a href="chapter_4.1.html#topography">topography</a> = <span style="font-style: italic;">'read_from_file'</span> is constructed using&nbsp;the input file <a href="chapter_3.4.html#TOPOGRAPHY_DATA">TOPOGRAPHY_DATA</a><font color="#000000">.&nbsp;</font>The
     58advantage of this setting is that the&nbsp;rastered topography cells of
     59the input file are directly mapped to topography grid boxes in PALM. <span style="font-style: italic;"></span></li></ul>The example files for&nbsp;<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>
     61illustrate the difference between
     62both approaches. Both examples simulate a single building and yield the
     63same 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&nbsp;<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&nbsp; <span style="font-weight: bold;">topography_grid_convention</span> because appropriate default values apply</li></ul></td></tr> </tbody>
    5864</table><p style="line-height: 200%;">&nbsp; <br>
    5965&nbsp; </p>
  • palm/trunk/DOC/app/chapter_4.6.html

    r197 r217  
    1378713787
    1378813788
    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&nbsp;topography grid.</td></tr><tr>
    1379013790
    1379113791
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r216 r217  
    1111User can add additional routines in files user_additional_routines.f90
    1212
     13User can check user parameters and deduce further quantities in user_check_parameters
     14
    1315check_for_restart, check_parameters, data_output_dvrp, init_dvrp, init_pegrid, local_stop, modules, package_parin, palm, surface_coupler, timestep, user_additional_routines
    1416Makefile, mrun, mbuild, subjob
    1517
    16 New: init_coupling
     18New: init_coupling, user_check_parameters
    1719
    1820
     
    4143Origin of the xy-coordinate system shifted from the center of the first
    4244grid cell (indices i=0, j=0) to the south-left corner of this cell. (netcdf)
     45
     46Topography definition according to new user parameter topography_grid_convention
     47(init_grid, modules, user_header, user_init_grid, user_parin)
    4348
    4449Makefile, 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  
    7676        timestep_scheme_steering.f90 transpose.f90 user_3d_data_averaging.f90 \
    7777        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 \
    8080        user_data_output_3d.f90 user_data_output_dvrp.f90 \
    8181        user_define_netcdf_grid.f90 user_dvrp_coltab.f90 user_header.f90 \
     
    116116        timestep.o timestep_scheme_steering.o transpose.o \
    117117        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 \
    120120        user_data_output_2d.o user_data_output_3d.o user_data_output_dvrp.o \
    121121        user_define_netcdf_grid.o user_dvrp_coltab.o user_header.o \
     
    271271user_check_data_output.o: modules.o user_module.o
    272272user_check_data_output_pr.o: modules.o user_module.o
     273user_check_parameters.o: modules.o user_module.o
    273274user_data_output_2d.o: modules.o user_module.o
    274275user_data_output_3d.o: modules.o user_module.o
  • palm/trunk/SOURCE/check_parameters.f90

    r215 r217  
    44! Actual revisions:
    55! -----------------
     6! +user_check_parameters
    67! Output of messages replaced by message handling routine.
    78! Implementation of an MPI-1 coupling: replaced myid with target_id,
     
    29002901    ENDIF
    29012902
     2903!
     2904!-- Check &userpar parameters
     2905    CALL user_check_parameters
     2906
    29022907
    29032908 END SUBROUTINE check_parameters
  • palm/trunk/SOURCE/init_grid.f90

    r145 r217  
    44! Actual revisions:
    55! -----------------
    6 !
     6! +topography_grid_convention
    77!
    88! Former revisions:
     
    372372
    373373!
    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.
    377375          nzb_local = 0
    378376          nzb_local(bys:byn,bxl:bxr) = bh
     
    419417!
    420418!--       The DEFAULT case is reached either if the parameter topography
    421 !--       contains a wrong character string or if the user has coded a special
     419!--       contains a wrong character string or if the user has defined a special
    422420!--       case in the user interface. There, the subroutine user_init_grid
    423421!--       checks which of these two conditions applies.
     
    435433!
    436434!-- Consistency checks and index array initialization are only required for
    437 !-- non-flat topography, also the initialization of topography heigth arrays
     435!-- non-flat topography, also the initialization of topography height arrays
    438436!-- zu_s_inner and zw_w_inner
    439437    IF ( TRIM( topography ) /= 'flat' )  THEN
     
    472470       ENDIF
    473471
     472       IF ( topography_grid_convention == 'cell_edge' )  THEN
    474473!
    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
    496499
    497500!
  • palm/trunk/SOURCE/modules.f90

    r216 r217  
    55! Actual revisions:
    66! -----------------
     7! +topography_grid_convention
    78! some dvrp-variables changed to single precision, variables for dvrp-mode
    89! pathlines added, +target_id, abort_mode, message_string
     
    263264    CHARACTER (LEN=8)    ::  run_date, run_time
    264265    CHARACTER (LEN=9)    ::  simulated_time_chr
     266    CHARACTER (LEN=11)   ::  topography_grid_convention = ' '
    265267    CHARACTER (LEN=12)   ::  version = ' ', revision = ' '
    266268    CHARACTER (LEN=16)   ::  loop_optimization = 'default', &
  • palm/trunk/SOURCE/user_header.f90

    r211 r217  
    44! Actual revisions:
    55! -----------------
     6! +topography_grid_convention
    67! Former file user_interface.f90 split into one file per subroutine
    78!
     
    1516!------------------------------------------------------------------------------!
    1617
     18    USE control_parameters
    1719    USE statistics
    1820    USE user
     
    4143    ENDIF
    4244
    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
    4459
    4560!
     
    5166200 FORMAT (' Output of profiles and time series for following regions:' /)
    5267201 FORMAT (4X,'Region ',I1,':   ',A)
     68300 FORMAT (' Topography grid definition convention:'/)
     69301 FORMAT (' cell edge (staggered grid points'/  &
     70            ' (u in x-direction, v in y-direction))' /)
     71302 FORMAT (' cell center (scalar grid points)' /)
    5372
    5473
  • palm/trunk/SOURCE/user_init_grid.f90

    r211 r217  
    44! Actual revisions:
    55! -----------------
     6! +topography_grid_convention
    67! Former file user_interface.f90 split into one file per subroutine
    78!
     
    4142       CASE ( 'user_defined_topography_1' )
    4243!
    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!
    4554          PRINT*, '+++ user_init_grid: topography "', &
    4655               topography, '" not available yet'
  • palm/trunk/SOURCE/user_parin.f90

    r211 r217  
    44! Actual revisions:
    55! -----------------
     6! +topography_grid_convention
    67! Former file user_interface.f90 split into one file per subroutine
    78!
     
    2728
    2829
    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
    3032
    3133!
Note: See TracChangeset for help on using the changeset viewer.