1 | SUBROUTINE user_init_grid( gls, nzb_local ) |
---|
2 | |
---|
3 | !--------------------------------------------------------------------------------! |
---|
4 | ! This file is part of PALM. |
---|
5 | ! |
---|
6 | ! PALM is free software: you can redistribute it and/or modify it under the terms |
---|
7 | ! of the GNU General Public License as published by the Free Software Foundation, |
---|
8 | ! either version 3 of the License, or (at your option) any later version. |
---|
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 | ! |
---|
17 | ! Copyright 1997-2012 Leibniz University Hannover |
---|
18 | !--------------------------------------------------------------------------------! |
---|
19 | ! |
---|
20 | ! Current revisions: |
---|
21 | ! ----------------- |
---|
22 | ! |
---|
23 | ! |
---|
24 | ! Former revisions: |
---|
25 | ! ----------------- |
---|
26 | ! $Id: user_init_grid.f90 1036 2012-10-22 13:43:42Z raasch $ |
---|
27 | ! |
---|
28 | ! 258 2009-03-13 12:36:03Z heinze |
---|
29 | ! Output of messages replaced by message handling routine. |
---|
30 | ! add 'single_street_canyon' as standard topography case |
---|
31 | ! -topography_grid_convention |
---|
32 | ! |
---|
33 | ! 217 2008-12-09 18:00:48Z letzel |
---|
34 | ! +topography_grid_convention |
---|
35 | ! Former file user_interface.f90 split into one file per subroutine |
---|
36 | ! |
---|
37 | ! Description: |
---|
38 | ! ------------ |
---|
39 | ! Execution of user-defined grid initializing actions |
---|
40 | ! First argument gls contains the number of ghost layers, which is > 1 if the |
---|
41 | ! multigrid method for the pressure solver is used |
---|
42 | !------------------------------------------------------------------------------! |
---|
43 | |
---|
44 | USE control_parameters |
---|
45 | USE indices |
---|
46 | USE user |
---|
47 | |
---|
48 | IMPLICIT NONE |
---|
49 | |
---|
50 | INTEGER :: gls |
---|
51 | |
---|
52 | INTEGER, DIMENSION(-gls:ny+gls,-gls:nx+gls) :: nzb_local |
---|
53 | |
---|
54 | ! |
---|
55 | !-- Here the user-defined grid initializing actions follow: |
---|
56 | |
---|
57 | ! |
---|
58 | !-- Set the index array nzb_local for non-flat topography. |
---|
59 | !-- Here consistency checks concerning domain size and periodicity are necessary |
---|
60 | SELECT CASE ( TRIM( topography ) ) |
---|
61 | |
---|
62 | CASE ( 'flat', 'single_building', 'single_street_canyon' ) |
---|
63 | ! |
---|
64 | !-- Not allowed here since these are the standard cases used in init_grid. |
---|
65 | |
---|
66 | CASE ( 'user_defined_topography_1' ) |
---|
67 | ! |
---|
68 | !-- Here the user can define his own topography. |
---|
69 | !-- After definition, please remove the following three lines! |
---|
70 | message_string = 'topography "' // topography // '" not available yet' |
---|
71 | CALL message( 'user_init_grid', 'UI0005', 1, 2, 0, 6, 0 ) |
---|
72 | |
---|
73 | CASE DEFAULT |
---|
74 | ! |
---|
75 | !-- The DEFAULT case is reached if the parameter topography contains a |
---|
76 | !-- wrong character string that is neither recognized in init_grid nor |
---|
77 | !-- here in user_init_grid. |
---|
78 | message_string = 'unknown topography "' // topography // '"' |
---|
79 | CALL message( 'user_init_grid', 'UI0006', 1, 2, 0, 6, 0 ) |
---|
80 | |
---|
81 | END SELECT |
---|
82 | |
---|
83 | |
---|
84 | END SUBROUTINE user_init_grid |
---|
85 | |
---|