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