[1682] | 1 | !> @file user_init_grid.f90 |
---|
[1036] | 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 | ! |
---|
[1818] | 16 | ! Copyright 1997-2016 Leibniz Universitaet Hannover |
---|
[1036] | 17 | !--------------------------------------------------------------------------------! |
---|
| 18 | ! |
---|
[258] | 19 | ! Current revisions: |
---|
[211] | 20 | ! ----------------- |
---|
[1683] | 21 | ! |
---|
| 22 | ! |
---|
[1321] | 23 | ! Former revisions: |
---|
| 24 | ! ----------------- |
---|
| 25 | ! $Id: user_init_grid.f90 1818 2016-04-06 15:53:27Z suehring $ |
---|
| 26 | ! |
---|
[1683] | 27 | ! 1682 2015-10-07 23:56:08Z knoop |
---|
| 28 | ! Code annotations made doxygen readable |
---|
| 29 | ! |
---|
[1321] | 30 | ! 1320 2014-03-20 08:40:49Z raasch |
---|
[1320] | 31 | ! kind-parameters added to all INTEGER and REAL declaration statements, |
---|
| 32 | ! kinds are defined in new module kinds, |
---|
| 33 | ! old module precision_kind is removed, |
---|
| 34 | ! revision history before 2012 removed, |
---|
| 35 | ! comment fields (!:) to be used for variable explanations added to |
---|
| 36 | ! all variable declaration statements |
---|
[211] | 37 | ! |
---|
[1037] | 38 | ! 1036 2012-10-22 13:43:42Z raasch |
---|
| 39 | ! code put under GPL (PALM 3.9) |
---|
| 40 | ! |
---|
[226] | 41 | ! 217 2008-12-09 18:00:48Z letzel |
---|
| 42 | ! +topography_grid_convention |
---|
| 43 | ! Former file user_interface.f90 split into one file per subroutine |
---|
| 44 | ! |
---|
[211] | 45 | ! Description: |
---|
| 46 | ! ------------ |
---|
[1682] | 47 | !> Execution of user-defined grid initializing actions |
---|
| 48 | !> First argument gls contains the number of ghost layers, which is > 1 if the |
---|
| 49 | !> multigrid method for the pressure solver is used |
---|
[211] | 50 | !------------------------------------------------------------------------------! |
---|
[1682] | 51 | SUBROUTINE user_init_grid( gls, nzb_local ) |
---|
| 52 | |
---|
[211] | 53 | |
---|
| 54 | USE control_parameters |
---|
[1320] | 55 | |
---|
[211] | 56 | USE indices |
---|
[1320] | 57 | |
---|
| 58 | USE kinds |
---|
| 59 | |
---|
[211] | 60 | USE user |
---|
| 61 | |
---|
| 62 | IMPLICIT NONE |
---|
| 63 | |
---|
[1682] | 64 | INTEGER(iwp) :: gls !< |
---|
[211] | 65 | |
---|
[1320] | 66 | INTEGER(iwp), & |
---|
| 67 | DIMENSION(-gls:ny+gls,-gls:nx+gls) :: & |
---|
[1682] | 68 | nzb_local !< |
---|
[211] | 69 | |
---|
| 70 | ! |
---|
| 71 | !-- Here the user-defined grid initializing actions follow: |
---|
| 72 | |
---|
| 73 | ! |
---|
| 74 | !-- Set the index array nzb_local for non-flat topography. |
---|
| 75 | !-- Here consistency checks concerning domain size and periodicity are necessary |
---|
| 76 | SELECT CASE ( TRIM( topography ) ) |
---|
| 77 | |
---|
[240] | 78 | CASE ( 'flat', 'single_building', 'single_street_canyon' ) |
---|
[211] | 79 | ! |
---|
| 80 | !-- Not allowed here since these are the standard cases used in init_grid. |
---|
| 81 | |
---|
| 82 | CASE ( 'user_defined_topography_1' ) |
---|
| 83 | ! |
---|
[256] | 84 | !-- Here the user can define his own topography. |
---|
[217] | 85 | !-- After definition, please remove the following three lines! |
---|
[258] | 86 | message_string = 'topography "' // topography // '" not available yet' |
---|
| 87 | CALL message( 'user_init_grid', 'UI0005', 1, 2, 0, 6, 0 ) |
---|
[211] | 88 | |
---|
| 89 | CASE DEFAULT |
---|
| 90 | ! |
---|
| 91 | !-- The DEFAULT case is reached if the parameter topography contains a |
---|
| 92 | !-- wrong character string that is neither recognized in init_grid nor |
---|
| 93 | !-- here in user_init_grid. |
---|
[258] | 94 | message_string = 'unknown topography "' // topography // '"' |
---|
| 95 | CALL message( 'user_init_grid', 'UI0006', 1, 2, 0, 6, 0 ) |
---|
[211] | 96 | |
---|
| 97 | END SELECT |
---|
| 98 | |
---|
| 99 | |
---|
| 100 | END SUBROUTINE user_init_grid |
---|
| 101 | |
---|