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