Changeset 138 for palm/trunk


Ignore:
Timestamp:
Nov 28, 2007 10:03:58 AM (17 years ago)
Author:
letzel
Message:

Plant canopy model of Watanabe (2004,BLM 112,307-341) added.

Location:
palm/trunk
Files:
1 added
14 edited

Legend:

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

    r130 r138  
    8181within the category &ldquo;initialisation&rdquo;.</p><p>See
    8282also <tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a href="#user_init_3d_model">user_init_3d_model</a>.</font></font></tt></p>
    83 </td> </tr> <tr> <td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
     83</td> </tr> <tr><td><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
     84case of <tt><font style="font-size: 10pt;" size="2">SELECT
     85CASE( TRIM(canopy_mode) ) </font></tt>command in the
     86middle&nbsp;of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></td><td><a name="user_init_plant_canopy"></a><code>user_init_plant_canopy</code></td><td>User-defined initilisation of the plant canopy model.<br><br>Here, the user can define the two three-dimensional arrays <code>lad_s and cdc </code>that
     87stand for the leaf area density and the canopy drag coefficient. By
     88this, the user can configure a&nbsp;plant canopy. This requires
     89definition of at least one
     90new&nbsp;<a href="chapter_4.1.html#canopy_mode">canopy_mode</a>&nbsp;in the&nbsp;<tt><font style="font-size: 10pt;" size="2">SELECT CASE( TRIM(canopy_mode) ) </font></tt>command
     91in&nbsp;<tt><font style="font-size: 10pt;" size="2">user_init_plant_canopy</font></tt>.
     92Note that the&nbsp;<a href="chapter_4.1.html#canopy_mode">canopy_mode</a>&nbsp;<span style="font-style: italic;">'block'</span> is<span style="font-style: italic;"></span> not allowed here since it is the standard case used in the
     93calling routine <tt><font style="font-size: 10pt;" size="2">init_3d_model</font></tt>. </td></tr><tr> <td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
    8494case of <tt><font style="font-size: 10pt;" size="2">SELECT
    8595CASE( TRIM(topography) ) </font></tt>command in the
  • palm/trunk/DOC/app/chapter_4.1.html

    r134 r138  
    21002100
    21012101
    2102  <tr>
     2102 <tr><td><a name="canopy_mode"></a><span style="font-weight: bold;">canopy_mode</span></td><td>C * 20</td><td><span style="font-style: italic;">'block'</span></td><td>Canopy mode.<br><br><font color="#000000">
     2103Besides using the default value, that will create a horizontally
     2104homogeneous plant canopy that extends over the total horizontal
     2105extension of the model domain, the user may add code to the user
     2106interface subroutine <a href="chapter_3.5.1.html#user_init_plant_canopy">user_init_plant_canopy</a>
     2107to allow further canopy&nbsp;modes. <br><br>The setting of <a href="#canopy_mode">canopy_mode</a> becomes only active, if&nbsp;<a href="#plant_canopy">plant_canopy</a> has been set <span style="font-style: italic;">.T.</span> and a non-zero <a href="#drag_coefficient">drag_coefficient</a> has been defined.</font></td></tr><tr>
    21032108
    21042109
     
    26212626
    26222627
    2623     <tr>
     2628    <tr><td><a name="drag_coefficient"></a><span style="font-weight: bold;">drag_coefficient</span></td><td>R</td><td><span style="font-style: italic;">0.0</span></td><td>Drag coefficient used in the plant canopy model.<br><br>This parameter has to be non-zero, if the parameter <a href="#plant_canopy">plant_canopy</a> is set <span style="font-style: italic;">.T.</span>.</td></tr><tr>
    26242629
    26252630
     
    46954700
    46964701
    4697  <tr>
     4702 <tr><td><a name="lad_surface"></a><span style="font-weight: bold;">lad_surface</span></td><td>R</td><td><span style="font-style: italic;">0.0</span></td><td>Surface value of the leaf area density (in m<sup>2</sup>/m<sup>3</sup>).<br><br>This
     4703parameter assigns the value of the leaf area density <span style="font-weight: bold;">lad</span> at the surface (k=0)<b>.</b> Starting from this value,
     4704the leaf area density profile is constructed with <a href="chapter_4.1.html#lad_vertical_gradient">lad_vertical_gradient</a>
     4705and <a href="chapter_4.1.html#lad_vertical_gradient_level">lad_vertical_gradient_level
     4706      </a>.</td></tr><tr><td><a name="lad_vertical_gradient"></a><span style="font-weight: bold;">lad_vertical_gradient</span></td><td>R (10)</td><td><span style="font-style: italic;">10 * 0.0</span></td><td>Gradient(s) of the leaf area density (in&nbsp;m<sup>2</sup>/m<sup>4</sup>).<br><br><p>This leaf area density gradient
     4707holds starting from the height&nbsp;
     4708level defined by <a href="chapter_4.1.html#lad_vertical_gradient_level">lad_vertical_gradient_level</a>
     4709(precisely: for all uv levels k where zu(k) &gt; lad_vertical_gradient_level, lad(k) is set: lad(k) = lad(k-1) + dzu(k) * <b>lad_vertical_gradient</b>)
     4710up to the level defined by <a href="#pch_index">pch_index</a>. Above that level lad(k) will automatically set to 0.0. A total of 10 different gradients for 11 height intervals (10 intervals
     4711if <a href="chapter_4.1.html#lad_vertical_gradient_level">lad_vertical_gradient_level</a>(1)
     4712= <i>0.0</i>) can be assigned. The leaf area density at the surface is
     4713assigned via <a href="chapter_4.1.html#lad_surface">lad_surface</a>.&nbsp;
     4714      </p></td></tr><tr><td><a name="lad_vertical_gradient_level"></a><span style="font-weight: bold;">lad_vertical_gradient_level</span></td><td>R (10)</td><td><span style="font-style: italic;">10 * 0.0</span></td><td>Height level from which on the&nbsp;gradient
     4715of the leaf area density defined by <a href="chapter_4.1.html#lad_vertical_gradient">lad_vertical_gradient_level</a>
     4716is effective (in m).<br><br>The height levels have to be assigned in ascending order. The
     4717default values result in a leaf area density that is constant with height uup to the top of the plant canopy layer defined by <a href="#pch_index">pch_index</a>. For the piecewise construction of temperature profiles see <a href="chapter_4.1.html#lad_vertical_gradient">lad_vertical_gradient</a>.</td></tr><tr>
    46984718
    46994719
     
    70957115
    70967116
    7097  <tr>
     7117 <tr><td><a name="pch_index"></a><span style="font-weight: bold;">pch_index</span></td><td>I</td><td><span style="font-style: italic;">0</span></td><td>Grid point index (scalar) of the upper boundary of the plant canopy layer.<br><br>Above <span style="font-weight: bold;">pch_index</span> the arrays of leaf area density and drag_coeffient are automatically set to zero in case of <a href="#plant_canopy">plant_canopy</a> = .T.. Up to <span style="font-weight: bold;">pch_index</span> a leaf area density profile can be prescribed by using the parameters <a href="#lad_surface">lad_surface</a>, <a href="#lad_vertical_gradient">lad_vertical_gradient</a> and <a href="#lad_vertical_gradient_level">lad_vertical_gradient_level</a>.</td></tr><tr>
    70987118
    70997119
     
    71627182
    71637183
    7164  <tr>
     7184 <tr><td><a name="plant_canopy"></a><span style="font-weight: bold;">plant_canopy</span></td><td>L</td><td><span style="font-style: italic;">.F.</span></td><td>Switch for the plant_canopy_model.<br><br>If <span style="font-weight: bold;">plant_canopy</span> is set <span style="font-style: italic;">.T.</span>, the plant canopy model of Watanabe (2004, BLM 112, 307-341) is used. <br>The
     7185impact of a plant canopy on a turbulent flow is considered by an
     7186additional drag term in the momentum equations and an additional sink
     7187term in the prognostic equation for the subgrid-scale TKE. These
     7188additional terms are dependent on the leaf drag coefficient (see <a href="#drag_coefficient">drag_coefficient</a>) and the leaf area density (see <a href="#lad_surface">lad_surface</a>, <a href="#lad_vertical_gradient">lad_vertical_gradient</a>, <a href="#lad_vertical_gradient_level">lad_vertical_gradient_level</a>). <br>By default, a horizontally homogeneous plant canopy is prescribed, if&nbsp; <span style="font-weight: bold;">plant_canopy</span> is set <span style="font-style: italic;">.T.</span>. However, the user can define other types of plant canopies (see <a href="#canopy_mode">canopy_mode</a>).<br><br><span style="font-weight: bold;">plant_canopy</span> = <span style="font-style: italic;">.T. </span>is only allowed together with a non-zero <a href="#drag_coefficient">drag_coefficient</a>.</td></tr><tr>
    71657189
    71667190
  • palm/trunk/DOC/app/chapter_4.6.html

    r127 r138  
    14051405
    14061406
    1407  <tr>
     1407 <tr><td><b><b><a href="chapter_4.2.html#fcl_factor"><b>canopy_mode</b></a></b></b></td><td>I</td><td>C * 20</td><td><span style="font-style: italic;">'block'</span></td><td>Canopy mode</td></tr><tr>
    14081408
    14091409
     
    26642664
    26652665
    2666  <tr>
     2666 <tr><td><a href="chapter_4.1.html#drag_coefficient"><span style="font-weight: bold;">drag_coefficient</span></a></td><td>I</td><td>R</td><td><span style="font-style: italic;">0.0</span></td><td>Drag coefficient used in the plant canopy model.</td></tr><tr>
    26672667
    26682668
     
    51845184
    51855185
    5186  <tr>
     5186 <tr><td><b><a href="chapter_4.1.html#lad_surface"><b>lad_surface</b></a></b></td><td>I</td><td>R</td><td><span style="font-style: italic;">0.0</span></td><td>Surface value of the leaf area density (in m<sup>2</sup>/m<sup>3</sup>)</td></tr><tr><td><b><a href="chapter_4.1.html#lad_vertical_gradient"><b>lad_vertical_gradient</b></a></b></td><td>I</td><td>R (10)</td><td><span style="font-style: italic;">10 * 0.0</span></td><td>Gradient(s) of the leaf area density (in&nbsp;m<sup>2</sup>/m<sup>4</sup>)</td></tr><tr><td><b><b><a href="chapter_4.1.html#lad_vertical_gradient_level"><b>lad_vertical_gradient_level</b></a></b></b></td><td>I</td><td>R (10)</td><td><span style="font-style: italic;">10 * 0.0</span></td><td>Height level from which on the&nbsp;gradient
     5187of the leaf area density defined by <a href="chapter_4.1.html#lad_vertical_gradient">lad_vertical_gradient_level</a>
     5188is effective (in m).</td></tr><tr>
    51875189
    51885190
     
    69936995
    69946996
    6995  <tr valign="top">
     6997 <tr><td><b><a href="chapter_4.1.html#pch_index"><b>pch_index</b></a></b></td><td>I</td><td>I</td><td><code></code><i>0 </i></td><td>Grid point index (scalar) of the upper boundary of the plant canopy layer</td></tr><tr valign="top">
    69966998
    69976999
     
    72297231
    72307232
    7231     <tr>
     7233    <tr><td><b><a href="chapter_4.1.html#plant_canopy"><b>plant_canopy</b></a></b></td><td>I</td><td>L</td><td><i>.F.</i></td><td>Parameter to switch on the plant canopy model</td></tr><tr>
    72327234
    72337235
  • palm/trunk/SOURCE/CURRENT_MODIFICATIONS

    r137 r138  
    11New:
    22---
     3
     4Plant canopy model of Watanabe (2004,BLM 112,307-341) added.
     5It can be switched on by the inipar parameter plant_canopy.
     6The inipar parameter canopy_mode can be used to prescribe a
     7plant canopy type. The default case is a homogeneous plant
     8canopy. Heterogeneous distributions of the leaf area
     9density and the canopy drag coefficient can be defined in the
     10new routine user_init_plant_canopy (user_interface).
     11The inipar parameters lad_surface, lad_vertical_gradient and
     12lad_vertical_gradient_level can be used in order to
     13prescribe the vertical profile of leaf area density. The
     14inipar parameter drag_coefficient determines the canopy
     15drag coefficient.
     16Finally, the inipar parameter pch_index determines the
     17index of the upper boundary of the plant canopy. 
    318
    419Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
     
    1530advec_particles after the end of this loop.
    1631
    17 advec_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
     32advec_particles, check_parameters, data_output_dvrp, header, init_3d_model, init_grid, init_particles, init_pegrid, modules, package_parin, parin, plant_canopy_model, read_var_list, read_3d_binary, user_interface, write_var_list, write_3d_binary
    1833
    1934
  • palm/trunk/SOURCE/Makefile

    r102 r138  
    44# Actual revisions:
    55# -----------------
     6# +plant_canopy_model
     7#
    68# +surface_coupler
    79#
     
    5961        local_flush.f90 local_getenv.f90 local_stop.f90 local_system.f90 local_tremain.f90 \
    6062        local_tremain_ini.f90 modules.f90 netcdf.f90 package_parin.f90 \
    61         palm.f90 parin.f90 particle_boundary_conds.f90 poisfft.f90 \
     63        palm.f90 parin.f90 particle_boundary_conds.f90 \
     64        plant_canopy_model.f90 poisfft.f90 \
    6265        poisfft_hybrid.f90 poismg.f90 prandtl_fluxes.f90 pres.f90 print_1d.f90 \
    6366        production_e.f90 prognostic_equations.f90 random_function.f90 \
     
    8992        interaction_droplets_ptq.o local_flush.o local_getenv.o local_stop.o \
    9093        local_system.o local_tremain.o local_tremain_ini.o modules.o netcdf.o \
    91         package_parin.o palm.o parin.o particle_boundary_conds.o poisfft.o \
     94        package_parin.o palm.o parin.o particle_boundary_conds.o \
     95        plant_canopy_model.o poisfft.o \
    9296        poisfft_hybrid.o poismg.o prandtl_fluxes.o pres.o print_1d.o \
    9397        production_e.o prognostic_equations.o random_function.o random_gauss.o \
     
    201205parin.o: modules.o
    202206particle_boundary_conds.o: modules.o
     207plant_canopy_model.o: modules.o
    203208poisfft.o: modules.o fft_xy.o
    204209poisfft_hybrid.o: modules.o fft_xy.o
     
    212217        buoyancy.o calc_precipitation.o calc_radiation.o coriolis.o \
    213218        diffusion_e.o diffusion_s.o diffusion_u.o diffusion_v.o diffusion_w.o \
    214         eqn_state_seawater.o impact_of_latent_heat.o production_e.o \
     219        eqn_state_seawater.o impact_of_latent_heat.o \
     220        plant_canopy_model.o production_e.o \
    215221        user_interface.o
    216222random_gauss.o: random_function.o
  • palm/trunk/SOURCE/check_parameters.f90

    r132 r138  
    44! Actual revisions:
    55! -----------------
     6! Plant canopy added
    67! Allow new case bc_uv_t = 'dirichlet_0' for channel flow.
    78! Multigrid solver allows topography, checking of dt_sort_particles
     
    592593    ENDIF
    593594
     595    IF ( plant_canopy .AND. ( drag_coefficient == 0.0 ) ) THEN
     596       IF ( myid == 0 )  PRINT*, '+++ check_parameters: plant_canopy = TRUE', &
     597                                 'requires a non-zero drag_coefficient'
     598       CALL local_stop
     599    ENDIF
     600
    594601!
    595602!-- In case of no model continuation run, check initialising parameters and
     
    605612       IF ( ocean )           sa_init = sa_surface
    606613       IF ( passive_scalar )  q_init  = s_surface
     614       IF ( plant_canopy )    lad = 0.0
    607615
    608616!
     
    934942       ENDIF
    935943
    936     ENDIF
    937 
     944!
     945!--    If required compute the profile of leaf area density used in the plant canopy model
     946       IF ( plant_canopy ) THEN
     947       
     948          i = 1
     949          gradient = 0.0
     950
     951          IF ( .NOT. ocean ) THEN
     952 
     953             lad_vertical_gradient_level_ind(1) = 0
     954             DO k = 1, pch_index
     955                IF ( lad_vertical_gradient_level(i) < zu(k) .AND.  &
     956                     lad_vertical_gradient_level(i) >= 0.0 ) THEN
     957                   gradient = lad_vertical_gradient(i)
     958                   lad_vertical_gradient_level_ind(i) = k - 1
     959                   i = i + 1
     960                   IF ( i > 10 ) THEN
     961                      IF ( myid == 0 ) THEN
     962                         PRINT*, '+++ user_init_3d_model: upper bound 10 of array',  &
     963                                 ' "lad_vertical_gradient_level" exceeded'
     964                      ENDIF
     965                      CALL local_stop
     966                   ENDIF
     967                ENDIF
     968                IF ( gradient /= 0.0 ) THEN
     969                   IF ( k /= 1 ) THEN
     970                      lad(k) = lad(k-1) + dzu(k) * gradient
     971                   ELSE
     972                      lad(k) = lad_surface + 0.5 * dzu(k) *gradient
     973                   ENDIF
     974                ELSE
     975                   lad(k) = lad(k-1)
     976                ENDIF
     977             ENDDO
     978
     979          ENDIF
     980
     981!
     982!--       In case of no given leaf area density gradients, choose a vanishing gradient
     983          IF ( lad_vertical_gradient_level(1) == -9999999.9 ) THEN
     984             lad_vertical_gradient_level(1) = 0.0
     985          ENDIF
     986
     987       ENDIF
     988         
     989    ENDIF
     990             
    938991!
    939992!-- Compute Coriolis parameter
  • palm/trunk/SOURCE/header.f90

    r132 r138  
    7878    CHARACTER (LEN=70) ::  char1, char2, coordinates, gradients, dopr_chr, &
    7979                           do2d_xy, do2d_xz, do2d_yz, do3d_chr, &
    80                            run_classification, slices, temperatures, &
     80                           run_classification, slices, temperatures, learde, &
    8181                           ugcomponent, vgcomponent
    8282    CHARACTER (LEN=85) ::  roben, runten
     
    364364
    365365    END SELECT
     366
     367    IF ( plant_canopy ) THEN
     368
     369       WRITE ( io, 280 ) canopy_mode, pch_index, drag_coefficient
     370
     371!
     372!--    Leaf area density profile
     373!--    Building output strings, starting with surface value
     374       WRITE ( learde, '(F6.2)' )  lad_surface
     375       gradients = '------'
     376       slices = '     0'
     377       coordinates = '   0.0'
     378       i = 1
     379       DO  WHILE ( lad_vertical_gradient_level_ind(i) /= -9999 )
     380
     381          WRITE (coor_chr,'(F7.2)')  lad(lad_vertical_gradient_level_ind(i))
     382          learde = TRIM( learde ) // ' ' // TRIM( coor_chr )
     383
     384          WRITE (coor_chr,'(F7.2)')  lad_vertical_gradient(i)
     385          gradients = TRIM( gradients ) // ' ' // TRIM( coor_chr )
     386
     387          WRITE (coor_chr,'(I7)')  lad_vertical_gradient_level_ind(i)
     388          slices = TRIM( slices ) // ' ' // TRIM( coor_chr )
     389
     390          WRITE (coor_chr,'(F7.1)')  lad_vertical_gradient_level(i)
     391          coordinates = TRIM( coordinates ) // ' '  // TRIM( coor_chr )
     392
     393          i = i + 1
     394       ENDDO
     395
     396       WRITE ( io, 281 )  TRIM( coordinates ), TRIM( learde ), &
     397                          TRIM( gradients ), TRIM( slices )
     398
     399    ENDIF
    366400
    367401!
     
    13331367              ' Horizontal index bounds (l/r/s/n): ',I4,' / ',I4,' / ',I4, &
    13341368                ' / ',I4)
     1369280 FORMAT (//' Vegetation canopy (drag) model:'/ &
     1370              ' ------------------------------'// &
     1371              ' Canopy mode: ', A / &
     1372              ' Canopy top: ',I4 / &
     1373              ' Leaf drag coefficient: ',F6.2 /)
     1374281 FORMAT (/ ' Characteristic levels of the leaf area density:'// &
     1375              ' Height:              ',A,'  m'/ &
     1376              ' Leaf area density:   ',A,'  m**2/m**3'/ &
     1377              ' Gradient:            ',A,'  m**2/m**4'/ &
     1378              ' Gridpoint:           ',A)
     1379               
    13351380300 FORMAT (//' Boundary conditions:'/ &
    13361381             ' -------------------'// &
  • palm/trunk/SOURCE/init_3d_model.f90

    r132 r138  
    235235
    236236!
     237!-- 3D-arrays for the leaf area density and the canopy drag coefficient
     238    IF ( plant_canopy ) THEN
     239       ALLOCATE ( lad_s(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
     240                  lad_u(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
     241                  lad_v(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
     242                  lad_w(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1),  &
     243                  cdc(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )
     244    ENDIF
     245
     246!
    237247!-- 4D-array for storing the Rif-values at vertical walls
    238248    IF ( topography /= 'flat' )  THEN
     
    923933                                                    'problem'
    924934       CALL local_stop
     935    ENDIF
     936
     937!
     938!-- Initialization of the leaf area density
     939    IF ( plant_canopy ) THEN
     940 
     941       SELECT CASE ( TRIM( canopy_mode ) )
     942
     943          CASE( 'block' )
     944
     945             DO  i = nxl-1, nxr+1
     946                DO  j = nys-1, nyn+1
     947                   lad_s(:,j,i) = lad(:)
     948                   cdc(:,j,i)   = drag_coefficient
     949                ENDDO
     950             ENDDO
     951
     952          CASE DEFAULT
     953
     954!
     955!--          The DEFAULT case is reached either if the parameter
     956!--          canopy mode contains a wrong character string or if the
     957!--          user has coded a special case in the user interface.
     958!--          There, the subroutine user_init_plant_canopy checks
     959!--          which of these two conditions applies.
     960             CALL user_init_plant_canopy
     961 
     962          END SELECT
     963
     964       CALL exchange_horiz( lad_s )
     965       CALL exchange_horiz( cdc )
     966
     967       DO  i = nxl, nxr
     968          DO  j = nys, nyn
     969             DO  k = nzb, nzt+1
     970                lad_u(k,j,i) = 0.5 * ( lad_s(k,j,i-1) + lad_s(k,j,i) )
     971                lad_v(k,j,i) = 0.5 * ( lad_s(k,j-1,i) + lad_s(k,j,i) )
     972             ENDDO
     973             DO  k = nzb, nzt
     974                lad_w(k,j,i) = 0.5 * ( lad_s(k+1,j,i) + lad_s(k,j,i) )
     975             ENDDO
     976          ENDDO
     977       ENDDO
     978
     979       lad_w(nzt+1,:,:) = lad_w(nzt,:,:)
     980
     981       CALL exchange_horiz( lad_u )
     982       CALL exchange_horiz( lad_v )
     983       CALL exchange_horiz( lad_w )
     984 
    925985    ENDIF
    926986
  • palm/trunk/SOURCE/modules.f90

    r132 r138  
    55! Actual revisions:
    66! -----------------
     7! +drag_coefficient, pch_index, lad_surface, lad_vertical_gradient,
     8! lad_vertical_gradient_level, plant_canopy, lad, lad_s, lad_u, lad_v,
     9! lad_w, cdc, lad_vertical_gradient_level_ind, canopy_mode
     10!
    711! +dt_sort_particles, ngp_2dh_s_inner, time_sort_particles, flags,
    812! wall_flags_1..10, wall_humidityflux(0:4), wall_qflux(0:4),
     
    107111
    108112    REAL, DIMENSION(:), ALLOCATABLE ::                                         &
    109           ddzu, dd2zu, dzu, ddzw, dzw, hyp, km_damp_x, km_damp_y, l_grid,      &
     113          ddzu, dd2zu, dzu, ddzw, dzw, hyp, km_damp_x, km_damp_y, lad, l_grid, &
    110114          pt_init, q_init, rdf, sa_init, ug, u_init, u_nzb_p1_for_vfc, vg,     &
    111115          v_init, v_nzb_p1_for_vfc, zu, zw
     
    126130
    127131    REAL, DIMENSION(:,:,:), ALLOCATABLE ::                                     &
    128           d, diss, l_wall, tend, u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n,     &
    129           v_m_r, v_m_s, w_m_l, w_m_n, w_m_r, w_m_s
     132          cdc, d, diss, lad_s, lad_u, lad_v, lad_w, l_wall, tend,              &
     133          u_m_l, u_m_n, u_m_r, u_m_s, v_m_l, v_m_n, v_m_r, v_m_s, w_m_l,       &
     134          w_m_n, w_m_r, w_m_s
    130135
    131136    REAL, DIMENSION(:,:,:), ALLOCATABLE, TARGET ::                             &
     
    259264                            bc_sa_t = 'neumann', &
    260265                            bc_uv_b = 'dirichlet', bc_uv_t = 'dirichlet', &
     266                            canopy_mode = 'block', &
    261267                            coupling_mode = 'uncoupled', &
    262268                            coupling_mode_remote = 'uncoupled', &
     
    307313                do2d_xz_time_count(0:1), do2d_yz_time_count(0:1), &
    308314                do3d_no(0:1) = 0, do3d_time_count(0:1), &
     315                lad_vertical_gradient_level_ind(10) = -9999, &
     316                pch_index = 0, &
    309317                pt_vertical_gradient_level_ind(10) = -9999, &
    310318                q_vertical_gradient_level_ind(10) = -9999, &
     
    340348                outflow_l = .FALSE., outflow_n = .FALSE., outflow_r = .FALSE., &
    341349                outflow_s = .FALSE., passive_scalar = .FALSE., &
     350                plant_canopy = .FALSE., &
    342351                prandtl_layer = .TRUE., precipitation = .FALSE., &
    343352                profil_output = .FALSE., radiation = .FALSE., &
     
    365374             disturbance_level_b = -9999999.9, &
    366375             disturbance_level_t = -9999999.9, &
     376             drag_coefficient = 0.0, &
    367377             dt = -1.0, dt_averaging_input = 0.0, &
    368378             dt_averaging_input_pr = 9999999.9, dt_coupling = 9999999.9, &
     
    379389             end_time = 0.0, &
    380390             f = 0.0, fs = 0.0, g = 9.81, kappa = 0.4, km_constant = -1.0, &
    381              km_damp_max = -1.0, long_filter_factor = 0.0, &
     391             km_damp_max = -1.0, lad_surface = 0.0, long_filter_factor = 0.0, &
    382392             maximum_cpu_time_allowed = 0.0, molecular_viscosity = 1.461E-5, &
    383393             old_dt = 1.0E-10, omega = 7.29212E-5, omega_sor = 1.8, &
     
    419429
    420430    REAL ::  do2d_xy_last_time(0:1) = -1.0, do2d_xz_last_time(0:1) = -1.0, &
    421              do2d_yz_last_time(0:1) = -1.0, pt_vertical_gradient(10) = 0.0, &
     431             do2d_yz_last_time(0:1) = -1.0, &
     432             lad_vertical_gradient(10) = 0.0, &
     433             lad_vertical_gradient_level(10) = -9999999.9, &
     434             pt_vertical_gradient(10) = 0.0, &
    422435             pt_vertical_gradient_level(10) = -9999999.9, &
    423436             q_vertical_gradient(10) = 0.0, &
  • palm/trunk/SOURCE/parin.f90

    r110 r138  
    44! Actual revisions:
    55! -----------------
    6 !
     6! +canopy_mode
     7! +drag_coefficient, lad_surface, lad_vertical_gradient,
     8! +lad_vertical_gradient_level, pch_index, plant_canopy
     9! +allocation of leaf area density field
     10!
    711!
    812! Former revisions:
     
    7074                       bc_ns, bc_p_b, bc_p_t, bc_pt_b, bc_pt_t, bc_q_b, &
    7175             bc_q_t,bc_s_b, bc_s_t, bc_sa_t, bc_uv_b, bc_uv_t, &
    72              bottom_salinityflux, building_height, &
    73              building_length_x, building_length_y, building_wall_left, &
    74              building_wall_south, cloud_droplets, cloud_physics, &
     76             bottom_salinityflux, building_height, building_length_x, &
     77             building_length_y, building_wall_left, &
     78             building_wall_south, canopy_mode, cloud_droplets, cloud_physics, &
    7579             conserve_volume_flow, cut_spline_overshoot, damp_level_1d, &
    76              dissipation_1d, dt, dt_pr_1d, dt_run_control_1d, dx, dy, dz, &
    77              dz_max, dz_stretch_factor, dz_stretch_level, e_init, e_min, &
    78              end_time_1d, &
    79              fft_method, galilei_transformation, grid_matching, humidity, &
     80             dissipation_1d, drag_coefficient, dt, dt_pr_1d, &
     81             dt_run_control_1d, dx, dy, dz, dz_max, dz_stretch_factor, &
     82             dz_stretch_level, e_init, e_min, end_time_1d, fft_method, &
     83             galilei_transformation, grid_matching, humidity, &
    8084             inflow_disturbance_begin, inflow_disturbance_end, &
    81              initializing_actions, km_constant, km_damp_max, &
     85             initializing_actions, km_constant, km_damp_max, lad_surface, &
     86             lad_vertical_gradient, lad_vertical_gradient_level, &
    8287             long_filter_factor, loop_optimization, mixing_length_1d, &
    8388             momentum_advec, netcdf_precision, npex, npey, nsor_ini, nx, ny, &
    8489             nz, ocean, omega, outflow_damping_width, overshoot_limit_e, &
    8590             overshoot_limit_pt, overshoot_limit_u, overshoot_limit_v, &
    86              overshoot_limit_w, passive_scalar, phi, prandtl_layer, &
    87              precipitation, pt_reference, pt_surface, &
    88              pt_surface_initial_change, pt_vertical_gradient, &
     91             overshoot_limit_w, passive_scalar, pch_index, phi, & 
     92             plant_canopy, prandtl_layer, precipitation, pt_reference, &
     93             pt_surface, pt_surface_initial_change, pt_vertical_gradient, &
    8994             pt_vertical_gradient_level, q_surface, q_surface_initial_change, &
    9095             q_vertical_gradient, q_vertical_gradient_level, radiation, &
     
    242247       hom = 0.0
    243248
     249       IF ( plant_canopy ) THEN
     250          ALLOCATE( lad(0:nz+1) )
     251          lad(:) = 0.0
     252       ENDIF
     253
    244254    ENDIF
    245255
  • palm/trunk/SOURCE/prognostic_equations.f90

    r129 r138  
    44! Actual revisions:
    55! -----------------
     6! add call of subroutines that evaluate the canopy drag terms
    67! add wall_*flux to parameter list of calls of diffusion_s
    78!
     
    8081    USE diffusion_w_mod
    8182    USE impact_of_latent_heat_mod
     83    USE plant_canopy_model_mod
    8284    USE production_e_mod
    8385    USE user_actions_mod
     
    160162          CALL coriolis( i, j, 1 )
    161163          IF ( sloping_surface )  CALL buoyancy( i, j, pt, pt_reference, 1, 4 )
     164
     165!
     166!--       Drag by plant canopy
     167          IF ( plant_canopy )  CALL plant_canopy_model( i, j, 1 )
    162168          CALL user_actions( i, j, 'u-tendency' )
    163169
     
    227233          ENDIF
    228234          CALL coriolis( i, j, 2 )
     235
     236!
     237!--       Drag by plant canopy
     238          IF ( plant_canopy )  CALL plant_canopy_model( i, j, 2 )     
     239
    229240          CALL user_actions( i, j, 'v-tendency' )
    230241
     
    303314             ENDIF
    304315          ENDIF
     316
     317!
     318!--       Drag by plant canopy
     319          IF ( plant_canopy )  CALL plant_canopy_model( i, j, 3 )
     320
    305321          CALL user_actions( i, j, 'w-tendency' )
    306322
     
    732748             ENDIF
    733749             CALL production_e( i, j )
     750
     751!
     752!--          Additional sink term for flows through plant canopies
     753             IF ( plant_canopy )  CALL plant_canopy_model( i, j, 4 )         
     754
    734755             CALL user_actions( i, j, 'e-tendency' )
    735756
     
    833854             IF ( sloping_surface )  CALL buoyancy( i, j, pt, pt_reference, 1, &
    834855                                                    4 )
     856
     857!
     858!--          Drag by plant canopy
     859             IF ( plant_canopy )  CALL plant_canopy_model( i, j, 1 )
     860
    835861             CALL user_actions( i, j, 'u-tendency' )
    836862
     
    882908             ENDIF
    883909             CALL coriolis( i, j, 2 )
     910
     911!
     912!--          Drag by plant canopy
     913             IF ( plant_canopy )  CALL plant_canopy_model( i, j, 2 )       
     914
    884915             CALL user_actions( i, j, 'v-tendency' )
    885916
     
    938969             ENDIF
    939970          ENDIF
     971
     972!
     973!--       Drag by plant canopy
     974          IF ( plant_canopy )  CALL plant_canopy_model( i, j, 3 )
     975
    940976          CALL user_actions( i, j, 'w-tendency' )
    941977
     
    11771213             ENDIF
    11781214             CALL production_e( i, j )
     1215
     1216!
     1217!--          Additional sink term for flows through plant canopies
     1218             IF ( plant_canopy )  CALL plant_canopy_model( i, j, 4 )
     1219
    11791220             CALL user_actions( i, j, 'e-tendency' )
    11801221
     
    12691310    CALL coriolis( 1 )
    12701311    IF ( sloping_surface )  CALL buoyancy( pt, pt_reference, 1, 4 )
     1312
     1313!
     1314!-- Drag by plant canopy
     1315    IF ( plant_canopy )  CALL plant_canopy_model( 1 )
     1316
    12711317    CALL user_actions( 'u-tendency' )
    12721318
     
    13401386    ENDIF
    13411387    CALL coriolis( 2 )
     1388
     1389!
     1390!-- Drag by plant canopy
     1391    IF ( plant_canopy )  CALL plant_canopy_model( 2 )
    13421392    CALL user_actions( 'v-tendency' )
    13431393
     
    14201470       ENDIF
    14211471    ENDIF
     1472
     1473!
     1474!-- Drag by plant canopy
     1475    IF ( plant_canopy )  CALL plant_canopy_model( 3 )
     1476
    14221477    CALL user_actions( 'w-tendency' )
    14231478
     
    18581913       ENDIF
    18591914       CALL production_e
     1915
     1916!
     1917!--    Additional sink term for flows through plant canopies
     1918       IF ( plant_canopy )  CALL plant_canopy_model( 4 )
    18601919       CALL user_actions( 'e-tendency' )
    18611920
  • palm/trunk/SOURCE/read_var_list.f90

    r116 r138  
    44! Actual revisions:
    55! -----------------
     6! +canopy_mode
     7! +drag_coefficient, lad, lad_surface, lad_vertical_gradient,
     8! lad_vertical_gradient_level, lad_vertical_gradient_level_ind,
     9! pch_index, plant_canopy
     10!
    611! +time_sort_particles
    712!
     
    186191          CASE ( 'building_wall_south' )
    187192             READ ( 13 )  building_wall_south
     193          CASE ( 'canopy_mode' )
     194             READ ( 13 )  canopy_mode
    188195          CASE ( 'cloud_droplets' )
    189196             READ ( 13 )  cloud_droplets
     
    200207          CASE ( 'dissipation_1d' )
    201208             READ ( 13 )  dissipation_1d
     209          CASE ( 'drag_coefficient' )
     210             READ ( 13 )  drag_coefficient
    202211          CASE ( 'dt_fixed' )
    203212             READ ( 13 )  dt_fixed
     
    244253          CASE ( 'km_damp_max' )
    245254             READ ( 13 )  km_damp_max
     255          CASE ( 'lad' )
     256             READ ( 13 )  lad
     257          CASE ( 'lad_surface' )
     258             READ ( 13 )  lad_surface
     259          CASE ( 'lad_vertical_gradient' )
     260             READ ( 13 )  lad_vertical_gradient
     261          CASE ( 'lad_vertical_gradient_level' )
     262             READ ( 13 )  lad_vertical_gradient_level
     263          CASE ( 'lad_vertical_gradient_level_in' )
     264             READ ( 13 )  lad_vertical_gradient_level_ind
    246265          CASE ( 'last_dt_change' )
    247266             READ ( 13 )  last_dt_change
     
    288307          CASE ( 'passive_scalar' )
    289308             READ ( 13 )  passive_scalar
     309          CASE ( 'pch_index' )
     310             READ ( 13 )  pch_index
    290311          CASE ( 'phi' )
    291312             READ ( 13 )  phi
     313          CASE ( 'plant_canopy' )
     314             READ ( 13 )  plant_canopy
    292315          CASE ( 'prandtl_layer' )
    293316             READ ( 13 )  prandtl_layer
  • palm/trunk/SOURCE/user_interface.f90

    r136 r138  
    44! Actual revisions:
    55! -----------------
     6! new subroutine user_init_plant_canopy
     7!
    68! new subroutine user_data_output_dvrp
    79! +argument gls in user_init_grid
     
    293295
    294296 END SUBROUTINE user_init_grid
     297
     298
     299
     300 SUBROUTINE user_init_plant_canopy
     301
     302!------------------------------------------------------------------------------!
     303!
     304! Description:
     305! ------------
     306! Initialisation of the leaf area density array (for scalar grid points) and
     307! the array of the canopy drag coefficient, if the user has not chosen any
     308! of the default cases
     309!------------------------------------------------------------------------------!
     310
     311    USE arrays_3d
     312    USE control_parameters
     313    USE indices
     314    USE user
     315
     316    IMPLICIT NONE
     317
     318    INTEGER :: i, j
     319
     320!
     321!-- Here the user-defined grid initializing actions follow:
     322
     323!
     324!-- Set the 3D-arrays lad_s and cdc for user defined canopies
     325    SELECT CASE ( TRIM( canopy_mode ) )
     326
     327       CASE ( 'block' )
     328!
     329!--       Not allowed here since this is the standard case used in init_3d_model.
     330
     331       CASE ( 'user_defined_canopy_1' )
     332!
     333!--       Here the user can define his own topography.
     334!--       The following lines contain an example in that the
     335!--       plant canopy extends only over the second half of the
     336!--       model domain along x
     337!          DO  i = nxl-1, nxr+1
     338!             IF ( i >= INT(nx+1/2) ) THEN
     339!                DO  j = nys-1, nyn+1
     340!                   lad_s(:,j,i) = lad(:)
     341!                   cdc(:,j,i)   = drag_coefficient
     342!                ENDDO
     343!             ELSE
     344!                lad_s(:,:,i) = 0.0
     345!                cdc(:,:,i)   = 0.0
     346!             ENDIF
     347!          ENDDO
     348!--       After definition, please
     349!--       remove the following three lines!
     350          PRINT*, '+++ user_init_plant_canopy: canopy_mode "', &
     351               canopy_mode, '" not available yet'
     352
     353       CASE DEFAULT
     354!
     355!--       The DEFAULT case is reached if the parameter canopy_mode contains a
     356!--       wrong character string that is neither recognized in init_3d_model nor
     357!--       here in user_init_plant_canopy.
     358          PRINT*, '+++ user_init_plant_canopy: unknown canopy_mode "', &
     359               canopy_mode, '"'
     360          CALL local_stop
     361
     362    END SELECT
     363
     364
     365 END SUBROUTINE user_init_plant_canopy
    295366
    296367
  • palm/trunk/SOURCE/write_var_list.f90

    r116 r138  
    44! Actual revisions:
    55! -----------------
     6! +canopy_mode
     7! +drag_coefficient, lad, lad_surface, lad_vertical_gradient,
     8! lad_vertical_gradient_level, lad_vertical_gradient_level_ind,
     9! pch_index, plant_canopy
     10!
    611! +time_sort_particles
    712!
     
    132137    WRITE ( 14 )  'building_wall_south           '
    133138    WRITE ( 14 )  building_wall_south
     139    WRITE ( 14 )  'canopy_mode                   '
     140    WRITE ( 14 )  canopy_mode
    134141    WRITE ( 14 )  'cloud_droplets                '
    135142    WRITE ( 14 )  cloud_droplets
     
    146153    WRITE ( 14 )  'dissipation_1d                '
    147154    WRITE ( 14 )  dissipation_1d
     155    WRITE ( 14 )  'drag_coefficient              '
     156    WRITE ( 14 )  drag_coefficient
    148157    WRITE ( 14 )  'dt_fixed                      '
    149158    WRITE ( 14 )  dt_fixed
     
    190199    WRITE ( 14 )  'km_damp_max                   '
    191200    WRITE ( 14 )  km_damp_max
     201    WRITE ( 14 )  'lad                           '
     202    WRITE ( 14 )  lad
     203    WRITE ( 14 )  'lad_surface                   '
     204    WRITE ( 14 )  lad_surface
     205    WRITE ( 14 )  'lad_vertical_gradient         '
     206    WRITE ( 14 )  lad_vertical_gradient
     207    WRITE ( 14 )  'lad_vertical_gradient_level   '
     208    WRITE ( 14 )  lad_vertical_gradient_level
     209    WRITE ( 14 )  'lad_vertical_gradient_level_in'
     210    WRITE ( 14 )  lad_vertical_gradient_level_ind
    192211    WRITE ( 14 )  'last_dt_change                '
    193212    WRITE ( 14 )  last_dt_change
     
    234253    WRITE ( 14 )  'passive_scalar                '
    235254    WRITE ( 14 )  passive_scalar
     255    WRITE ( 14 )  'pch_index                     '
     256    WRITE ( 14 )  pch_index
    236257    WRITE ( 14 )  'phi                           '
    237258    WRITE ( 14 )  phi
     259    WRITE ( 14 )  'plant_canopy                  '
     260    WRITE ( 14 )  plant_canopy
    238261    WRITE ( 14 )  'prandtl_layer                 '
    239262    WRITE ( 14 )  prandtl_layer
Note: See TracChangeset for help on using the changeset viewer.