source: palm/tags/release-3.2b/DOC/app/chapter_3.5.3.html @ 132

Last change on this file since 132 was 62, checked in by raasch, 18 years ago

Id string added to all html files

  • Property svn:keywords set to Id
File size: 10.9 KB
Line 
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2<html><head>
3<meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM
4chapter 3.5.3</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14001660"> <meta name="CHANGED" content="20041112;14483720"> <meta name="KEYWORDS" content="parallel LES model"> <style>
5<!--
6@page { size: 21cm 29.7cm }
7-->
8</style></head>
9<body style="direction: ltr;" lang="en-US"><h3 style="line-height: 100%;">3.5.3 Definition of user-defined
10subdomains</h3>
11<p style="line-height: 100%;">By default, the values of
12the timeseries quantities and the horizontally averaged vertical
13profiles (saved in local files
14<a href="chapter_3.4.html#PLOT1D_DATA">PLOT1D_DATA</a>
15and <a href="chapter_3.4.html#LIST_PROFIL">LIST_PROFIL</a>)
16always refer to the total model domain. Independently, up to 9 time
17series or profiles for different user-defined subdomains can be
18computed and plotted additionally. Steering in principle is done
19via the initialization parameter <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>.
20</p>
21<p style="line-height: 100%;">The exact definition of
22these subdomains
23has to be made by the user within the user-defined subroutine
24<tt><font style="font-size: 10pt;" size="2">init_user</font></tt>.
25The
26subdomains are defined with a mask array named <tt><font style="font-size: 10pt;" size="2">rmask</font></tt>,
27which has to be given the value 1.0 for all horizontal grid points
28belonging to
29the user-defined subdomain and the value 0.0, where grid points do not
30belong
31to the user-defined subdomain. In the model <tt><font size="2">rmask</font></tt>
32is
33declared as: </p>
34<ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2">REAL :: rmask
35(nys-1:nyn+1,nxl-1,nxr+1,0:9) .</font></tt></p>
36</ul><p style="line-height: 100%;">The first two
37indices are the grid point
38indices in y and x-direction. With parallel model runs <tt><font style="font-size: 10pt;" size="2">nxl</font></tt><font style="font-size: 10pt;" size="2">,
39</font><tt><font style="font-size: 10pt;" size="2">nxr</font></tt><font style="font-size: 10pt;" size="2">,
40</font><tt><font style="font-size: 10pt;" size="2">nys</font></tt><font style="font-size: 10pt;" size="2">
41<font size="3">and</font> </font><tt><font style="font-size: 10pt;" size="2">nyn</font></tt>
42are the array bounds of the respective subdomain (don't confuse this
43with the user-defined subdomain!) on the
44respective processor. With runs on one processor <tt><font style="font-size: 10pt;" size="2">nys</font></tt><font style="font-size: 10pt;" size="2">
45= </font><tt><font style="font-size: 10pt;" size="2">nxl</font></tt><font style="font-size: 10pt;" size="2">
46= 0</font> and <font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">nxr
47=</font> </font><a href="chapter_4.1.html#nx">nx</a>
48and <font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">nyn
49=</font></font> <a href="chapter_4.1.html#ny">ny</a>.
50The third index determines the user-defined subdomain. The total model
51domain
52carries the index 0, the user-defined subdomains have the values 1 to
539. </p>
54<p style="line-height: 100%;">The following example should
55illustrate
56this. Two subdomains are defined by the user. The first is determined
57by all grid
58points which lie within a circle whose center is equal to the
59(horizontal) center of the model domain and whose diameter is equal
60to half of the total horizontal domain size (square total domain
61assumed).
62The second subdomain should be defined by all points outside of this
63domain. This may be obtained by the following lines of code in <tt><font style="font-size: 10pt;" size="2">user_init</font></tt>:
64</p>
65<ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE
66grid_variables</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE indices</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE statistics</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">.</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">.</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">.</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">disc_center_x = dx * (nx + 1)/2</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">disc_center_y = dy * (ny + 1)/2</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">disc_radius = 0.5 *
67disc_center_x</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">DO&nbsp; i = nxl-1, nxr+1</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp; x = i * dx</font></font></tt><br>
68<tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;
69DO&nbsp; j = nys-1, nyn+1</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
70y = j * dy</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
71radial_distance = SQRT( ( x - disc_center_x )**2 + &amp;</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
72( y - disc_center_y )**2 )</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp; &nbsp;
73&nbsp; IF ( radial_distance
74&gt; disc_radius )&nbsp; THEN</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
75rmask(j,i,1) = 0.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
76rmask(j,i,2) = 1.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
77ELSE</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
78rmask(j,i,1) = 1.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
79rmask(j,i,2) = 0.0</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
80ENDIF</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> <br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">&nbsp;&nbsp; ENDDO</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><br> </font></font><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">ENDDO</font></font></tt></p>
81</ul><p style="line-height: 100%;">The module <span style="font-family: monospace;">statistics</span> must
82be used,
83because it contains <span style="font-family: monospace;">rmask</span>
84and the modules <span style="font-family: monospace;">grid_variables</span>
85and <span style="font-family: monospace;">indices</span>
86are
87necessary in this example, because grid spacing and indices are used.
88All array elements of <span style="font-family: monospace;">rmask</span>
89(<span style="font-family: monospace;">rmask(:,:,:)</span>)
90are preset
91by the model with 1.0. In no case this assignment must be
92changed for the total domain (<span style="font-family: monospace;">rmask(:,:,0)</span>)!
93Computations and output for the user-defined subdomains only take place
94if
95the user sets <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>
96&ge; <i>1</i>. Beyond that, names for the user-defined
97subdomains can be
98assigned
99via the initialization parameter <a href="chapter_4.3.html#region">region</a>.
100Output of the names of the selected user-defined subdomains happens in
101the local files <a href="chapter_3.4.html#HEADER">HEADER</a>
102and <a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a>
103within the user-defined subroutine <tt><font style="font-size: 10pt;" size="2">user_header</font></tt>.
104<br>
105&nbsp; </p>
106<hr><p style="line-height: 100%;"><br>
107<font color="#000080"><font color="#000080"><a href="chapter_3.5.2.html"><font color="#000080"><img src="left.gif" name="Grafik1" align="bottom" border="2" height="32" width="32"></font></a><a href="index.html"><font color="#000080"><img src="up.gif" name="Grafik2" align="bottom" border="2" height="32" width="32"></font></a><a href="chapter_3.5.4.html"><font color="#000080"><img src="right.gif" name="Grafik3" align="bottom" border="2" height="32" width="32"></font></a></font></font></p><p style="line-height: 100%;"><i>Last change:&nbsp;</i>
108$Id: chapter_3.5.3.html 62 2007-03-13 02:52:40Z letzel $</p>
109</body></html>
Note: See TracBrowser for help on using the repository browser.