Changeset 132


Ignore:
Timestamp:
Nov 20, 2007 9:46:11 AM (14 years ago)
Author:
letzel
Message:

Vertical profiles now based on nzb_s_inner; they are divided by
ngp_2dh_s_inner (scalars, procucts of scalars and velocity components) and
ngp_2dh (staggered velocity components and their products), respectively.

Allow new case bc_uv_t = 'dirichlet_0' for channel flow.

Location:
palm/trunk
Files:
11 edited

Legend:

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

    r62 r132  
    11<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    22<html><head>
    3 <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM
    4 chapter 3.5.3</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14001660"> <meta name="CHANGED" content="20041112;14483720"> <meta name="KEYWORDS" content="parallel LES model"> <style>
     3<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 3.5.3</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14001660"> <meta name="CHANGED" content="20041112;14483720"> <meta name="KEYWORDS" content="parallel LES model"> <style>
    54<!--
    65@page { size: 21cm 29.7cm }
     
    3332declared as: </p>
    3433<ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2">REAL :: rmask
    35 (nys-1:nyn+1,nxl-1,nxr+1,0:9) .</font></tt></p>
     34(nys-1:nyn+1,nxl-1:nxr+1,0:9) .</font></tt></p>
    3635</ul><p style="line-height: 100%;">The first two
    3736indices are the grid point
  • palm/trunk/DOC/app/chapter_4.1.html

    r116 r132  
    2020 
    2121  <title>PALM chapter 4.1</title></head>
    22 
    2322<body>
    2423
     
    17361735     
    17371736      <p>Allowed
    1738 values are <span style="font-style: italic;">'dirichlet'</span>
     1737values are <span style="font-style: italic;">'dirichlet'</span>, <span style="font-style: italic;">'dirichlet_0'</span>
    17391738and <span style="font-style: italic;">'neumann'</span>.
    17401739The
     
    17431742Neumann condition yields the free-slip condition with u(k=nz+1) =
    17441743u(k=nz) and v(k=nz+1) = v(k=nz) (up to k=nz the prognostic equations
    1745 for the velocities are solved).</p>
     1744for the velocities are solved). The special condition&nbsp;<span style="font-style: italic;">'dirichlet_0'</span> can be used for channel flow, it yields the no-slip condition u(k=nz+1) = ug(nz+1) = 0 and v(k=nz+1) =
     1745vg(nz+1) = 0.</p>
    17461746
    17471747
  • palm/trunk/DOC/misc/Tsubame.html

    r130 r132  
    2121Tsubame is located behind a firewall, the usual&nbsp;address  <a class="fixed" href="svn://130.75.105.45" target="_blank">svn://130.75.105.45</a>&nbsp;is unreachable from Tsubame. Instead, please login to media-o
    2222and use&nbsp;<a class="fixed" href="svn://p9c.cc.titech.ac.jp:36900" target="_blank">svn://p9c.cc.titech.ac.jp:36900</a>.
    23 This port works in both directions, i.e. for <code>svn update</code> as well as <code>svn commit</code> commands.</p><h4>Combine plot fields</h4><p>Please add the following line to the output command (<code>OC:</code>) section of your <code>.mrun.config</code> to ensure correct output of 2D and 3D data for PALM runs on more than one CPU&nbsp;:</p><code>OC:[[ \$( echo \$localhost | cut -c1-3 ) = lct ]]&nbsp; &amp;&amp;&nbsp; combine_plot_fields.x</code><br><h4>Batch system<br></h4><p>The implementation of the <span style="font-weight: bold;">n1ge</span> command on
     23This port works in both directions, i.e. for <code>svn update</code> as well as <code>svn commit</code> commands.</p><h4>Batch system<br></h4><p>The implementation of the <span style="font-weight: bold;">n1ge</span> command on
    2424Tsubame requires modifications to&nbsp;<span style="font-weight: bold;">mrun</span> and <span style="font-weight: bold;">subjob</span> for PALM to
    2525run on Tsubame. Since <span style="font-weight: bold;">mrun</span>
     
    4242not always be the best choice. For code development, debugging or short
    4343test runs the value "novice" for both options may be suitable.
    44 Production runs should use the respective production queues (see <a href="http://www.gsic.titech.ac.jp/%7Eccwww/tgc/q_e.html">http://www.gsic.titech.ac.jp/~ccwww/tgc/q_e.html</a> for details).&nbsp;</p><p>The
     44Production runs should use the respective production queues (see <a href="http://www.gsic.titech.ac.jp/%7Eccwww/tgc/q_e.html">http://www.gsic.titech.ac.jp/~ccwww/tgc/q_e.html</a> for details). In the past the queueing system on Tsubame has undergone several changes, so this information may change.</p><p>The
    4545computer center advised us that due to restrictions of the batch system
    4646the value "novice" should not be mixed with the other queues. Please
     
    5353option <code><span style="font-family: Courier New,Courier,monospace;">-m</span></code>
    5454contains the memory demand for the main job <span style="font-weight: bold;">in MB</span> which will be
    55 automatically converted into GB for the <span style="font-weight: bold;">n1ge</span> command.</p><p>Finally, PALM batch jobs on Tsubame require the&nbsp;<span style="font-weight: bold;">mrun</span> option <code>-b</code>.</p><h4>NetCDF</h4><p>In order to use NetCDF commands like <code>ncdump</code>&nbsp;and the graphical NetCDF tools <a href="http://www.ncl.ucar.edu" target="_top">NCL</a> and <a href="http://meteora.ucsd.edu/%7Epierce/ncview_home_page.html" target="_top">Ncview</a>, please add the following lines to  <code><span style="font-family: Courier New,Courier,monospace;">~/.profile</span></code> (for ksh users) or <code>~/.bashrc</code> (for bash users):</p><p><code># NetCDF<br>export PATH=$PATH:~mkanda/netcdf-3.6.2/bin:~mkanda/netcdf-3.6.2/include<br><br></code><code># NCL<br>export NCARG_ROOT=~mkanda/ncl<br>PATH=~mkanda/ncl/bin:$PATH<br><br># Ncview<br>export PATH=$PATH:~mkanda/ncview/bin<br>export XAPPLRESDIR=~mkanda/.app-defaults</code></p><i><br>Last
     55automatically converted into GB for the <span style="font-weight: bold;">n1ge</span> command.</p><p>Finally, PALM batch jobs on Tsubame require the&nbsp;<span style="font-weight: bold;">mrun</span> option <code>-b</code>.</p><h4>NetCDF</h4><p>In order to use <a href="http://www.unidata.ucar.edu/software/netcdf" target="_top">NetCDF</a> commands like <code>ncdump</code>&nbsp;and the graphical NetCDF tools <a href="http://www.ncl.ucar.edu" target="_top">NCL</a>,&nbsp;<a href="http://meteora.ucsd.edu/%7Epierce/ncview_home_page.html" target="_top">Ncview</a> and <a href="http://ferret.pmel.noaa.gov/Ferret" target="_top">Ferret</a>, please add the following lines to  <code><span style="font-family: Courier New,Courier,monospace;">~/.profile</span></code> (for ksh users) or <code>~/.bashrc</code> (for bash users):</p><p><code># NetCDF<br>export PATH=$PATH:~mkanda/netcdf-3.6.2/bin:~mkanda/netcdf-3.6.2/include<br><br></code><code># NCL<br>export NCARG_ROOT=~mkanda/ncl<br>PATH=~mkanda/ncl/bin:$PATH<br><br># Ncview<br>export PATH=$PATH:~mkanda/ncview/bin<br>export XAPPLRESDIR=~mkanda/.app-defaults</code></p><p><code># Ferret<br>export FER_DIR=~mkanda/ferret<br>export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$FER_DIR/lib<br>export PATH=$PATH:$FER_DIR:$FER_DIR/bin<br>export FER_DSETS=$FER_DIR<br>export FER_WEB_BROWSER=firefox<br>export FER_EXTERNAL_FUNCTIONS="$FER_DIR/lib"<br>export FER_GO=". $FER_DIR/go $FER_DIR/examples $FER_DIR/contrib"<br>export FER_DATA="."<br>export FER_DESCR="."<br>export FER_GRIDS=". $FER_DSETS/grids"<br>export TMAP="$FER_DIR/fmt"<br>export PLOTFONTS="$FER_DIR/ppl/fonts"<br>export SPECTRA="$FER_DIR/ppl"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # for old ferret versions<br>export FER_PALETTE=". $FER_DIR/ppl"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # palette search list<br></code></p><i><br>Last
    5656change:</i>&nbsp; $Id$</body></html>
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r130 r132  
    11New:
    22---
     3
     4Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
    35
    46For unknown variables (CASE DEFAULT) call new subroutine user_data_output_dvrp
     
    1315advec_particles after the end of this loop.
    1416
    15 advec_particles, check_parameters, data_output_dvrp, header, init_grid, init_particles, init_pegrid, modules, package_parin, read_var_list, user_interface, write_var_list
     17advec_particles, check_parameters, data_output_dvrp, header, init_3d_model, init_grid, init_particles, init_pegrid, modules, package_parin, read_var_list, user_interface, write_var_list
    1618
    1719
    1820Changed:
    1921-------
     22
     23Vertical profiles now based on nzb_s_inner; they are divided by
     24ngp_2dh_s_inner (scalars, procucts of scalars and velocity components) and
     25ngp_2dh (staggered velocity components and their products), respectively.
    2026
    2127Allow two instead of one digit to specify isosurface and slicer variables.
     
    3339humidity/scalar/salinity in a future release.
    3440
    35 check_open, data_output_dvrp, diffusion_s, header, init_dvrp, modules, prognostic_equations
     41buoyancy, check_open, data_output_dvrp, diffusion_s, diffusivities, flow_statistics, header, init_3d_model, init_dvrp, modules, prognostic_equations
    3642
    3743
  • palm/trunk/SOURCE/buoyancy.f90

    r110 r132  
    44! Actual revisions:
    55! -----------------
    6 !
     6! Vertical scalar profiles now based on nzb_s_inner and ngp_2dh_s_inner.
    77!
    88! Former revisions:
     
    258258          DO  i = nxl, nxr
    259259             DO  j =  nys, nyn
    260                 DO  k = nzb_s_outer(j,i), nzt+1
     260                DO  k = nzb_s_inner(j,i), nzt+1
    261261                   sums_l(k,pr,tn) = sums_l(k,pr,tn) + var(k,j,i)
    262262                ENDDO
     
    280280#endif
    281281
    282           hom(:,1,pr,0) = sums(:,pr) / ngp_2dh_outer(:,0)
     282          hom(:,1,pr,0) = sums(:,pr) / ngp_2dh_s_inner(:,0)
    283283
    284284       ENDIF
  • palm/trunk/SOURCE/check_parameters.f90

    r121 r132  
    44! Actual revisions:
    55! -----------------
     6! Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
    67! Multigrid solver allows topography, checking of dt_sort_particles
    78! Bugfix: initializing u_init and v_init in case of ocean runs
     
    13971398       ibc_uv_t = 1
    13981399    ELSE
    1399        IF ( bc_uv_t == 'dirichlet' )  THEN
     1400       IF ( bc_uv_t == 'dirichlet' .OR. bc_uv_t == 'dirichlet_0' )  THEN
    14001401          ibc_uv_t = 0
    14011402       ELSEIF ( bc_uv_t == 'neumann' )  THEN
  • palm/trunk/SOURCE/diffusivities.f90

    r98 r132  
    44! Actual revisions:
    55! -----------------
     6! Vertical scalar profiles now based on nzb_s_inner and ngp_2dh_s_inner.
    67!
    78!
     
    141142          DO  sr = 0, statistic_regions
    142143             IF ( rmask(j,i,sr) /= 0.0 )  THEN
    143                 DO  k = nzb_s_outer(j,i)+1, nzt
     144                DO  k = nzb_s_inner(j,i)+1, nzt
    144145                   sums_l_l(k,sr,tn) = sums_l_l(k,sr,tn) + l(k)
    145146                ENDDO
  • palm/trunk/SOURCE/flow_statistics.f90

    r110 r132  
    44! Actual revisions:
    55! -----------------
     6! Vertical profiles now based on nzb_s_inner; they are divided by
     7! ngp_2dh_s_inner (scalars, procucts of scalars and velocity components) and
     8! ngp_2dh (staggered velocity components and their products), respectively.
    69!
    710!
     
    4952! user-defined (sub-)regions. The region indexed 0 is the total model domain.
    5053!
    51 ! NOTE: For simplicity, nzb_s_outer and nzb_diff_s_outer are being used as a
    52 ! ----  lower vertical index for k-loops for all variables so that regardless
    53 ! of the variable and its respective staggered grid always the same number of
    54 ! grid points is used for 2D averages. The disadvantage: depending on the
    55 ! variable, up to one grid layer adjacent to the (vertical walls of the)
    56 ! topography is missed out by this simplification.
     54! NOTE: For simplicity, nzb_s_inner and nzb_diff_s_inner are being used as a
     55! ----  lower vertical index for k-loops for all variables, although strictly
     56! speaking the k-loops would have to be split up according to the staggered
     57! grid. However, this implies no error since staggered velocity components are
     58! zero at the walls and inside buildings.
    5759!------------------------------------------------------------------------------!
    5860
     
    124126       DO  i = nxl, nxr
    125127          DO  j =  nys, nyn
    126              DO  k = nzb_s_outer(j,i), nzt+1
     128             DO  k = nzb_s_inner(j,i), nzt+1
    127129                sums_l(k,1,tn)  = sums_l(k,1,tn)  + u(k,j,i)  * rmask(j,i,sr)
    128130                sums_l(k,2,tn)  = sums_l(k,2,tn)  + v(k,j,i)  * rmask(j,i,sr)
     
    138140          DO  i = nxl, nxr
    139141             DO  j =  nys, nyn
    140                 DO  k = nzb_s_outer(j,i), nzt+1
     142                DO  k = nzb_s_inner(j,i), nzt+1
    141143                   sums_l(k,23,tn)  = sums_l(k,23,tn) + &
    142144                                      sa(k,j,i) * rmask(j,i,sr)
     
    154156          DO  i = nxl, nxr
    155157             DO  j =  nys, nyn
    156                 DO  k = nzb_s_outer(j,i), nzt+1
     158                DO  k = nzb_s_inner(j,i), nzt+1
    157159                   sums_l(k,44,tn)  = sums_l(k,44,tn) + &
    158160                                      vpt(k,j,i) * rmask(j,i,sr)
     
    166168             DO  i = nxl, nxr
    167169                DO  j =  nys, nyn
    168                    DO  k = nzb_s_outer(j,i), nzt+1
     170                   DO  k = nzb_s_inner(j,i), nzt+1
    169171                      sums_l(k,42,tn) = sums_l(k,42,tn) + &
    170172                                      ( q(k,j,i) - ql(k,j,i) ) * rmask(j,i,sr)
     
    184186          DO  i = nxl, nxr
    185187             DO  j =  nys, nyn
    186                 DO  k = nzb_s_outer(j,i), nzt+1
     188                DO  k = nzb_s_inner(j,i), nzt+1
    187189                   sums_l(k,41,tn)  = sums_l(k,41,tn) + q(k,j,i) * rmask(j,i,sr)
    188190                ENDDO
     
    265267!--    Final values are obtained by division by the total number of grid points
    266268!--    used for summation. After that store profiles.
    267        sums(:,1) = sums(:,1) / ngp_2dh_outer(:,sr)
    268        sums(:,2) = sums(:,2) / ngp_2dh_outer(:,sr)
    269        sums(:,4) = sums(:,4) / ngp_2dh_outer(:,sr)
     269       sums(:,1) = sums(:,1) / ngp_2dh(sr)
     270       sums(:,2) = sums(:,2) / ngp_2dh(sr)
     271       sums(:,4) = sums(:,4) / ngp_2dh_s_inner(:,sr)
    270272       hom(:,1,1,sr) = sums(:,1)             ! u
    271273       hom(:,1,2,sr) = sums(:,2)             ! v
     
    275277!--    Salinity
    276278       IF ( ocean )  THEN
    277           sums(:,23) = sums(:,23) / ngp_2dh_outer(:,sr)
     279          sums(:,23) = sums(:,23) / ngp_2dh_s_inner(:,sr)
    278280          hom(:,1,23,sr) = sums(:,23)             ! sa
    279281       ENDIF
     
    282284!--    Humidity and cloud parameters
    283285       IF ( humidity ) THEN
    284           sums(:,44) = sums(:,44) / ngp_2dh_outer(:,sr)
    285           sums(:,41) = sums(:,41) / ngp_2dh_outer(:,sr)
     286          sums(:,44) = sums(:,44) / ngp_2dh_s_inner(:,sr)
     287          sums(:,41) = sums(:,41) / ngp_2dh_s_inner(:,sr)
    286288          hom(:,1,44,sr) = sums(:,44)             ! vpt
    287289          hom(:,1,41,sr) = sums(:,41)             ! qv (q)
    288290          IF ( cloud_physics ) THEN
    289              sums(:,42) = sums(:,42) / ngp_2dh_outer(:,sr)
    290              sums(:,43) = sums(:,43) / ngp_2dh_outer(:,sr)
     291             sums(:,42) = sums(:,42) / ngp_2dh_s_inner(:,sr)
     292             sums(:,43) = sums(:,43) / ngp_2dh_s_inner(:,sr)
    291293             hom(:,1,42,sr) = sums(:,42)             ! qv
    292294             hom(:,1,43,sr) = sums(:,43)             ! pt
     
    296298!
    297299!--    Passive scalar
    298        IF ( passive_scalar )  hom(:,1,41,sr) = sums(:,41) / ngp_2dh_outer(:,sr)
     300       IF ( passive_scalar )  hom(:,1,41,sr) = sums(:,41) /  &
     301            ngp_2dh_s_inner(:,sr)                    ! s (q)
    299302
    300303!
     
    302305!--    variances, the total and the perturbation energy (single values in last
    303306!--    column of sums_l) and some diagnostic quantities.
    304 !--    NOTE: for simplicity, nzb_s_outer is used below, although strictly
     307!--    NOTE: for simplicity, nzb_s_inner is used below, although strictly
    305308!--    ----  speaking the following k-loop would have to be split up and
    306309!--          rearranged according to the staggered grid.
     310!--          However, this implies no error since staggered velocity components
     311!--          are zero at the walls and inside buildings.
    307312       tn = 0
    308313#if defined( __intel_openmp_bug )
     
    319324             sums_l_etot = 0.0
    320325             sums_l_eper = 0.0
    321              DO  k = nzb_s_outer(j,i), nzt+1
     326             DO  k = nzb_s_inner(j,i), nzt+1
    322327                u2   = u(k,j,i)**2
    323328                v2   = v(k,j,i)**2
     
    382387!--          Subgridscale fluxes (without Prandtl layer from k=nzb,
    383388!--          oterwise from k=nzb+1)
    384 !--          NOTE: for simplicity, nzb_diff_s_outer is used below, although
     389!--          NOTE: for simplicity, nzb_diff_s_inner is used below, although
    385390!--          ----  strictly speaking the following k-loop would have to be
    386391!--                split up according to the staggered grid.
    387              DO  k = nzb_diff_s_outer(j,i)-1, nzt_diff
     392!--                However, this implies no error since staggered velocity
     393!--                components are zero at the walls and inside buildings.
     394
     395             DO  k = nzb_diff_s_inner(j,i)-1, nzt_diff
    388396!
    389397!--             Momentum flux w"u"
     
    528536!
    529537!--          Resolved fluxes (can be computed for all horizontal points)
    530 !--          NOTE: for simplicity, nzb_s_outer is used below, although strictly
     538!--          NOTE: for simplicity, nzb_s_inner is used below, although strictly
    531539!--          ----  speaking the following k-loop would have to be split up and
    532540!--                rearranged according to the staggered grid.
    533              DO  k = nzb_s_outer(j,i), nzt
     541             DO  k = nzb_s_inner(j,i), nzt
    534542                ust = 0.5 * ( u(k,j,i)   - hom(k,1,1,sr) + &
    535543                              u(k+1,j,i) - hom(k+1,1,1,sr) )
     
    634642          DO  i = nxl, nxr
    635643             DO  j = nys, nyn
    636                 DO  k = nzb_s_outer(j,i)+1, nzt
     644                DO  k = nzb_s_inner(j,i)+1, nzt
    637645
    638646                   sums_ll(k,1) = sums_ll(k,1) + 0.5 * w(k,j,i) * (        &
     
    656664          sums_ll(nzt+1,2) = 0.0
    657665
    658           DO  k = nzb_s_outer(j,i)+1, nzt
     666          DO  k = nzb_s_inner(j,i)+1, nzt
    659667             sums_l(k,55,tn) = ( sums_ll(k,1) - sums_ll(k-1,1) ) * ddzw(k)
    660668             sums_l(k,56,tn) = ( sums_ll(k,2) - sums_ll(k-1,2) ) * ddzw(k)
     
    674682          DO  i = nxl, nxr
    675683             DO  j = nys, nyn
    676                 DO  k = nzb_s_outer(j,i)+1, nzt
     684                DO  k = nzb_s_inner(j,i)+1, nzt
    677685
    678686                   sums_l(k,57,tn) = sums_l(k,57,tn) - 0.5 * (                 &
     
    701709          DO  i = nxl, nxr
    702710             DO  j = nys, nyn
    703                 DO  k = nzb_s_outer(j,i)+1, nzt
     711                DO  k = nzb_s_inner(j,i)+1, nzt
    704712!
    705713!--                Subgrid horizontal heat fluxes u"pt", v"pt"
     
    773781!--    Profiles:
    774782       DO  k = nzb, nzt+1
    775           sums(k,:pr_palm-2)      = sums(k,:pr_palm-2) / ngp_2dh_outer(k,sr)
     783          sums(k,3)               = sums(k,3)           / ngp_2dh(sr)
     784          sums(k,9:11)            = sums(k,9:11)        / ngp_2dh_s_inner(k,sr)
     785          sums(k,12:22)           = sums(k,12:22)       / ngp_2dh(sr)
     786          sums(k,23:29)           = sums(k,23:29)       / ngp_2dh_s_inner(k,sr)
     787          sums(k,30:32)           = sums(k,30:32)       / ngp_2dh(sr)
     788          sums(k,33)              = sums(k,33)          / ngp_2dh_s_inner(k,sr)
     789          sums(k,34:39)           = sums(k,34:39)       / ngp_2dh(sr)
     790          sums(k,40)              = sums(k,40)          / ngp_2dh_s_inner(k,sr)
     791          sums(k,45:53)           = sums(k,45:53)       / ngp_2dh(sr)
     792          sums(k,54)              = sums(k,54)          / ngp_2dh_s_inner(k,sr)
     793          sums(k,55:63)           = sums(k,55:63)       / ngp_2dh(sr)
     794          sums(k,64)              = sums(k,64)          / ngp_2dh_s_inner(k,sr)
     795          sums(k,65:69)           = sums(k,65:69)       / ngp_2dh(sr)
     796          sums(k,70:pr_palm-2)    = sums(k,70:pr_palm-2)/ ngp_2dh_s_inner(k,sr)
    776797       ENDDO
    777798!--    Upstream-parts
     
    785806!--    eges, e*
    786807       sums(nzb+4:nzb+5,pr_palm)  = sums(nzb+4:nzb+5,pr_palm)  / &
    787                                     ngp_3d_inner(sr)
     808                                    ngp_3d(sr)
    788809!--    Old and new divergence
    789810       sums(nzb+9:nzb+10,pr_palm) = sums(nzb+9:nzb+10,pr_palm) / &
     
    795816             sums(k,pr_palm+1:pr_palm+max_pr_user) = &
    796817                                    sums(k,pr_palm+1:pr_palm+max_pr_user) / &
    797                                     ngp_2dh_outer(k,sr)
     818                                    ngp_2dh_s_inner(k,sr)
    798819          ENDDO
    799820       ENDIF
  • palm/trunk/SOURCE/header.f90

    r130 r132  
    44! Actual revisions:
    55! -----------------
    6 ! allow two instead of one digit to specify isosurface and slicer variables
     6! Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
     7! Allow two instead of one digit to specify isosurface and slicer variables.
    78! Output of sorting frequency of particles
    89!
     
    384385       runten = TRIM( runten ) // ' uv(0)     = uv(1)                 |'
    385386    ENDIF
    386     IF ( ibc_uv_t == 0 )  THEN
     387    IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
     388       roben  = TRIM( roben  ) // ' uv(nzt+1) = 0                     |'
     389    ELSEIF ( ibc_uv_t == 0 )  THEN
    387390       roben  = TRIM( roben  ) // ' uv(nzt+1) = ug(nzt+1), vg(nzt+1)  |'
    388391    ELSE
  • palm/trunk/SOURCE/init_3d_model.f90

    r110 r132  
    77! Actual revisions:
    88! -----------------
    9 !
     9! New counter ngp_2dh_s_inner.
     10! Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
     11! Corrected calculation of initial volume flow for 'set_1d-model_profiles' and
     12! 'set_constant_profiles' in case of buildings in the reference cross-sections.
    1013!
    1114! Former revisions:
     
    8083    INTEGER, DIMENSION(:), ALLOCATABLE ::  ngp_2dh_l, ngp_3d_inner_l
    8184
    82     INTEGER, DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer_l
     85    INTEGER, DIMENSION(:,:), ALLOCATABLE ::  ngp_2dh_outer_l,  &
     86         ngp_2dh_s_inner_l
    8387
    8488    REAL, DIMENSION(1:2) ::  volume_flow_area_l, volume_flow_initial_l
     
    97101              ngp_2dh_outer(nzb:nzt+1,0:statistic_regions),                 &
    98102              ngp_2dh_outer_l(nzb:nzt+1,0:statistic_regions),               &
     103              ngp_2dh_s_inner(nzb:nzt+1,0:statistic_regions),               &
     104              ngp_2dh_s_inner_l(nzb:nzt+1,0:statistic_regions),             &
    99105              rmask(nys-1:nyn+1,nxl-1:nxr+1,0:statistic_regions),           &
    100106              sums(nzb:nzt+1,pr_palm+max_pr_user),                          &
     
    426432                ENDDO
    427433             ENDDO
     434             IF ( conserve_volume_flow )  THEN
     435                IF ( nxr == nx )  THEN
     436                   DO  j = nys, nyn
     437                      DO  k = nzb + 1, nzb_u_inner(j,nx)
     438                         u_nzb_p1_for_vfc(j) = u1d(k) * dzu(k)
     439                      ENDDO
     440                   ENDDO
     441                ENDIF
     442                IF ( nyn == ny )  THEN
     443                   DO  i = nxl, nxr
     444                      DO  k = nzb + 1, nzb_v_inner(ny,i)
     445                         v_nzb_p1_for_vfc(i) = v1d(k) * dzu(k)
     446                      ENDDO
     447                   ENDDO
     448                ENDIF
     449             ENDIF
    428450!
    429451!--          WARNING: The extra boundary conditions set after running the
     
    486508             IF ( nxr == nx )  THEN
    487509                DO  j = nys, nyn
    488                    k = nzb_u_inner(j,nx) + 1
    489                    u_nzb_p1_for_vfc(j) = u_init(k) * dzu(k)
     510                   DO  k = nzb + 1, nzb_u_inner(j,nx) + 1
     511                      u_nzb_p1_for_vfc(j) = u_init(k) * dzu(k)
     512                   ENDDO
    490513                ENDDO
    491514             ENDIF
    492515             IF ( nyn == ny )  THEN
    493516                DO  i = nxl, nxr
    494                    k = nzb_v_inner(ny,i) + 1
    495                    v_nzb_p1_for_vfc(i) = v_init(k) * dzu(k)
     517                   DO  k = nzb + 1, nzb_v_inner(ny,i) + 1
     518                      v_nzb_p1_for_vfc(i) = v_init(k) * dzu(k)
     519                   ENDDO
    496520                ENDDO
    497521             ENDIF
     
    561585
    562586!
     587!--    apply channel flow boundary condition
     588       IF ( TRIM( bc_uv_t ) == 'dirichlet_0' )  THEN
     589
     590          u(nzt+1,:,:) = 0.0
     591          v(nzt+1,:,:) = 0.0
     592
     593!--       for the Dirichlet condition to be correctly applied at the top, set
     594!--       ug and vg to zero there
     595          ug(nzt+1)    = 0.0
     596          vg(nzt+1)    = 0.0
     597
     598       ENDIF
     599
     600!
    563601!--    Calculate virtual potential temperature
    564602       IF ( humidity ) vpt = pt * ( 1.0 + 0.61 * q )
     
    10361074!--          total domain
    10371075!-- ngp_3d:  number of grid points of the total domain
    1038 !-- Note: The lower vertical index nzb_s_outer imposes a small error on the 2D
    1039 !-- ----  averages of staggered variables such as u and v due to the topography
    1040 !--       arrangement on the staggered grid. Maybe revise later.
    1041     ngp_2dh_outer_l = 0
    1042     ngp_2dh_outer   = 0
    1043     ngp_2dh_l       = 0
    1044     ngp_2dh         = 0
    1045     ngp_3d_inner_l  = 0
    1046     ngp_3d_inner    = 0
    1047     ngp_3d          = 0
    1048     ngp_sums        = ( nz + 2 ) * ( pr_palm + max_pr_user )
     1076    ngp_2dh_outer_l   = 0
     1077    ngp_2dh_outer     = 0
     1078    ngp_2dh_s_inner_l = 0
     1079    ngp_2dh_s_inner   = 0
     1080    ngp_2dh_l         = 0
     1081    ngp_2dh           = 0
     1082    ngp_3d_inner_l    = 0
     1083    ngp_3d_inner      = 0
     1084    ngp_3d            = 0
     1085    ngp_sums          = ( nz + 2 ) * ( pr_palm + max_pr_user )
    10491086
    10501087    DO  sr = 0, statistic_regions
     
    10591096                DO  k = nzb_s_outer(j,i), nz + 1
    10601097                   ngp_2dh_outer_l(k,sr) = ngp_2dh_outer_l(k,sr) + 1
     1098                ENDDO
     1099                DO  k = nzb_s_inner(j,i), nz + 1
     1100                   ngp_2dh_s_inner_l(k,sr) = ngp_2dh_s_inner_l(k,sr) + 1
    10611101                ENDDO
    10621102!
     
    10751115    CALL MPI_ALLREDUCE( ngp_2dh_outer_l(0,0), ngp_2dh_outer(0,0), (nz+2)*sr, &
    10761116                        MPI_INTEGER, MPI_SUM, comm2d, ierr )
     1117    CALL MPI_ALLREDUCE( ngp_2dh_s_inner_l(0,0), ngp_2dh_s_inner(0,0),        &
     1118                        (nz+2)*sr, MPI_INTEGER, MPI_SUM, comm2d, ierr )
    10771119    CALL MPI_ALLREDUCE( ngp_3d_inner_l(0), ngp_3d_inner(0), sr, MPI_INTEGER, &
    10781120                        MPI_SUM, comm2d, ierr )
    10791121#else
    1080     ngp_2dh       = ngp_2dh_l
    1081     ngp_2dh_outer = ngp_2dh_outer_l
    1082     ngp_3d_inner  = ngp_3d_inner_l
     1122    ngp_2dh         = ngp_2dh_l
     1123    ngp_2dh_outer   = ngp_2dh_outer_l
     1124    ngp_2dh_s_inner = ngp_2dh_s_inner_l
     1125    ngp_3d_inner    = ngp_3d_inner_l
    10831126#endif
    10841127
  • palm/trunk/SOURCE/modules.f90

    r129 r132  
    55! Actual revisions:
    66! -----------------
    7 ! +dt_sort_particles, time_sort_particles, flags, wall_flags_1..10
    8 ! wall_humidityflux(0:4), wall_qflux(0:4), wall_salinityflux(0:4),
    9 ! wall_scalarflux(0:4)
     7! +dt_sort_particles, ngp_2dh_s_inner, time_sort_particles, flags,
     8! wall_flags_1..10, wall_humidityflux(0:4), wall_qflux(0:4),
     9! wall_salinityflux(0:4), wall_scalarflux(0:4)
    1010!
    1111! Former revisions:
     
    588588
    589589    INTEGER, DIMENSION(:,:), ALLOCATABLE ::                                    &
    590                 ngp_2dh_outer, mg_loc_ind, nzb_diff_s_inner, nzb_diff_s_outer, &
    591                 nzb_diff_u, nzb_diff_v, nzb_inner, nzb_outer, nzb_s_inner,     &
    592                 nzb_s_outer, nzb_u_inner, nzb_u_outer, nzb_v_inner,            &
    593                 nzb_v_outer, nzb_w_inner, nzb_w_outer, nzb_2d
     590                ngp_2dh_outer, ngp_2dh_s_inner, mg_loc_ind, nzb_diff_s_inner, &
     591                nzb_diff_s_outer, nzb_diff_u, nzb_diff_v, nzb_inner, nzb_outer,&
     592                nzb_s_inner, nzb_s_outer, nzb_u_inner, nzb_u_outer,            &
     593                nzb_v_inner, nzb_v_outer, nzb_w_inner, nzb_w_outer, nzb_2d
    594594
    595595    INTEGER, DIMENSION(:,:,:), POINTER ::  flags
Note: See TracChangeset for help on using the changeset viewer.