source: palm/trunk/SOURCE/user_init_plant_canopy.f90 @ 1985

Last change on this file since 1985 was 1952, checked in by suehring, 8 years ago

last commit documented

  • Property svn:keywords set to Id
File size: 4.2 KB
RevLine 
[1682]1!> @file user_init_plant_canopy.f90
[1036]2!--------------------------------------------------------------------------------!
3! This file is part of PALM.
4!
5! PALM is free software: you can redistribute it and/or modify it under the terms
6! of the GNU General Public License as published by the Free Software Foundation,
7! either version 3 of the License, or (at your option) any later version.
8!
9! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
10! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
11! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
12!
13! You should have received a copy of the GNU General Public License along with
14! PALM. If not, see <http://www.gnu.org/licenses/>.
15!
[1818]16! Copyright 1997-2016 Leibniz Universitaet Hannover
[1036]17!--------------------------------------------------------------------------------!
18!
[258]19! Current revisions:
[211]20! -----------------
[1485]21!
[1952]22!
[1485]23! Former revisions:
24! -----------------
25! $Id: user_init_plant_canopy.f90 1952 2016-06-20 10:06:26Z suehring $
26!
[1952]27! 1951 2016-06-20 10:05:12Z suehring
28! Bugfix in example initialization
29!
[1683]30! 1682 2015-10-07 23:56:08Z knoop
31! Code annotations made doxygen readable
32!
[1485]33! 1484 2014-10-21 10:53:05Z kanani
[1484]34! Changes in the course of the canopy-model modularization:
35!   module plant_canopy_model_mod added,
36!   definition of array cdc (canopy drag coefficient) removed, since it is now
37!   defined purely as a single constant value (see module plant_canopy_model)
[1354]38!
39! 1353 2014-04-08 15:21:23Z heinze
40! REAL constants provided with KIND-attribute
41!
[1321]42! 1320 2014-03-20 08:40:49Z raasch
[1320]43! kind-parameters added to all INTEGER and REAL declaration statements,
44! kinds are defined in new module kinds,
45! old module precision_kind is removed,
46! revision history before 2012 removed,
47! comment fields (!:) to be used for variable explanations added to
48! all variable declaration statements
[211]49!
[1037]50! 1036 2012-10-22 13:43:42Z raasch
51! code put under GPL (PALM 3.9)
52!
[226]53! 211 2008-11-11 04:46:24Z raasch
54! Former file user_interface.f90 split into one file per subroutine
55!
[211]56! Description:
57! ------------
[1682]58!> Initialisation of the leaf area density array (for scalar grid points) and
59!> the array of the canopy drag coefficient, if the user has not chosen any
60!> of the default cases
[211]61!------------------------------------------------------------------------------!
[1682]62 SUBROUTINE user_init_plant_canopy
63 
[211]64
65    USE arrays_3d
[1320]66   
[211]67    USE control_parameters
[1320]68   
[211]69    USE indices
[1320]70   
71    USE kinds
[1484]72
73    USE plant_canopy_model_mod
[1320]74   
[211]75    USE user
76
77    IMPLICIT NONE
78
[1682]79    INTEGER(iwp) :: i   !< running index
80    INTEGER(iwp) :: j   !< running index
[211]81
82!
83!-- Here the user-defined grid initializing actions follow:
84
85!
[1484]86!-- Set the 3D-array lad_s for user defined canopies
[211]87    SELECT CASE ( TRIM( canopy_mode ) )
88
89       CASE ( 'block' )
90!
91!--       Not allowed here since this is the standard case used in init_3d_model.
92
93       CASE ( 'user_defined_canopy_1' )
94!
[1484]95!--       Here the user can define his own forest topography.
96!--       The following lines contain an example, where the plant canopy extends
97!--       only over the second half of the model domain along x.
98!--       Attention: DO-loops have to include the ghost points (nxlg-nxrg,
99!--       nysg-nyng), because no exchange of ghost point information is intended,
[1951]100!--       in order to minimize communication between CPUs.
[667]101!          DO  i = nxlg, nxrg
[1951]102!             IF ( i >= INT( ( nx+1 ) / 2 ) ) THEN
[667]103!                DO  j = nysg, nyng
[211]104!                   lad_s(:,j,i) = lad(:)
105!                ENDDO
106!             ELSE
[1353]107!                lad_s(:,:,i) = 0.0_wp
[211]108!             ENDIF
109!          ENDDO
[1484]110!
[211]111!--       After definition, please
112!--       remove the following three lines!
[274]113          message_string = 'canopy_mode "' // canopy_mode // &
114                           '" not available yet'
[258]115          CALL message( 'user_init_plant_canopy', 'UI0007', 0, 1, 0, 6, 0 )
116         
[211]117       CASE DEFAULT
118!
119!--       The DEFAULT case is reached if the parameter canopy_mode contains a
[274]120!--       wrong character string that is neither recognized in init_3d_model nor
[211]121!--       here in user_init_plant_canopy.
[258]122          message_string = 'unknown canopy_mode "' // canopy_mode // '"'
123          CALL message( 'user_init_plant_canopy', 'UI0008', 1, 2, 0, 6, 0 )
[211]124
125    END SELECT
126
127
128 END SUBROUTINE user_init_plant_canopy
129
Note: See TracBrowser for help on using the repository browser.