source: palm/trunk/DOC/app/chapter_3.5.4.html @ 77

Last change on this file since 77 was 62, checked in by raasch, 18 years ago

Id string added to all html files

  • Property svn:keywords set to Id
File size: 22.4 KB
RevLine 
[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
4chapter 3.5.5</title> <meta name="GENERATOR" content="StarOffice 7 (Win32)"> <meta name="AUTHOR" content="Siegfried Raasch"> <meta name="CREATED" content="20040802;14050943"> <meta name="CHANGED" content="20041117;12180008"> <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%;"><font size="4">3.5.4
10User-defined output quantities<br>
11</font></h3>A very typical request of users is the
12calculation and
[5]13output of
14quantities which are not part of PALM's standard output. The basic user
15interface includes a number of subroutines which allow the calculation
16of user-defined quantities and output of these quantities as 2d cross
[62]17section or 3d volume data. The respective subroutines
18contain&nbsp;as
[5]19an example code lines (written as comment lines) for calculating and
20output the square of the u-component velocity (note: this quantity
21could of course easily be calculated from the u-component by
22postprocessing the PALM output so that calculation within PALM is not
23necessarily required).<br><br>The
24rest of this chapter explains step-by-step how to modify/extend the
25default file user_interface.f90 in order to generate output of the
26quantity "square of the u-component". If more than one user-defined
27quantity shall be output, these steps have to be carried out in the
[62]28same way for each of the quantities.<br><br><ol><li>The
29quantity has to be given a unique string identifier, e.g. <span style="font-style: italic;">'u2'</span>.
[5]30This identifier must be different from the identifiers used for the
[62]31PALM standard output (see list in description of parameter <a href="chapter_4.2.html#data_output">data_output</a>).
32To switch on output of this quantity, the user has to assign the string
33identifier to the parameter <a href="chapter_4.3.html#data_output_user">data_output_user</a>,
34eg.:<br><br><span style="font-family: monospace;">&nbsp;
35&nbsp; data_output_user</span> = <span style="font-style: italic;">'u2'</span>, <span style="font-style: italic;">&nbsp;'u2_xy_av'</span><br><br>The
36pure string <span style="font-style: italic;">'u2'</span>
[5]37switches on the output of instantaneous 3d volume data. Output of cross
38section data and time averaged data is switched on by additionally
[62]39appending the strings <span style="font-style: italic;">'_xy'</span>,
40<span style="font-style: italic;">'_xz'</span>, <span style="font-style: italic;">'_yz'</span>, and/or <span style="font-style: italic;">'_av'</span> (for a
41detailed explanation see parameter <a href="chapter_4.2.html#data_output">data_output</a>).<br><br></li><li>In
42order to store the quantities' grid point data within PALM, a 3d data
43array has to be declared in module <a href="chapter_3.5.1.html#user"><span style="font-family: monospace;">user</span></a>:<br><br><span style="font-family: monospace;">&nbsp; &nbsp; REAL,
44DIMENSION(:,:,:), ALLOCATABLE ::&nbsp; u2, u2_av</span><br><br>The
45second array <span style="font-family: monospace;">u2_av</span>
[5]46is needed in case that output of time averaged data is requested. It is
47used to store the sum of the data of the respective time levels over
[62]48which the average has to be carried out.<br><br><br></li><li>The
49data array has to be allocated in subroutine <a href="chapter_3.5.1.html#user_init"><span style="font-family: monospace;">user_init</span></a>:<br><br><span style="font-family: monospace;">&nbsp; &nbsp;
50ALLOCATE( u2(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )</span><br><br>In
[5]51case that output of time averaged data is requested, the array
52containing the sum has possibly to be read from the restart file (local
[62]53filename <a href="chapter_3.4.html#BININ">BININ</a>)
54by executing the following code in <span style="font-family: monospace;">user_init</span>:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;
55&nbsp;IF ( initializing_actions == 'read_restart_data' )&nbsp;
56THEN</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
57&nbsp; READ ( 13 )&nbsp; field_chr</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
58&nbsp; &nbsp;DO&nbsp; WHILE ( TRIM( field_chr ) /= '*** end
59user ***' )</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
60&nbsp; &nbsp; SELECT CASE ( TRIM( field_chr ) )</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
61&nbsp;&nbsp; &nbsp;&nbsp; CASE ( 'u2_av' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
62&nbsp;&nbsp; &nbsp; ALLOCATE(
63u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
64&nbsp;&nbsp; &nbsp; READ ( 13 )&nbsp; u2_av</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;
65&nbsp;&nbsp; &nbsp; &nbsp;&nbsp; CASE DEFAULT</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
66&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; PRINT*,
67'+++ user_init: unknown
[5]68variable named "', &amp;</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
69&nbsp; &nbsp;&nbsp;
[62]70&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
71TRIM(
[5]72field_chr ), '" found in'</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
73&nbsp; &nbsp;&nbsp; &nbsp; &nbsp; PRINT*,
74'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[62]75data from prior run on PE ', myid</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
76&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
77&nbsp; CALL local_stop</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;
78&nbsp; &nbsp; &nbsp;&nbsp; END SELECT<br>&nbsp;
79&nbsp; &nbsp;&nbsp; ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;
80&nbsp;ENDIF</span><br style="font-family: monospace;"><br><br></li><li>The
81quantity has to be given a unit (subroutine <a href="chapter_3.5.1.html#user_check_data_output"><span style="font-family: monospace;">user_check_data_output</span></a>):<br><br><span style="font-family: monospace;">&nbsp; &nbsp; CASE (
82'u2' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
83&nbsp;&nbsp; unit = 'm2/s2'</span><br>&nbsp;<br>Otherwise,
84PALM will abort.<br><br><br></li><li>The
[5]85vertical grid on which the quantity is defined (given by the levels
86'zu' or 'zw', on which the u- or w-component of the velocity are
[62]87defined) has to be specified for the NetCDF output files in subroutine <a href="chapter_3.5.1.html#user_define_netcdf_grid"><span style="font-family: monospace;">user_define_netcdf_grid</span></a>:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;
88&nbsp;CASE ( 'u2', 'u2_xy', 'u2_xz', 'u2_yz' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;
89&nbsp; &nbsp; grid = 'zu'</span><br>&nbsp;<br>As
90the example shows, this grid has to be defined for the 3d volume data
91as well as for all of the three cross sections.<br><span style="font-family: monospace;"><br><br></span></li><li>After
92each timestep, the quantity has to be calculated at all gridpoints and
93to be stored. This has to be done in subroutine <a href="chapter_3.5.1#user_actions"><span style="font-family: monospace;">user_actions</span></a>
94at location 'after_integration':<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;CASE
95( 'after_integration' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">!</span><br style="font-family: monospace;"><span style="font-family: monospace;">!--&nbsp;&nbsp;&nbsp;
96Enter actions to be done after every time integration (before</span><br style="font-family: monospace;"><span style="font-family: monospace;">!--&nbsp;&nbsp;&nbsp;
97data output)</span><br style="font-family: monospace;"><span style="font-family: monospace;">!--&nbsp;&nbsp;&nbsp;
98Sample for user-defined output:</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
99DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
100DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
101DO&nbsp; k = nzb, nzt+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
102u2(k,j,i) = u(k,j,i)**2</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
103ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
104ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
105ENDDO</span><br><br>&nbsp;<br></li><li>In
[5]106case that output of time-averaged data is requested, the sum- and
107average-operations as well as the allocation of the sum-array have to
[62]108be carried out in subroutine <a href="chapter_3.5.1.html#user_3d_data_averaging"><span style="font-family: monospace;">user_3d_data_averaging</span></a>:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
109IF ( mode == 'allocate' )&nbsp; THEN<br>&nbsp; &nbsp;
110...</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
111CASE ( 'u2' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
112IF ( .NOT. ALLOCATED( u2_av ) )&nbsp; THEN</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
113ALLOCATE( u2_av(nzb:nzt+1,nys-1:nyn+1,nxl-1:nxr+1) )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
114ENDIF</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
115u2_av = 0.0<br>&nbsp; &nbsp; ...</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
116ELSEIF ( mode == 'sum' )&nbsp; THEN<br>&nbsp; &nbsp;
117...</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CASE
118( 'u2' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
119DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
120DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
121DO&nbsp; k = nzb, nzt+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
122u2_av(k,j,i) = u2_av(k,j,i) + u2(k,j,i)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
123ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
124ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
125ENDDO<br>&nbsp; &nbsp; ...</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
126ELSEIF ( mode == 'average' )&nbsp; THEN<br>&nbsp;
127&nbsp; ...</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CASE
128( 'u2' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
129DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
130DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
131DO&nbsp; k = nzb, nzt+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
132u2_av(k,j,i) = u2_av(k,j,i) / REAL( average_count_3d )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
133ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
134ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
135ENDDO</span><br><br>&nbsp;</li><li>For
136output of 2d cross sections, the gridpoint data of the quantity has to
137be resorted to array <span style="font-family: monospace;">local_pf</span>
138in subroutine <a href="chapter_3.5.1.html#user_data_output_2d"><span style="font-family: monospace;">user_data_output_2d</span></a>.
139Also the vertical grid, on which the quantity is defined, has to be set
140again:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;CASE
141( 'u2_xy', 'u2_xz', 'u2_yz' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
142IF ( av == 0 )&nbsp; THEN</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
143DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
144DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
145DO&nbsp; k = nzb, nzt+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
146local_pf(i,j,k) = u2(k,j,i)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
147ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
148ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
149ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
150ELSE</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
151DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
152DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
153DO&nbsp; k = nzb, nzt+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
154local_pf(i,j,k) = u2_av(k,j,i)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
155ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
156ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
157ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
158ENDIF</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
159grid = 'zu'</span><br>&nbsp;<br>The <span style="font-family: monospace;">ELSE</span> case is
160only needed in case that output of time-averaged data is requested.<br><br><br></li><li>For
161output of 3d volume data, the gridpoint data of the quantity has to be
162resorted to array <span style="font-family: monospace;">local_pf</span>
163in subroutine <a href="chapter_3.5.1.html#user_data_output_3d"><span style="font-family: monospace;">user_data_output_3d</span></a>.
164Also the vertical grid, on which the quantity is defined, has to be set
165again:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;CASE
166( 'u2' )</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
167IF ( av == 0 )&nbsp; THEN</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
168DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
169DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
170DO&nbsp; k = nzb, nz_do</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
171local_pf(i,j,k) = u2(k,j,i)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
172ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
173ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
174ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
175ELSE</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
176DO&nbsp; i = nxl-1, nxr+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
177DO&nbsp; j = nys-1, nyn+1</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
178DO&nbsp; k = nzb, nz_do</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
179local_pf(i,j,k) = u2_av(k,j,i)</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
180ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
181ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
182ENDDO</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
183ENDIF</span><br style="font-family: monospace;"><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
184grid = 'zu'</span><br><br>The <span style="font-family: monospace;">ELSE</span> case is
185only needed in case that output of time-averaged data is requested.<br><br><br></li><li>In
186case of job chains, the sum array has to be written to the (binary)
187restart file (local filename <a href="chapter_3.4.html#BINOUT">BINOUT</a>)
188in subroutine <a href="chapter_3.5.1.html#user_last_actions"><span style="font-family: monospace;">user_last_actions</span></a>:<br><br><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
189IF ( ALLOCATED( u2_av ) )&nbsp; THEN</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[5]190WRITE ( 14 )&nbsp;
191'u2_av&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
[62]192';&nbsp; WRITE ( 14 )&nbsp; u2_av</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
193ENDIF</span><br><br>Otherwise, the calculated
194time-average may be wrong. &nbsp;</li></ol><hr>
195<p style="line-height: 100%;"><br><font color="#000080"><font color="#000080"><a href="chapter_3.5.3.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.5.html"><font color="#000080"><img style="border: 2px solid ; width: 32px; height: 32px;" alt="" src="right.gif" name="Grafik3"></font></a></font></font></p>
196<p style="line-height: 100%;"><i>Last
197change:&nbsp;</i> $Id: chapter_3.5.4.html 62 2007-03-13 02:52:40Z raasch $</p>
[5]198</body></html>
Note: See TracBrowser for help on using the repository browser.