Changeset 130 for palm/trunk/DOC/app
- Timestamp:
- Nov 13, 2007 2:08:40 PM (17 years ago)
- Location:
- palm/trunk/DOC/app
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
palm/trunk/DOC/app/chapter_3.5.1.html
r90 r130 296 296 <span style="font-style: italic;">'sum'</span>, or <span style="font-style: italic;">'average'</span>.<br><br>See 297 297 <a href="chapter_3.5.4.html">chapter 3.5.4</a> about 298 creating user-defined output quantities. </td></tr><tr valign="top"> <td width="211"> <p>End 298 creating user-defined output quantities. </td></tr><tr><td style="vertical-align: top;"><tt><font style="font-size: 10pt;" size="2">DEFAULT</font></tt> 299 case of <tt><font style="font-size: 10pt;" size="2">SELECT 300 CASE( </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 user-defined quantities 301 (to be output as dvrp objects; 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>) 302 with indices (k,j,i) to a temporary array <span style="font-family: monospace;">local_pf</span> with 303 indices (i,j,k). The array <span style="font-family: monospace;">local_pf</span> is then handed back to the calling subroutine <code>data_output_dvrp.f90</code>.<br><br>See 304 <a href="chapter_3.5.4.html">chapter 3.5.4</a> about 305 creating user-defined output quantities.</td></tr><tr valign="top"> <td width="211"> <p>End 299 306 of <tt><font style="font-size: 10pt;" size="2">palm.f90</font></tt></p> 300 307 </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> -
palm/trunk/DOC/app/chapter_3.5.4.html
r129 r130 13 13 quantities which are not part of PALM's standard output. The basic user 14 14 interface includes a number of subroutines which allow the calculation 15 of user-defined quantities and output of these quantities as (horizontally averaged) <a href="#vertical_profiles">vertical profiles</a>, <a href="#time_series">time series</a>,<a href="#2D_and_3D">2d cross16 section</a> or <a href="#2D_and_3D">3d volume data</a> . The respective subroutines15 of user-defined quantities and output of these quantities as 1. (horizontally averaged) <a href="#vertical_profiles">vertical profiles</a>, 2. <a href="#time_series">time series</a>, 3. <a href="#2D_and_3D">2d cross 16 section</a> or <a href="#2D_and_3D">3d volume data</a> and 4. <a href="#dvrp">dvrp</a> objects. The respective subroutines 17 17 contain sample code lines (written as comment lines) for defining, calculating and 18 18 output of such quantities.<br><br>Output times, averaging intervals, etc. are steered by the same variables as used for the standard PALM output quantities, e.g. <a href="chapter_4.2.html#dt_data_output">dt_data_output</a>.<br><br>The 19 19 rest of this chapter explains step-by-step how to modify/extend the 20 default file user_interface.f90 in order to generate the respective output.<br><br><br><h4><a name="vertical_profiles"></a> Output of vertical profiles</h4>This example shows the output of the20 default file user_interface.f90 in order to generate the respective output.<br><br><br><h4><a name="vertical_profiles"></a>1. Output of vertical profiles</h4>This example shows the output of the 21 21 quantity "turbulent resolved-scale horizontal momentum flux" (u*v*). If more than one user-defined 22 22 quantity shall be output, the following steps have to be carried out in the … … 49 49 calculation is stored in array <span style="font-family: Courier New,Courier,monospace;">sums_l</span>. 50 50 The second index of this array is the identification number of the 51 profile which must match the one given in the previous step 2.</li></ol><br><h4><a name="time_series"></a> Output of timeseries</h4>This example shows the output of two time series for the absolut extremal values of the horizontal velocities <span style="font-style: italic;">u</span> and <span style="font-style: italic;">v</span>. If more than one user-defined52 quantity shall be output, the following steps have to be carried out in the 53 same way for each of the quantities.<br><br><ol><li>For each time series quantity you have to give a label and a unit (subroutine <a href="chapter_3.5.1.html#user_init">user_init</a>), which will be used for the NetCDF file. They must not contain more than seven characters. The value of <code>dots_num</code> has to be increased by the number of new time series quantities. Its old value has to be stored in <code>dots_num_palm</code>.<br><br><code> dots_label(dots_num<span style="color: rgb(255, 0, 0);">+1</span>) = '<span style="color: rgb(255, 0, 0);">abs_umx</span>'<br> dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+1</span>) = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br> dots_label(dots_num<span style="color: rgb(255, 0, 0);">+2</span>) = '<span style="color: rgb(255, 0, 0);">abs_vmx</span>'<br> dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+2</span>) = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br><br> dots_num_palm = dots_num<br> dots_num = dots_num <span style="color: rgb(255, 0, 0);">+ 2</span><br><br></code>Only those parts in <span style="color: rgb(255, 0, 0);">red</span> have to be adjusted by the user.<br><br></li><li>These quantities are calculated and output in subroutine <a href="chapter_3.5.1.html#user_statistics">user_statistics</a> for every statistic region <code>sr</code> defined by the user, but at least for the region <span style="font-style: italic;">"total domain"</span>:<br> <br><code> ts_value(dots_num_palm+1,sr) = ABS( u_max )<br> ts_value(dots_num_palm+2,sr) = ABS( v_max )<br></code> <br></li></ol><h4><span style="font-weight: bold;"><a name="2D_and_3D"></a>Output of 2d cross sections or 3d volume data</span></h4><br>This example shows the output of the51 profile which must match the one given in the previous step 2.</li></ol><br><h4><a name="time_series"></a>2. Output of timeseries</h4>This example shows the output of two time series for the absolut extremal values of the horizontal velocities <span style="font-style: italic;">u</span> and <span style="font-style: italic;">v</span>. If more than one user-defined 52 quantity shall be output, the following steps have to be carried out in the 53 same way for each of the quantities.<br><br><ol><li>For each time series quantity you have to give a label and a unit (subroutine <a href="chapter_3.5.1.html#user_init">user_init</a>), which will be used for the NetCDF file. They must not contain more than seven characters. The value of <code>dots_num</code> has to be increased by the number of new time series quantities. Its old value has to be stored in <code>dots_num_palm</code>.<br><br><code> dots_label(dots_num<span style="color: rgb(255, 0, 0);">+1</span>) = '<span style="color: rgb(255, 0, 0);">abs_umx</span>'<br> dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+1</span>) = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br> dots_label(dots_num<span style="color: rgb(255, 0, 0);">+2</span>) = '<span style="color: rgb(255, 0, 0);">abs_vmx</span>'<br> dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+2</span>) = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br><br> dots_num_palm = dots_num<br> dots_num = dots_num <span style="color: rgb(255, 0, 0);">+ 2</span><br><br></code>Only those parts in <span style="color: rgb(255, 0, 0);">red</span> have to be adjusted by the user.<br><br></li><li>These quantities are calculated and output in subroutine <a href="chapter_3.5.1.html#user_statistics">user_statistics</a> for every statistic region <code>sr</code> defined by the user, but at least for the region <span style="font-style: italic;">"total domain"</span>:<br> <br><code> ts_value(dots_num_palm+1,sr) = ABS( u_max )<br> ts_value(dots_num_palm+2,sr) = ABS( v_max )<br></code></li></ol> <br><h4><span style="font-weight: bold;"><a name="2D_and_3D"></a>3. Output of 2d cross sections or 3d volume data</span></h4><br>This example shows the output of the 54 54 quantity "square of the u-component" (<span style="font-weight: bold;">Note:</span> this quantity 55 55 could of course easily be calculated from the u-component by … … 223 223 '; WRITE ( 14 ) u2_av</span><br style="font-family: monospace;"><span style="font-family: monospace;"> 224 224 ENDIF</span><br><br>Otherwise, the calculated 225 time-average may be wrong. </li></ol><hr> 225 time-average may be wrong.</li></ol><br><h4><a name="dvrp"></a>4. Output of DVRP objects</h4>This example shows the output of the 226 quantity "square of the u-component", <span style="font-style: italic;">u<sup>2</sup></span>. If more than one user-defined 227 quantity shall be output, the following steps have to be carried out in the 228 same way for each of the quantities. First, steps 1 - 6 of <a href="chapter_3.5.4.html#2D_and_3D">2d cross 229 section</a> or <a href="chapter_3.5.4.html#2D_and_3D">3d volume data</a> are required. Second, the gridpoint data of the quantity has to 230 be resorted to array <span style="font-family: monospace;">local_pf</span> 231 in subroutine <a href="chapter_3.5.1.html#user_data_output_dvrp"><span style="font-family: monospace;">user_data_output_dvrp</span></a> as follows:<br><br><code> CASE ( '<span style="color: rgb(255, 0, 0);">u2</span>', '<span style="color: rgb(255, 0, 0);">u2</span>_xy', '<span style="color: rgb(255, 0, 0);">u2</span>_xz', '<span style="color: rgb(255, 0, 0);">u2</span>_yz', )<br> DO i = nxl, nxr+1<br> DO j = nys, nyn+1<br> DO k = nzb, nz_do3d<br> local_pf(i,j,k) = <span style="color: rgb(255, 0, 0);">u2</span>(k,j,i)<br> ENDDO<br> ENDDO<br> ENDDO</code><br><br>Only those parts in <span style="color: rgb(255, 0, 0);">red</span> have to be adjusted by the user.<br><br>After performing these steps, the user-defined quantity <code>'u2'</code> can be selected like standard model quantities by the <a href="chapter_4.2.html#dvrp_graphics">dvrp_graphics</a> package parameter <a href="chapter_4.2.html#mode_dvrp">mode_dvrp</a>.<hr> 226 232 <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> 227 233 <p style="line-height: 100%;"><i>Last -
palm/trunk/DOC/app/chapter_4.2.html
r129 r130 10678 10678 <p>Several different objects can 10679 10679 be assigned simultaneously and 10680 will be displayed in the same scene. Allowed values for <span style="font-weight: bold;">mode_dvrp</span> are <span style="font-style: italic;">'isosurface# '</span>10681 (isosurface), <span style="font-style: italic;">'slicer# '</span>10680 will be displayed in the same scene. Allowed values for <span style="font-weight: bold;">mode_dvrp</span> are <span style="font-style: italic;">'isosurface##'</span> 10681 (isosurface), <span style="font-style: italic;">'slicer##'</span> 10682 10682 (cross sections), and <span style="font-style: italic;">'particles'</span>. 10683 Within the strings the hash character ("#") has to be replaced by a10684 digit 1≤#≤9. Up to 10 objects10683 Within the strings the hash characters ("##") have to be replaced by two 10684 digits 01≤##≤99. Up to 10 objects 10685 10685 can be assigned at the same time, e.g.: </p> 10686 10686 … … 10690 10690 10691 10691 <blockquote><b>mode_dvrp</b> 10692 = <span style="font-style: italic;">'isosurface 2'</span><i>,10693 'slicer 1',10694 'particles', 'slicer 2'</i></blockquote>10692 = <span style="font-style: italic;">'isosurface02'</span><i>, 10693 'slicer01', 10694 'particles', 'slicer02'</i></blockquote> 10695 10695 10696 10696 … … 10706 10706 orientation of the cross section, thus xy, xz, or yz). Since for <span style="font-weight: bold;">data_output</span> <span style="font-weight: bold;"></span>lists of 10707 10707 variables may be 10708 assigned, the digit at the end of the <span style="font-weight: bold;">mode_dvrp</span>-string10709 select sthe quantity, which is given10710 at the respective position in the respective list (e.g. <span style="font-style: italic;">'isosurface 2'</span>10708 assigned, the digits at the end of the <span style="font-weight: bold;">mode_dvrp</span>-string 10709 select the quantity, which is given 10710 at the respective position in the respective list (e.g. <span style="font-style: italic;">'isosurface02'</span> 10711 10711 selects the second 3D quantity 10712 of <span style="font-weight: bold;">data_output</span>, <span style="font-style: italic;">'slicer 1'</span> selects the first 2D quantity10712 of <span style="font-weight: bold;">data_output</span>, <span style="font-style: italic;">'slicer01'</span> selects the first 2D quantity 10713 10713 of <span style="font-weight: bold;">data_output</span>). 10714 10714 If e.g. <span style="font-weight: bold;">data_output</span> is assigned as <b>data_output</b> = <span style="font-style: italic;">'u_xy'</span><i>, … … 10731 10731 10732 10732 <p>The vertical extension of the displayed domain is 10733 given by <a href="#nz_do3d">nz_do3d</a>.<br> 10733 given by <a href="#nz_do3d">nz_do3d</a>.</p><p>If user-defined dvrp objects exist (see <a href="chapter_3.5.4.html">chapter 3.5.4</a>), then <span style="font-weight: bold;">mode_dvrp</span> may also refer to quantities selected with the parameter <a href="chapter_4.3.html#data_output_user">data_output_user</a> (internally PALM appends them to those selected with 10734 the parameter <a href="chapter_4.2.html#data_output">data_output</a>). 10734 10735 10735 10736 … … 10737 10738 of mode_dvrp must correspond to those of data_output 10738 10739 and 10739 data_output ! </b>If e.g. <b>data_output</b> = <span style="font-style: italic;">'pt_xy'</span>,<span style="font-style: italic;"> 'w'</span><i> </i>was set, then only the digit "1" isallowed10740 data_output_user! </b>If e.g. <b>data_output</b> = <span style="font-style: italic;">'pt_xy'</span>,<span style="font-style: italic;"> 'w'</span><i> </i>was set, then only the digits "01" are allowed 10740 10741 for <b>mode_dvrp</b>, 10741 thus <span style="font-style: italic;">'isosurface 1'</span>10742 and/or <span style="font-style: italic;">'slicer 1'</span><i>.</i>10742 thus <span style="font-style: italic;">'isosurface01'</span> 10743 and/or <span style="font-style: italic;">'slicer01'</span><i>.</i> 10743 10744 </p> 10744 10745 … … 10760 10761 10761 10762 The declaration color charts to be 10762 used still have to be given "manually" in subroutine < span style="font-family: monospace;">user_dvrp_coltab</span>10763 used still have to be given "manually" in subroutine <a href="chapter_3.4.html#user_dvrp_coltab"><span style="font-family: monospace;">user_dvrp_coltab</span></a> 10763 10764 (file <tt><font style="font-size: 11pt;" size="2">user_interface.f90</font></tt>). 10764 10765 <br> … … 10769 10770 to the local characteristics of the flow field) to be used for the 10770 10771 visualization, must be carried out by adding respective code extensions 10771 to < tt><font style="font-size: 11pt;" size="2">user_particle_attributes</font></tt>10772 to <a href="chapter_3.4.html#user_particle_attributes"><tt><font style="font-size: 11pt;" size="2">user_particle_attributes</font></tt></a> 10772 10773 (in file <tt><font style="font-size: 11pt;" size="2">user_interface.f90</font></tt>). </td> 10773 10774
Note: See TracChangeset
for help on using the changeset viewer.