source: palm/trunk/DOC/app/chapter_3.5.1.html @ 203

Last change on this file since 203 was 144, checked in by letzel, 17 years ago

User-defined spectra.

Bugfix: extra '*' removed in user_statistics sample code (user_interface).

  • Property svn:keywords set to Id
File size: 32.1 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 chapter 3.5.1</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;11451548"> <meta name="CHANGED" content="20041112;14401801"> <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.1 Interfaces for
9user-defined code<br>
10</h3><p style="margin-bottom: 0cm; line-height: 100%;">The
11following table
12describes the available interfaces for user-defined code in the model,
13the
14names and possible arguments of the subroutines involved as well as
15actions which can be accomplished in these subroutines. <br>
16&nbsp; </p>
17<table style="width: 100%;" border="1" cellpadding="2" cellspacing="4"> <col width="211"> <col width="117"> <col width="862"> <tbody> <tr><td width="211"> <p><font size="4"><b>Call
18location</b></font></p> </td> <td width="117"> <p><font size="4"><b>Subroutine
19name and
20argument</b></font></p> </td> <td style="width: 862px;"> <p><font size="4"><b>Possible
21actions</b></font></p> </td> </tr> <tr><td>---</td><td><span style="font-family: monospace;"><a name="user"></a>MODULE
22user</span></td><td>All
23user-defined variables which are used outside the respective local
24scopes of the user-defined subroutines have to be declared here.</td></tr><tr valign="top"> <td width="211"> <p>End
25of <tt><font style="font-size: 10pt;" size="2">parin.f90</font></tt></p>
26</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_parin"></a>user_parin</font></font></tt></p>
27</td> <td width="862"> <p>Declaration of
28user-defined parameters in the NAMELIST
29group <tt><font style="font-size: 10pt;" size="2">&amp;userpar</font></tt>.
30These
31parameters can be read from the local file <a href="chapter_3.4.html#PARIN">PARIN</a>
32and be used for steering the user-defined code (see <a href="chapter_4.0.html">chapter
334.0</a>). The user-defined parameter <a href="chapter_4.3.html#region">region</a>
34is already pre-defined in <tt><font style="font-size: 10pt;" size="2">&amp;userpar</font></tt>
35and must not be changed. Additional NAMELIST groups may be declared if
36desired.&nbsp; <br>
37The CPU time needed for executing <tt><font style="font-size: 10pt;" size="2">user_parin</font></tt>
38is included in the
39local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a>
40within the category &ldquo;initialisation&rdquo;.</p> </td>
41</tr> <tr valign="top"> <td width="211"><p>End
42of <tt><font style="font-size: 10pt;" size="2">header.f90</font></tt></p>
43</td>
44<td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_header"></a>user_header(
45io )</font></font></tt></p> </td> <td width="862"> <p>Output of the values of the
46user-defined parameters to
47the
48local files <a href="chapter_3.4.html#HEADER">HEADER</a>
49and <a href="chapter_3.4.html#RUN_CONTROL">RUN_CONTROL</a>.
50This output should be made anyway in order to subsequently check the
51parameter values used for the respective run. The number of the output
52unit is passed as an argument and must be used in each WRITE statement
53(e.g.: &ldquo;<tt><font face="Cumberland, monospace"><font style="font-size: 10pt;" size="2">WRITE </font><font style="font-size: 10pt;" size="2">( io,&hellip;</font></font></tt><font style="font-size: 10pt;" size="2">&rdquo;))</font>.
54By default, this
55subroutine only creates output if a user-defined NAMELIST is found in
56file <a href="chapter_3.4.html#PARIN">PARIN</a>
57(in this case <tt><font face="Thorndale, serif">the</font></tt>
58variable <tt><font style="font-size: 10pt;" size="2">user_defined_namelist_found</font></tt>
59is set&nbsp; <i>.TRUE.</i> in <tt><font style="font-size: 10pt;" size="2">user_parin</font></tt>).
60The names of any
61user-defined
62subdomains are displayed by default (see <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>).</p>
63</td> </tr> <tr valign="top"> <td width="211"> <p>End of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></p>
64</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_init"></a>user_init</font></font></tt></p>
65</td> <td width="862"> <p>Here, user-defined
66initialization actions which should
67be
68accomplished before the start of the 3D-model can be implemented (e.g.
69inhomogenous change of the surface temperature, the roughness length,
70or similar). At this point, all default parameter initializations of
71the model (<a href="chapter_4.1.html">chapter
724.1</a>) have already been carried out at all.&nbsp; </p>
73<p>One of the most important actions here is the definition
74of
75user-defined subdomains for statistic analysis and output (see <a href="chapter_4.1.html#statistic_regions">statistic_regions</a>
76and <a href="chapter_3.5.3.html">chapter
773.5.3</a>) and of additional time series quantities (see comment
78line example in the file).&nbsp; <br>
79CPU time for <tt><font style="font-size: 10pt;" size="2">user_init</font></tt>
80is considered in the local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a>
81within the category &ldquo;initialisation&rdquo;.</p><p>See
82also <tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a href="#user_init_3d_model">user_init_3d_model</a>.</font></font></tt></p>
83</td> </tr> <tr><td><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
84case of <tt><font style="font-size: 10pt;" size="2">SELECT
85CASE( TRIM(canopy_mode) ) </font></tt>command in the
86middle&nbsp;of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></td><td><a name="user_init_plant_canopy"></a><code>user_init_plant_canopy</code></td><td>User-defined initilisation of the plant canopy model.<br><br>Here, the user can define the two three-dimensional arrays <code>lad_s and cdc </code>that
87stand for the leaf area density and the canopy drag coefficient. By
88this, the user can configure a&nbsp;plant canopy. This requires
89definition of at least one
90new&nbsp;<a href="chapter_4.1.html#canopy_mode">canopy_mode</a>&nbsp;in the&nbsp;<tt><font style="font-size: 10pt;" size="2">SELECT CASE( TRIM(canopy_mode) ) </font></tt>command
91in&nbsp;<tt><font style="font-size: 10pt;" size="2">user_init_plant_canopy</font></tt>.
92Note that the&nbsp;<a href="chapter_4.1.html#canopy_mode">canopy_mode</a>&nbsp;<span style="font-style: italic;">'block'</span> is<span style="font-style: italic;"></span> not allowed here since it is the standard case used in the
93calling routine <tt><font style="font-size: 10pt;" size="2">init_3d_model</font></tt>. </td></tr><tr> <td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
94case of <tt><font style="font-size: 10pt;" size="2">SELECT
95CASE( TRIM(topography) ) </font></tt>command in the
96middle&nbsp;of <tt><font style="font-size: 10pt;" size="2">init_grid.f90</font></tt></td> <td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_init_grid"></a>user_init_grid</font></font></tt></td>
97<td> <p>Execution of user-defined grid initializing
98actions.</p> <p>Here, the user can define the
99two-dimensional index
100array&nbsp;<tt><font style="font-size: 10pt;" size="2">nzb_local</font></tt> that is used to
101set up a non-flat topography. This requires definition of at least one
102new <a href="chapter_4.1.html#topography">topography</a>&nbsp;mode
103in the&nbsp;<tt><font style="font-size: 10pt;" size="2">SELECT CASE( TRIM(topography) ) </font></tt>command
104in&nbsp;<tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>.
105Note that the <a href="chapter_4.1.html#topography">topography</a>&nbsp;modes
106<span style="font-style: italic;">'flat'</span>
107and <span style="font-style: italic;">'single_building'</span>
108are not allowed here since these are the standard cases used in the
109calling routine <tt><font style="font-size: 10pt;" size="2">init_grid</font></tt>. </p> <p>CPU
110time for <tt><font style="font-size: 10pt;" size="2">user_init_grid</font></tt>
111is considered in the local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a>
112within the category &ldquo;initialisation&rdquo;.</p> </td>
113</tr> <tr><td style="vertical-align: top;">In
114the middle of <tt><font style="font-size: 10pt;" size="2">init_3d_model.f90</font></tt></td><td style="vertical-align: top;"><span style="font-family: monospace;"></span><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_init_3d_model"></a>user_init_3d_<br>model</font></font></tt></td><td style="vertical-align: top;">Initialization of the 3d-model.<br><br>Allows
115the complete initialization of the 3d model. The user is responsible to
116set at least all those quantities which are normally set within <tt><font style="font-size: 10pt;" size="2">init_3d_model</font></tt>.</td></tr><tr valign="top"> <td width="211"> <p>In
117the middle of <tt><font style="font-size: 10pt;" size="2">init_particles.f90</font></tt></p>
118</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_init_particles"></a>user_init_</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">particles</font></font></tt></p>
119</td> <td width="862"> <p>With this routine
120e.g. size and color of particles,
121which have
122been released initially from a source, can be specified. Like the
123calling routine <tt><font style="font-size: 10pt;" size="2">init_particles</font><font style="font-size: 11pt;" size="2">,</font></tt>
124this routine is only
125called if particle advection is switched on (see package parameter <a href="chapter_4.2.html#dt_prel">dt_prel</a>).</p>
126</td> </tr> <tr valign="top"> <td width="211"> <p>End of <tt><font style="font-size: 10pt;" size="2">advec_particles.f90</font></tt></p>
127</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_particle_attributes"></a>user_particle_</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">attributes</font></font></tt></p>
128</td> <td width="862"> <p>Here the particles
129can be assigned new attributes
130(diameter,
131color etc.) after each time step. Like the calling routine <tt><font style="font-size: 10pt;" size="2">advec_particles</font><font style="font-size: 11pt;" size="2">,</font> </tt>this
132routine is only
133called if particle advection is switched on (see package parameter <a href="chapter_4.2.html#dt_prel">dt_prel</a>).</p>
134</td> </tr> <tr valign="top"> <td width="211"> <p>Before the plot of particles and
135cross-sections in <br> <tt><font style="font-size: 10pt;" size="2">dvrp_plot.f90</font></tt></p>
136</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_dvrp_coltab"></a>user_dvrp_coltab
137(</font></font></tt><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> mode )</font></font></tt></p>
138</td> <td width="862"> <p>With this routine,
139color tables can be adjusted which
140should
141be used for output with the dvrp software. Individuell color tables for
142particles and cross-sections are possible. For this purpose the two
143arrays <tt><font style="font-size: 10pt;" size="2">interval_values_dvrp</font></tt>
144and <tt><font style="font-size: 10pt;" size="2">interval_h_dvrp</font></tt>
145(declared in the module <tt><font style="font-size: 10pt;" size="2">dvrp_variables</font></tt>)
146have to be preset with appropriate values. The number of color table
147entries must be assigned to the variable of <tt><font style="font-size: 10pt;" size="2">dvrp_colourtable_entries</font></tt>.
148The value of the subroutine argument <span style="font-family: monospace;">mode</span> defines,
149whether the color
150table is valid for particles or for cross-sections<span style="font-family: monospace;"></span> (i.e. <tt><font size="2">mode</font></tt>
151can have the values &ldquo;<i>particles&rdquo;</i>
152or &ldquo;<i>slicer&rdquo;</i>).&nbsp; <br>
153This routine only becomes active if dvrp-graphics is switched on (see
154package parameter <a href="chapter_4.2.html#dt_dvrp">dt_dvrp</a>).</p>
155</td> </tr> <tr valign="top"> <td width="211"> <p>Beginning and end of the time
156integration loop
157of&nbsp; <br> <tt><font style="font-size: 10pt;" size="2">time_integration.f90</font></tt>
158as well as after each prognostic equation in <br> <tt><font style="font-size: 10pt;" size="2">prognostic_equations.f90</font></tt></p>
159</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_actions"></a>user_actions(
160location )</font></font></tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"> </font></font> </p>
161<p>or<br> <font face="Cumberland, monospace"><font style="font-size: 10pt;" size="2"> </font></font>
162</p> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">user_actions(
163i, j,</font></font></tt><span style="font-family: Cumberland,monospace;"> </span><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace">location )</font></font></tt></p>
164</td> <td width="862"> <p>In this routine
165user actions can be implemented which
166are to
167be executed either at each time step or at certain times (defined by
168the user). Since in each case the routine is called at the beginning
169and at the end of a time step as well as after each prognostic equation
170it must be defined at which place (and/or at which places) the
171respective actions are supposed to be executed. For this purpose an
172appropriate CASE structure is already inserted in this routine. The
173location of the calling routine is passed to this routine via the
174argument <tt><font style="font-size: 10pt;" size="2">location</font></tt>.
175For example, if called at the beginning of a time step, <tt><font style="font-size: 10pt;" size="2">location</font></tt>
176=&nbsp;<i>'before_timestep' </i>and if
177called at the end, <tt><font style="font-size: 10pt;" size="2">location</font></tt><font style="font-size: 10pt;" size="2"> </font>=&nbsp;<i>'after_timestep'</i><span style="font-weight: bold;">.</span></p><p>Calculation
178of user-defined output quantities should be carried out at <span style="font-family: monospace;">location</span> = <span style="font-style: italic;">'after_integration'</span>.<span style="font-weight: bold;"></span></p><p><span style="font-weight: bold;">Important:</span>
179if the
180cache-optimized version of <span style="font-family: monospace;">prognostic_equation.f90</span>
181is used (this is the default for IBM-Regatta-Systems), the loop
182variables <tt>i</tt> and <tt>j</tt> must be
183passed as arguments for
184all calls within <span style="font-family: monospace;">prognostic_equations</span>.
185</p> <p>CPU time for <tt><font style="font-size: 10pt;" size="2">user_actions</font></tt>
186appears within the category &ldquo;user_actions&rdquo; in the
187local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a>.
188If the cache-optimized version of <span style="font-family: monospace;">prognostic_equation.f90</span>
189is used, this time measurement only considers the CPU time which was
190needed outside of the prognostic equations. Time needed for calls
191within prognostic_equations is considered within the category "all
192prog.equations".<br> </p> <p><b>Important:</b>
193this subroutine is written
194as a FORTRAN
195module, which uses so-called function overloading. It can be called in
196two ways: with one argument (<tt><font style="font-size: 10pt;" size="2">location</font></tt>)
197and with three arguments <font style="font-size: 10pt;" size="2">(</font><tt><font style="font-size: 10pt;" size="2">i, j, location</font></tt><font style="font-size: 10pt;" size="2">)</font>. The
198three argument version
199is used in the cache-optimized version of <span style="font-family: monospace;">prognostic_equations</span>.
200Depending
201on the number of given arguments the subroutine internally calls <tt><font style="font-size: 10pt;" size="2">user_actions</font></tt>
202or <tt><font style="font-size: 10pt;" size="2">user_actions_ij</font></tt>.
203So the
204user must insert the actions (code extensions) desired for the
205respective prognostic equation either in the CASE structure of <tt><font style="font-size: 10pt;" size="2">user_actions</font><font style="font-size: 11pt;" size="2">,</font> </tt>or/and
206in the CASE
207structure of <tt><font style="font-size: 10pt;" size="2">user_actions_ij</font></tt>!</p> </td>
208</tr> <tr><td style="vertical-align: top;"><code>SUBROUTINE preprocess_spectra</code> in <code>calc_spectra.f90</code>, and <code>data_output_spectra.f90</code></td><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_spectra"></a>user_spectra</font></font></tt></td><td style="vertical-align: top;"><p><a href="chapter_3.5.4.html#spectra">Spectra of user-defined
209quantities</a> can be computed here.</p>The
210routine contains some simple examples (as comment lines) in order to
211demonstrate how to use it.</td></tr><tr valign="top"> <td width="211"><p><tt><font style="font-size: 10pt;" size="2">flow_statistics.f90</font></tt>
212before the summation of array <span style="font-family: monospace;">hom</span>
213(horizontal averages)<br> </p> </td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_statistics"></a>user_statistics<br>(
214sr )</font></font></tt></p> </td> <td width="862"> <p>Horizontal
215averages of vertical profiles of user-defined
216quantities can be computed here. Also, additional time series
217quantities can be calculated. They have to be defined before in routine
218<a style="font-family: monospace;" href="#user_init">user_init</a>.
219The routine is called once for each defined statistic region (see <a href="chapter_4.1.html#statistic_region">statistic_region</a>).</p><p>The
220routine contains some simple examples (as comment lines) in order to
221demonstrate how to use it.<br><br>Profile sums have to
222be stored in
223the array <tt><font style="font-size: 10pt;" size="2">sums_l</font></tt>.&nbsp;The profile identification number (second index of array <span style="font-family: monospace;">sums_l</span>) must be within the range [<span style="font-family: monospace;"> pr_palm+1 , pr_palm+max_pr_user</span> ], where <span style="font-family: monospace;">pr_palm</span> is an internal parameter and&nbsp; <span style="font-family: Courier New,Courier,monospace;">max_pr_user</span> is the number of&nbsp;user-defined profiles as given by parameter <a href="http://www.muk.uni-hannover.de/%7Eraasch/PALM_group/doc/app/chapter_4.3.html#data_output_pr_user">data_output_pr_user</a> in the respective PALM run.</p><p> These additional
224profiles
225are further processed (e.g. temporally averaged), like the standard profiles, in <tt><font style="font-size: 10pt;" size="2">flow_statistics</font></tt>.</p> </td>
226</tr> <tr><td style="vertical-align: top;">End
227of <span style="font-family: monospace;">check_parameters.f90</span>
228where 2d/3d output quantities are checked</td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user_check_data_output"></a>user_check_data_<br>output(
229variable, unit )</span></td><td style="vertical-align: top;">Here the physical <span style="font-family: monospace;">unit</span>(s) of
230user-defined 2d/3d output quantities (see <a href="chapter_4.3.html#data_output_user">data_output_user</a>)
231have to be set. Input parameter <span style="font-family: monospace;">variable</span>
232contains the string identifier of the respective variable. For those
233variables not recognized by the user, the parameter <span style="font-family: monospace;">unit</span> is set to
234"illegal", which tells the calling routine that the output variable is
235not defined and leads to a program abort.<br><br>See <a href="chapter_3.5.4.html">chapter 3.5.4</a> about
236creating user-defined output quantities.</td></tr><tr><td style="vertical-align: top;">End
237of <span style="font-family: monospace;">check_parameters.f90</span>
238where vertical profile output quantities are checked</td><td style="vertical-align: top;"><a name="user_check_data_output_pr"></a><br><span style="font-family: monospace;">user_check_data_</span><br style="font-family: monospace;"><span style="font-family: monospace;">output_pr(</span><br style="font-family: monospace;"><span style="font-family: monospace;">variable, var_count, unit )</span></td><td style="vertical-align: top;">Here the physical <span style="font-family: monospace;">unit</span>(s) and vertical grid (u- or w-grid) of
239user-defined vertical profile output quantities (see <a href="chapter_4.3.html#data_output_pr_user">data_output_pr_user</a>)
240have to be set. Input parameter <span style="font-family: monospace;">variable</span>
241contains the string identifier of the respective variable. Parameter<span style="font-family: monospace;"> var_count </span>contains the internal profile number and must not be changed by the user. For those
242variables not recognized by the user, the parameter <span style="font-family: monospace;">unit</span> is set to
243"illegal", which tells the calling routine that the output variable is
244not defined and leads to a program abort.<br><br>See <a href="chapter_3.5.4.html">chapter 3.5.4</a> about
245creating user-defined output quantities.</td></tr><tr><td style="vertical-align: top;"><span style="font-family: monospace;">netcdf.f90</span> (4
246times) where the vertical grid coordinates for cross sections and
247volume data are defined</td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user_define_netcdf_grid"></a>user_define_<br>netcdf_grid(
248variable, found, grid_x, grid_y, grid_z )</span></td><td style="vertical-align: top;">Set the grid on which
249user-defined output quantities (see <a href="chapter_4.3.html#data_output_user">data_output_user</a>)
250are defined. Input parameter <span style="font-family: monospace;">variable</span>
251contains the string identifier of the respective variable. Allowed
252values are <span style="font-style: italic;">'x'</span>
253and <span style="font-style: italic;">'xu'</span>
254for <span style="font-family: monospace;">grid_x</span>,
255<span style="font-style: italic;">'y'</span> and <span style="font-style: italic;">'yv'</span> for <span style="font-family: monospace;">grid_y</span>, and<span style="font-family: monospace;"></span>&nbsp;<span style="font-style: italic;">'zu'</span> and <span style="font-style: italic;">'zw'</span> for <span style="font-family: monospace;">grid_z</span>. The
256output parameter <span style="font-family: monospace;">found</span>
257has to be set <span style="font-style: italic;">.TRUE.</span>
258by the user, otherwise an error message will appear in the job protocol
259for the respective output quantity.<br><br><span style="font-weight: bold;">Example:</span><br>If
260an output quantity is defined at the center of the grid boxes, the
261following settings have to be used:<br><br><div style="margin-left: 40px;"><span style="font-family: monospace;">grid_x = <span style="font-style: italic;">'x'</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">grid_y = <span style="font-style: italic;">'y'</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">grid_z = <span style="font-style: italic;">'zu'</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">found &nbsp;= <span style="font-style: italic;">.TRUE.</span></span><br></div><br>For
262defining an output quantity at the grid points where the
263u-velocity-component is defined, please use<br><br><div style="margin-left: 40px;"><span style="font-family: monospace;">grid_x = <span style="font-style: italic;">'xu'</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">grid_y = <span style="font-style: italic;">'y'</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">grid_z = <span style="font-style: italic;">'zu'</span></span><br style="font-family: monospace;"><span style="font-family: monospace;">found &nbsp;= <span style="font-style: italic;">.TRUE.</span></span><br></div><br>See
264<a href="chapter_3.5.4.html">chapter 3.5.4</a> about
265creating user-defined output quantities.</td></tr><tr><td style="vertical-align: top;">Middle of <span style="font-family: monospace;">data_output_2d.f90</span></td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user_data_output_2d"></a>user_data_<br>output_2d(
266av, variable, found, grid, local_pf )</span></td><td style="vertical-align: top;">Resorts&nbsp;user-defined&nbsp;quantities
267(to be output as cross-section data;&nbsp;see <a href="chapter_4.3.html#data_output_user">data_output_user</a>)
268with indices (k,j,i) to a temporary array <span style="font-family: monospace;">local_pf</span> with
269indices (i,j,k) and sets the <span style="font-family: monospace;">grid</span>
270on which they are defined. Depending on the value of input parameter <span style="font-family: monospace;">av</span> resorting is
271done for instantaneous (<span style="font-family: monospace;">av</span>=<span style="font-style: italic;">0</span>) or time averaged
272data (<span style="font-family: monospace;">av</span>=<span style="font-style: italic;">1</span>). Input parameter
273<span style="font-family: monospace;">variable</span>
274contains the string identifier of the respective variable. Allowed
275values for <span style="font-family: monospace;">grid</span>
276are&nbsp;<span style="font-style: italic;">'zu'</span>
277and&nbsp;<span style="font-style: italic;">'zw'</span>.
278The output parameter <span style="font-family: monospace;">found</span>
279has to be set <span style="font-style: italic;">.TRUE.</span>
280by the user, otherwise an error message will appear in the job protocol
281for the respective output quantity.<br><br>See <a href="chapter_3.5.4.html">chapter 3.5.4</a> about
282creating user-defined output quantities.</td></tr><tr><td style="vertical-align: top;"><span style="font-family: monospace;">data_output_3d.f90</span>
283at the end of the CASE structure</td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user_data_output_3d"></a>user_data_<br>output_3d(
284av, variable, found, local_pf, nz_do )</span></td><td style="vertical-align: top;">Resorts&nbsp;user-defined&nbsp;quantities
285(to be output as volume data;&nbsp;see <a href="chapter_4.3.html#data_output_user">data_output_user</a>)
286with indices (k,j,i) to a temporary array <span style="font-family: monospace;">local_pf</span> with
287indices (i,j,k) and sets the <span style="font-family: monospace;">grid</span>
288on which they are defined. Depending on the value of input parameter <span style="font-family: monospace;">av</span> resorting is
289done for instantaneous (<span style="font-family: monospace;">av</span>=<span style="font-style: italic;">0</span>) or time averaged
290data (<span style="font-family: monospace;">av</span>=<span style="font-style: italic;">1</span>). Input parameter
291<span style="font-family: monospace;">variable</span>
292contains the string identifier of the respective variable<span style="font-family: monospace;"></span><span style="font-style: italic;"></span><span style="font-style: italic;"></span>. The input
293parameter <span style="font-family: monospace;">nz_do</span>
294defines the upper limit of vertical grid index k of the output array
295(see <a href="chapter_4.2.html#nz_do3d">nz_do3d</a>).
296The output parameter <span style="font-family: monospace;">found</span>
297has to be set <span style="font-style: italic;">.TRUE.</span>
298by the user, otherwise an error message will appear in the job protocol
299for the respective output quantity.<br><br>See <a href="chapter_3.5.4.html">chapter 3.5.4</a> about
300creating user-defined output quantities.</td></tr><tr><td style="vertical-align: top;">End of <span style="font-family: monospace;">average_3d_data.f90</span>,
301middle and end of <span style="font-family: monospace;">sum_up_3d_data.f90</span></td><td style="vertical-align: top;"><span style="font-family: monospace;"><a name="user_3d_data_averaging"></a>user_3d_data_<br>averaging(
302mode, variable )</span></td><td style="vertical-align: top;">Sum up and time-average of
303user-defined output quantities (see <a href="chapter_4.3.html#data_output_user">data_output_user</a>)
304as well as allocation of the arrays necessary for storing the
305respective averages. Input parameter <span style="font-family: monospace;">variable</span>
306contains the string identifier of the respective variable. Depending on
307the requested action, input parameter <span style="font-family: monospace;">mode</span> has the
308value <span style="font-style: italic;">'allocate'</span>,
309<span style="font-style: italic;">'sum'</span>, or <span style="font-style: italic;">'average'</span>.<br><br>See
310<a href="chapter_3.5.4.html">chapter 3.5.4</a> about
311creating user-defined output quantities. </td></tr><tr><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt>
312case of <tt><font style="font-size: 10pt;" size="2">SELECT
313CASE(&nbsp;</font></tt><font style="font-size: 10pt; font-family: Courier New,Courier,monospace;" size="2"><code></code></font><tt><font style="font-size: 10pt;" size="2"><code>output_variable</code> ) </font></tt>command near the end of <code>data_output_dvrp.f90</code></td><td style="vertical-align: top;"><code><a name="user_data_output_dvrp"></a>user_data_<br>output_dvrp(<br>output_variable, local_pf )</code></td><td style="vertical-align: top;">Resorts&nbsp;user-defined&nbsp;quantities
314(to be output as dvrp objects;&nbsp;see <a href="chapter_4.3.html#data_output_user">data_output_user</a> and <a href="chapter_4.2.html#mode_dvrp">mode_dvrp</a>)
315with indices (k,j,i) to a temporary array <span style="font-family: monospace;">local_pf</span> with
316indices (i,j,k). The array  <span style="font-family: monospace;">local_pf</span> is then handed back to the calling subroutine&nbsp;<code>data_output_dvrp.f90</code>.<br><br>See
317<a href="chapter_3.5.4.html">chapter 3.5.4</a> about
318creating user-defined output quantities.</td></tr><tr valign="top"> <td width="211"> <p>End
319of <tt><font style="font-size: 10pt;" size="2">palm.f90</font></tt></p>
320</td> <td width="117"> <p><tt><font style="font-size: 10pt;" size="2"><font face="Cumberland, monospace"><a name="user_last_action"></a>user_last_</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">action</font></font></tt></p>
321</td> <td width="862"> <p>User-defined
322actions which are to be executed at the end
323of a
324model run. When <tt><font style="font-size: 10pt;" size="2">user_last_actions</font></tt>
325is called all model actions are already completed, but the files opened
326by the model are not closed yet and possibly terminating actions for
327these files (see subroutine of <tt><font style="font-size: 10pt;" size="2">close_files</font></tt>)
328are also not carried
329out yet.&nbsp; <br>
330CPU time for <tt><font style="font-size: 10pt;" size="2">user_last_actions</font></tt>
331appears in the local file <a href="chapter_3.4.html#CPU_MEASURES">CPU_MEASURES</a>
332within the category &ldquo;last actions&rdquo; (the time
333necessary for <tt><font style="font-size: 10pt;" size="2">close_files</font></tt> is included).</p>
334</td> </tr> </tbody></table><hr>
335<p style="line-height: 100%;"><br><font color="#000080"><font color="#000080"><a href="chapter_3.5.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.2.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
336change: </i>$Id: chapter_3.5.1.html 144 2008-01-04 04:29:45Z raasch $</p>
337</body></html>
Note: See TracBrowser for help on using the repository browser.