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"> |
---|
4 | |
---|
5 | <title>PALM chapter 3.5.2</title><meta name="GENERATOR" content="StarOffice 7 (Win32)"> |
---|
6 | <meta name="AUTHOR" content="Siegfried Raasch"> |
---|
7 | <meta name="CREATED" content="20040802;13321506"> |
---|
8 | <meta name="CHANGED" content="20041112;14455666"> |
---|
9 | <meta name="KEYWORDS" content="parallel LES model"> |
---|
10 | <style> |
---|
11 | <!-- |
---|
12 | @page { size: 21cm 29.7cm } |
---|
13 | --> |
---|
14 | </style></head> |
---|
15 | |
---|
16 | <body dir="ltr" lang="en-US"> |
---|
17 | <h3 style="line-height: 100%;"> 3.5.2 Definition of user-defined |
---|
18 | parameters</h3> |
---|
19 | <p style="line-height: 100%;">As for the model in general, also the |
---|
20 | user-defined code will have to be steered by parameters. For each |
---|
21 | run the model should to be able to read in current values of these |
---|
22 | parameters. The declaration of user-defined parameters takes place in |
---|
23 | the user-defined module <tt><font style="font-size: 10pt;" size="2">user</font></tt> |
---|
24 | (located at the beginning of the file <tt><font style="font-size: 10pt;" size="2">user_interface.f90</font></tt>). |
---|
25 | This module must be declared in all relevant user-defined routines via |
---|
26 | a USE statement, in order to make the parameters available. </p> |
---|
27 | <p style="line-height: 100%;">The user can assign values to the |
---|
28 | user-defined parameters within the NAMELIST group <tt><font style="font-size: 11pt;" size="2">&userpar |
---|
29 | <font size="3"><font face="Thorndale, serif">in the local file</font></font> |
---|
30 | <a href="chapter_3.4.html#PARIN">PARIN</a></font></tt>. |
---|
31 | This NAMELIST group must be located after the initialization |
---|
32 | parameters and run parameters (<tt><font style="font-size: 10pt;" size="2">&inipar</font></tt><font style="font-size: 10pt;" size="2">, |
---|
33 | </font><tt><font style="font-size: 10pt;" size="2">&d3par</font></tt>) |
---|
34 | (see <a href="chapter_4.0.html">chapter |
---|
35 | 4.0</a>). Before values of the user-defined parameters can be assigned, |
---|
36 | the parameters must be declared within the appropriate NAMELIST |
---|
37 | statement in the user-defined subroutine <tt><font style="font-size: 10pt;" size="2">user_parin</font></tt>. |
---|
38 | </p> |
---|
39 | <p style="line-height: 100%;">The following example illustrates the |
---|
40 | procedure. The example assumes that the user declares a |
---|
41 | LOGICAL variable named <tt><font style="font-size: 10pt;" size="2">abcd</font></tt> |
---|
42 | for steering the user-defined code. This variable |
---|
43 | must be declared in the module <tt>user</tt>: </p> |
---|
44 | <ul> |
---|
45 | <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2">LOGICAL:: abcd = .FALSE.</font></tt></p> |
---|
46 | </ul> |
---|
47 | <p style="line-height: 100%;">Pay attention that in this example a |
---|
48 | default value (.FALSE.) is assigned to the variable and it will keep |
---|
49 | this value if nothing else is assigned within the file <tt>PARIN</tt>. |
---|
50 | In <tt><font style="font-size: 10pt;" size="2">user_parin</font> <font face="Thorndale, serif">the</font></tt> |
---|
51 | NAMELIST must be extended by the name of the new variable: </p> |
---|
52 | <ul> |
---|
53 | <p style="line-height: 100%;"><tt><font style="font-size: 10pt;" size="2">NAMELIST /userpar/ abcd, data_output_user, region.</font></tt></p> |
---|
54 | </ul> |
---|
55 | <p style="line-height: 100%;">In the parameter file PARIN a value can |
---|
56 | be assigned: </p> |
---|
57 | <ul> |
---|
58 | <p style="line-height: 100%;">. <br> |
---|
59 | . <br> |
---|
60 | <tt><font style="font-size: 10pt;" size="2">&userpar abcd = .T.,</font></tt><font style="font-size: 10pt;" size="2"> ...</font></p> |
---|
61 | </ul> |
---|
62 | <p style="line-height: 100%;">User defined parameters in the file PARIN |
---|
63 | are |
---|
64 | considered as run parameters, i.e. they must be specified again for |
---|
65 | each restart run.</p> |
---|
66 | <p style="line-height: 100%;">In each case the user should carry out |
---|
67 | a control output of the parameter values, so |
---|
68 | that their values during the respective model run are really known. For |
---|
69 | this |
---|
70 | purpose the user-defined subroutine <tt><font style="font-size: 10pt;" size="2">user_header</font></tt> |
---|
71 | which writes into the files <a href="chapter_3.4.html#HEADER">HEADER</a> |
---|
72 | and <a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a> |
---|
73 | is available. <br> |
---|
74 | </p> |
---|
75 | <hr> |
---|
76 | <p style="line-height: 100%;"><br> |
---|
77 | <font color="#000080"><font color="#000080"><a href="chapter_3.5.1.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.3.html"><font color="#000080"><img src="right.gif" name="Grafik3" align="bottom" border="2" height="32" width="32"></font></a><br> |
---|
78 | </font></font></p> |
---|
79 | <p style="line-height: 100%;"><span style="font-style: italic;">Last |
---|
80 | change:</span> 24/03/06 (SR)<font color="#000080"><font color="#000080"><br> |
---|
81 | </font></font></p> |
---|
82 | </body></html> |
---|