source: palm/trunk/SOURCE/user_init_grid.f90 @ 1560

Last change on this file since 1560 was 1321, checked in by raasch, 11 years ago

last commit documented

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