[1682] | 1 | !> @file user_init_plant_canopy.f90 |
---|
[2000] | 2 | !------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[2000] | 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. |
---|
[1036] | 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 | ! |
---|
[3655] | 17 | ! Copyright 1997-2019 Leibniz Universitaet Hannover |
---|
[2000] | 18 | !------------------------------------------------------------------------------! |
---|
[1036] | 19 | ! |
---|
[258] | 20 | ! Current revisions: |
---|
[211] | 21 | ! ----------------- |
---|
[1485] | 22 | ! |
---|
[2001] | 23 | ! |
---|
[1485] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: user_init_plant_canopy.f90 4182 2019-08-22 15:20:23Z motisi $ |
---|
[4182] | 27 | ! Corrected "Former revisions" section |
---|
| 28 | ! |
---|
| 29 | ! 3768 2019-02-27 14:35:58Z raasch |
---|
[3768] | 30 | ! unused variables commented out to avoid compiler warnings |
---|
| 31 | ! |
---|
| 32 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[2716] | 33 | ! Corrected "Former revisions" section |
---|
[1485] | 34 | ! |
---|
[4182] | 35 | ! 211 2008-11-11 04:46:24Z raasch |
---|
| 36 | ! Former file user_interface.f90 split into one file per subroutine |
---|
| 37 | ! |
---|
[211] | 38 | ! Description: |
---|
| 39 | ! ------------ |
---|
[1682] | 40 | !> Initialisation of the leaf area density array (for scalar grid points) and |
---|
| 41 | !> the array of the canopy drag coefficient, if the user has not chosen any |
---|
| 42 | !> of the default cases |
---|
[211] | 43 | !------------------------------------------------------------------------------! |
---|
[1682] | 44 | SUBROUTINE user_init_plant_canopy |
---|
| 45 | |
---|
[211] | 46 | |
---|
| 47 | USE arrays_3d |
---|
[1320] | 48 | |
---|
[211] | 49 | USE control_parameters |
---|
[1320] | 50 | |
---|
[211] | 51 | USE indices |
---|
[1320] | 52 | |
---|
| 53 | USE kinds |
---|
[1484] | 54 | |
---|
| 55 | USE plant_canopy_model_mod |
---|
[1320] | 56 | |
---|
[211] | 57 | USE user |
---|
| 58 | |
---|
| 59 | IMPLICIT NONE |
---|
| 60 | |
---|
[3768] | 61 | ! INTEGER(iwp) :: i !< running index |
---|
| 62 | ! INTEGER(iwp) :: j !< running index |
---|
[211] | 63 | |
---|
| 64 | ! |
---|
| 65 | !-- Here the user-defined grid initializing actions follow: |
---|
| 66 | |
---|
| 67 | ! |
---|
[1484] | 68 | !-- Set the 3D-array lad_s for user defined canopies |
---|
[211] | 69 | SELECT CASE ( TRIM( canopy_mode ) ) |
---|
| 70 | |
---|
| 71 | CASE ( 'block' ) |
---|
| 72 | ! |
---|
| 73 | !-- Not allowed here since this is the standard case used in init_3d_model. |
---|
| 74 | |
---|
| 75 | CASE ( 'user_defined_canopy_1' ) |
---|
| 76 | ! |
---|
[1484] | 77 | !-- Here the user can define his own forest topography. |
---|
| 78 | !-- The following lines contain an example, where the plant canopy extends |
---|
| 79 | !-- only over the second half of the model domain along x. |
---|
| 80 | !-- Attention: DO-loops have to include the ghost points (nxlg-nxrg, |
---|
| 81 | !-- nysg-nyng), because no exchange of ghost point information is intended, |
---|
[1951] | 82 | !-- in order to minimize communication between CPUs. |
---|
[667] | 83 | ! DO i = nxlg, nxrg |
---|
[1951] | 84 | ! IF ( i >= INT( ( nx+1 ) / 2 ) ) THEN |
---|
[667] | 85 | ! DO j = nysg, nyng |
---|
[211] | 86 | ! lad_s(:,j,i) = lad(:) |
---|
| 87 | ! ENDDO |
---|
| 88 | ! ELSE |
---|
[1353] | 89 | ! lad_s(:,:,i) = 0.0_wp |
---|
[211] | 90 | ! ENDIF |
---|
| 91 | ! ENDDO |
---|
[1484] | 92 | ! |
---|
[211] | 93 | !-- After definition, please |
---|
| 94 | !-- remove the following three lines! |
---|
[274] | 95 | message_string = 'canopy_mode "' // canopy_mode // & |
---|
| 96 | '" not available yet' |
---|
[258] | 97 | CALL message( 'user_init_plant_canopy', 'UI0007', 0, 1, 0, 6, 0 ) |
---|
| 98 | |
---|
[211] | 99 | CASE DEFAULT |
---|
| 100 | ! |
---|
| 101 | !-- The DEFAULT case is reached if the parameter canopy_mode contains a |
---|
[274] | 102 | !-- wrong character string that is neither recognized in init_3d_model nor |
---|
[211] | 103 | !-- here in user_init_plant_canopy. |
---|
[258] | 104 | message_string = 'unknown canopy_mode "' // canopy_mode // '"' |
---|
| 105 | CALL message( 'user_init_plant_canopy', 'UI0008', 1, 2, 0, 6, 0 ) |
---|
[211] | 106 | |
---|
| 107 | END SELECT |
---|
| 108 | |
---|
| 109 | |
---|
| 110 | END SUBROUTINE user_init_plant_canopy |
---|
| 111 | |
---|