[1682] | 1 | !> @file user_init_plant_canopy.f90 |
---|
[4497] | 2 | !--------------------------------------------------------------------------------------------------! |
---|
[2696] | 3 | ! This file is part of the PALM model system. |
---|
[1036] | 4 | ! |
---|
[4497] | 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. |
---|
[1036] | 8 | ! |
---|
[4497] | 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. |
---|
[1036] | 12 | ! |
---|
[4497] | 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/>. |
---|
[1036] | 15 | ! |
---|
[4360] | 16 | ! Copyright 1997-2020 Leibniz Universitaet Hannover |
---|
[4497] | 17 | !--------------------------------------------------------------------------------------------------! |
---|
[1036] | 18 | ! |
---|
[4497] | 19 | ! |
---|
[258] | 20 | ! Current revisions: |
---|
[211] | 21 | ! ----------------- |
---|
[1485] | 22 | ! |
---|
[2001] | 23 | ! |
---|
[1485] | 24 | ! Former revisions: |
---|
| 25 | ! ----------------- |
---|
| 26 | ! $Id: user_init_plant_canopy.f90 4497 2020-04-15 10:20:51Z suehring $ |
---|
[4497] | 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 |
---|
[4341] | 34 | ! Renamed canopy_mode 'block' to 'homogeneous' |
---|
[4497] | 35 | ! |
---|
[4341] | 36 | ! 4182 2019-08-22 15:20:23Z scharf |
---|
[4182] | 37 | ! Corrected "Former revisions" section |
---|
[4497] | 38 | ! |
---|
[4182] | 39 | ! 3768 2019-02-27 14:35:58Z raasch |
---|
[3768] | 40 | ! unused variables commented out to avoid compiler warnings |
---|
[4497] | 41 | ! |
---|
[3768] | 42 | ! 3655 2019-01-07 16:51:22Z knoop |
---|
[2716] | 43 | ! Corrected "Former revisions" section |
---|
[1485] | 44 | ! |
---|
[4182] | 45 | ! 211 2008-11-11 04:46:24Z raasch |
---|
| 46 | ! Former file user_interface.f90 split into one file per subroutine |
---|
| 47 | ! |
---|
[211] | 48 | ! Description: |
---|
| 49 | ! ------------ |
---|
[4497] | 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 | !--------------------------------------------------------------------------------------------------! |
---|
[1682] | 53 | SUBROUTINE user_init_plant_canopy |
---|
[211] | 54 | |
---|
[4497] | 55 | |
---|
[211] | 56 | USE arrays_3d |
---|
[4497] | 57 | |
---|
[211] | 58 | USE control_parameters |
---|
[4497] | 59 | |
---|
[211] | 60 | USE indices |
---|
[4497] | 61 | |
---|
[1320] | 62 | USE kinds |
---|
[1484] | 63 | |
---|
| 64 | USE plant_canopy_model_mod |
---|
[4497] | 65 | |
---|
[211] | 66 | USE user |
---|
| 67 | |
---|
| 68 | IMPLICIT NONE |
---|
| 69 | |
---|
[4497] | 70 | ! INTEGER(iwp) :: i !< running index |
---|
| 71 | ! INTEGER(iwp) :: j !< running index |
---|
[211] | 72 | |
---|
| 73 | ! |
---|
| 74 | !-- Here the user-defined grid initializing actions follow: |
---|
| 75 | |
---|
| 76 | ! |
---|
[1484] | 77 | !-- Set the 3D-array lad_s for user defined canopies |
---|
[211] | 78 | SELECT CASE ( TRIM( canopy_mode ) ) |
---|
| 79 | |
---|
[4341] | 80 | CASE ( 'homogeneous' ) |
---|
[211] | 81 | ! |
---|
| 82 | !-- Not allowed here since this is the standard case used in init_3d_model. |
---|
| 83 | |
---|
| 84 | CASE ( 'user_defined_canopy_1' ) |
---|
| 85 | ! |
---|
[4497] | 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, |
---|
[1951] | 90 | !-- in order to minimize communication between CPUs. |
---|
[667] | 91 | ! DO i = nxlg, nxrg |
---|
[4497] | 92 | ! IF ( i >= INT( ( nx+1 ) / 2 ) ) THEN |
---|
[667] | 93 | ! DO j = nysg, nyng |
---|
[211] | 94 | ! lad_s(:,j,i) = lad(:) |
---|
| 95 | ! ENDDO |
---|
| 96 | ! ELSE |
---|
[1353] | 97 | ! lad_s(:,:,i) = 0.0_wp |
---|
[211] | 98 | ! ENDIF |
---|
[4497] | 99 | ! ENDDO |
---|
[1484] | 100 | ! |
---|
[4497] | 101 | !-- After definition, please remove the following three lines! |
---|
| 102 | message_string = 'canopy_mode "' // canopy_mode // '" not available yet' |
---|
[258] | 103 | CALL message( 'user_init_plant_canopy', 'UI0007', 0, 1, 0, 6, 0 ) |
---|
[4497] | 104 | |
---|
[211] | 105 | CASE DEFAULT |
---|
| 106 | ! |
---|
[4497] | 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. |
---|
[258] | 109 | message_string = 'unknown canopy_mode "' // canopy_mode // '"' |
---|
| 110 | CALL message( 'user_init_plant_canopy', 'UI0008', 1, 2, 0, 6, 0 ) |
---|
[211] | 111 | |
---|
| 112 | END SELECT |
---|
| 113 | |
---|
| 114 | |
---|
| 115 | END SUBROUTINE user_init_plant_canopy |
---|
| 116 | |
---|