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

Last change on this file since 4439 was 4360, checked in by suehring, 5 years ago

Bugfix in output of time-averaged plant-canopy quanities; Output of plant-canopy data only where tall canopy is defined; land-surface model: fix wrong location strings; tests: update urban test case; all source code files: copyright update

  • Property svn:keywords set to Id
File size: 3.6 KB
Line 
1!> @file user_init_plant_canopy.f90
2!------------------------------------------------------------------------------!
3! This file is part of the PALM model system.
4!
5! PALM is free software: you can redistribute it and/or modify it under the
6! terms of the GNU General Public License as published by the Free Software
7! Foundation, either version 3 of the License, or (at your option) any later
8! version.
9!
10! PALM is distributed in the hope that it will be useful, but WITHOUT ANY
11! WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
12! A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
13!
14! You should have received a copy of the GNU General Public License along with
15! PALM. If not, see <http://www.gnu.org/licenses/>.
16!
17! Copyright 1997-2020 Leibniz Universitaet Hannover
18!------------------------------------------------------------------------------!
19!
20! Current revisions:
21! -----------------
22!
23!
24! Former revisions:
25! -----------------
26! $Id: user_init_plant_canopy.f90 4360 2020-01-07 11:25:50Z Giersch $
27! Renamed canopy_mode 'block' to 'homogeneous'
28!
29! 4182 2019-08-22 15:20:23Z scharf
30! Corrected "Former revisions" section
31!
32! 3768 2019-02-27 14:35:58Z raasch
33! unused variables commented out to avoid compiler warnings
34!
35! 3655 2019-01-07 16:51:22Z knoop
36! Corrected "Former revisions" section
37!
38! 211 2008-11-11 04:46:24Z raasch
39! Former file user_interface.f90 split into one file per subroutine
40!
41! Description:
42! ------------
43!> Initialisation of the leaf area density array (for scalar grid points) and
44!> the array of the canopy drag coefficient, if the user has not chosen any
45!> of the default cases
46!------------------------------------------------------------------------------!
47 SUBROUTINE user_init_plant_canopy
48 
49
50    USE arrays_3d
51   
52    USE control_parameters
53   
54    USE indices
55   
56    USE kinds
57
58    USE plant_canopy_model_mod
59   
60    USE user
61
62    IMPLICIT NONE
63
64!    INTEGER(iwp) :: i   !< running index
65!    INTEGER(iwp) :: j   !< running index
66
67!
68!-- Here the user-defined grid initializing actions follow:
69
70!
71!-- Set the 3D-array lad_s for user defined canopies
72    SELECT CASE ( TRIM( canopy_mode ) )
73
74       CASE ( 'homogeneous' )
75!
76!--       Not allowed here since this is the standard case used in init_3d_model.
77
78       CASE ( 'user_defined_canopy_1' )
79!
80!--       Here the user can define his own forest topography.
81!--       The following lines contain an example, where the plant canopy extends
82!--       only over the second half of the model domain along x.
83!--       Attention: DO-loops have to include the ghost points (nxlg-nxrg,
84!--       nysg-nyng), because no exchange of ghost point information is intended,
85!--       in order to minimize communication between CPUs.
86!          DO  i = nxlg, nxrg
87!             IF ( i >= INT( ( nx+1 ) / 2 ) ) THEN
88!                DO  j = nysg, nyng
89!                   lad_s(:,j,i) = lad(:)
90!                ENDDO
91!             ELSE
92!                lad_s(:,:,i) = 0.0_wp
93!             ENDIF
94!          ENDDO
95!
96!--       After definition, please
97!--       remove the following three lines!
98          message_string = 'canopy_mode "' // canopy_mode // &
99                           '" not available yet'
100          CALL message( 'user_init_plant_canopy', 'UI0007', 0, 1, 0, 6, 0 )
101         
102       CASE DEFAULT
103!
104!--       The DEFAULT case is reached if the parameter canopy_mode contains a
105!--       wrong character string that is neither recognized in init_3d_model nor
106!--       here in user_init_plant_canopy.
107          message_string = 'unknown canopy_mode "' // canopy_mode // '"'
108          CALL message( 'user_init_plant_canopy', 'UI0008', 1, 2, 0, 6, 0 )
109
110    END SELECT
111
112
113 END SUBROUTINE user_init_plant_canopy
114
Note: See TracBrowser for help on using the repository browser.