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