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