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

Last change on this file since 1848 was 1818, checked in by maronga, 9 years ago

last commit documented / copyright update

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