1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> |
---|
2 | <html><head> |
---|
3 | |
---|
4 | <meta http-equiv="CONTENT-TYPE" content="text/html; charset=windows-1252"><title>PALM chapter 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><body style="direction: ltr;" lang="en-US"><h3 style="line-height: 100%;">3.5.3 Definition of user-defined |
---|
9 | subdomains</h3> |
---|
10 | <p style="line-height: 100%;">By default, the values of |
---|
11 | the timeseries quantities and the horizontally averaged vertical |
---|
12 | profiles (saved in local files |
---|
13 | <a href="chapter_3.4.html#PLOT1D_DATA">PLOT1D_DATA</a> |
---|
14 | and <a href="chapter_3.4.html#LIST_PROFIL">LIST_PROFIL</a>) |
---|
15 | always refer to the total model domain. Independently, up to 9 time |
---|
16 | series or profiles for different user-defined subdomains can be |
---|
17 | computed and plotted additionally. Steering in principle is done |
---|
18 | via the initialization parameter <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>. |
---|
19 | </p> |
---|
20 | <p style="line-height: 100%;">The exact definition of |
---|
21 | these subdomains |
---|
22 | has to be made by the user within the user-defined subroutine <tt><font style="font-size: 10pt;" size="2">user_init</font></tt>. |
---|
23 | The |
---|
24 | subdomains are defined with a mask array named <tt><font style="font-size: 10pt;" size="2">rmask</font></tt>, |
---|
25 | which has to be given the value 1.0 for all horizontal grid points |
---|
26 | belonging to |
---|
27 | the user-defined subdomain and the value 0.0, where grid points do not |
---|
28 | belong |
---|
29 | to the user-defined subdomain. In the model <tt><font size="2">rmask</font></tt> |
---|
30 | is |
---|
31 | declared as: </p> |
---|
32 | <ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2">REAL :: rmask |
---|
33 | (nys-1:nyn+1,nxl-1:nxr+1,0:9) .</font></tt></p> |
---|
34 | </ul><p style="line-height: 100%;">The first two |
---|
35 | indices are the grid point |
---|
36 | indices 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">, |
---|
37 | </font><tt><font style="font-size: 10pt;" size="2">nxr</font></tt><font style="font-size: 10pt;" size="2">, |
---|
38 | </font><tt><font style="font-size: 10pt;" size="2">nys</font></tt><font style="font-size: 10pt;" size="2"> |
---|
39 | <font size="3">and</font> </font><tt><font style="font-size: 10pt;" size="2">nyn</font></tt> |
---|
40 | are the array bounds of the respective subdomain (don't confuse this |
---|
41 | with the user-defined subdomain!) on the |
---|
42 | respective processor. With runs on one processor <tt><font style="font-size: 10pt;" size="2">nys</font></tt><font style="font-size: 10pt;" size="2"> |
---|
43 | = </font><tt><font style="font-size: 10pt;" size="2">nxl</font></tt><font style="font-size: 10pt;" size="2"> |
---|
44 | = 0</font> and <font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">nxr |
---|
45 | =</font> </font><a href="chapter_4.1.html#nx">nx</a> |
---|
46 | and <font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">nyn |
---|
47 | =</font></font> <a href="chapter_4.1.html#ny">ny</a>. |
---|
48 | The third index determines the user-defined subdomain. The total model |
---|
49 | domain |
---|
50 | carries the index 0, the user-defined subdomains have the values 1 to |
---|
51 | 9. </p> |
---|
52 | <p style="line-height: 100%;">The following example should |
---|
53 | illustrate |
---|
54 | this. Two subdomains are defined by the user. The first is determined |
---|
55 | by all grid |
---|
56 | points which lie within a circle whose center is equal to the |
---|
57 | (horizontal) center of the model domain and whose diameter is equal |
---|
58 | to half of the total horizontal domain size (square total domain |
---|
59 | assumed). |
---|
60 | The second subdomain should be defined by all points outside of this |
---|
61 | domain. This may be obtained by the following lines of code in <tt><font style="font-size: 10pt;" size="2">user_init</font></tt>: |
---|
62 | </p> |
---|
63 | <ul> <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">USE |
---|
64 | grid_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 * |
---|
65 | disc_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 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"> x = i * dx</font></font></tt><br> |
---|
66 | <tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> |
---|
67 | DO 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"> |
---|
68 | y = 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"> |
---|
69 | radial_distance = SQRT( ( x - disc_center_x )**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"> |
---|
70 | ( 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"> |
---|
71 | IF ( radial_distance |
---|
72 | > disc_radius ) 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"> |
---|
73 | rmask(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"> |
---|
74 | rmask(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"> |
---|
75 | ELSE</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"> |
---|
76 | rmask(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"> |
---|
77 | rmask(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"> |
---|
78 | ENDIF</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><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> |
---|
79 | </ul><p style="line-height: 100%;">The module <span style="font-family: monospace;">statistics</span> must |
---|
80 | be used, |
---|
81 | because it contains <span style="font-family: monospace;">rmask</span> |
---|
82 | and the modules <span style="font-family: monospace;">grid_variables</span> |
---|
83 | and <span style="font-family: monospace;">indices</span> |
---|
84 | are |
---|
85 | necessary in this example, because grid spacing and indices are used. |
---|
86 | All array elements of <span style="font-family: monospace;">rmask</span> |
---|
87 | (<span style="font-family: monospace;">rmask(:,:,:)</span>) |
---|
88 | are preset |
---|
89 | by the model with 1.0. In no case this assignment must be |
---|
90 | changed for the total domain (<span style="font-family: monospace;">rmask(:,:,0)</span>)! |
---|
91 | Computations and output for the user-defined subdomains only take place |
---|
92 | if |
---|
93 | the user sets <a href="chapter_4.1.html#statistic_regions">statistic_regions</a> |
---|
94 | ≥ <i>1</i>. Beyond that, names for the user-defined |
---|
95 | subdomains can be |
---|
96 | assigned |
---|
97 | via the initialization parameter <a href="chapter_4.3.html#region">region</a>. |
---|
98 | Output of the names of the selected user-defined subdomains happens in |
---|
99 | the local files <a href="chapter_3.4.html#HEADER">HEADER</a> |
---|
100 | and <a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a> |
---|
101 | within the user-defined subroutine <tt><font style="font-size: 10pt;" size="2">user_header</font></tt>. |
---|
102 | <br> |
---|
103 | </p> |
---|
104 | <hr><p style="line-height: 100%;"><br> |
---|
105 | <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: </i> |
---|
106 | $Id: chapter_3.5.3.html 555 2010-09-07 07:32:53Z hellstea $</p> |
---|
107 | </body></html> |
---|