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

Last change on this file since 4854 was 4828, checked in by Giersch, 4 years ago

Copyright updated to year 2021, interface pmc_sort removed to accelarate the nesting code

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