Ignore:
Timestamp:
Nov 13, 2007 2:08:40 PM (17 years ago)
Author:
letzel
Message:

DVRP output modifications:

  • The user can now visualize user-defined quantities using dvrp.

data_output_dvrp calls the new user_interface subroutine
user_data_output_dvrp in case of unknown variables (CASE DEFAULT).

  • Two instead of one digit are allowed to specify isosurface and slicer

variables with the parameter mode_dvrp.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/DOC/app/chapter_3.5.4.html

    r129 r130  
    1313quantities which are not part of PALM's standard output. The basic user
    1414interface 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 cross
    16 section</a> or <a href="#2D_and_3D">3d volume data</a>. The respective subroutines
     15of user-defined quantities and output of these quantities as 1. (horizontally averaged) <a href="#vertical_profiles">vertical profiles</a>, 2.&nbsp;<a href="#time_series">time series</a>, 3. <a href="#2D_and_3D">2d cross
     16section</a> or <a href="#2D_and_3D">3d volume data</a> and 4. <a href="#dvrp">dvrp</a> objects. The respective subroutines
    1717contain sample code lines (written as comment lines) for defining, calculating and
    1818output 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
    1919rest 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 the
     20default 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
    2121quantity "turbulent resolved-scale horizontal momentum flux" (u*v*). If more than one user-defined
    2222quantity shall be output, the following steps have to be carried out in the
     
    4949calculation is stored in array <span style="font-family: Courier New,Courier,monospace;">sums_l</span>.
    5050The 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-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>&nbsp;&nbsp;&nbsp; dots_label(dots_num<span style="color: rgb(255, 0, 0);">+1</span>) = '<span style="color: rgb(255, 0, 0);">abs_umx</span>'<br>&nbsp;&nbsp;&nbsp; dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+1</span>)&nbsp; = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br>&nbsp;&nbsp;&nbsp; dots_label(dots_num<span style="color: rgb(255, 0, 0);">+2</span>) = '<span style="color: rgb(255, 0, 0);">abs_vmx</span>'<br>&nbsp;&nbsp;&nbsp; dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+2</span>)&nbsp; = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br><br>&nbsp;&nbsp;&nbsp; dots_num_palm = dots_num<br>&nbsp;&nbsp;&nbsp; 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&nbsp;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,&nbsp;but at least for the region <span style="font-style: italic;">"total domain"</span>:<br>&nbsp;<br><code>&nbsp;&nbsp;&nbsp; ts_value(dots_num_palm+1,sr) = ABS( u_max )<br>&nbsp;&nbsp;&nbsp; ts_value(dots_num_palm+2,sr) = ABS( v_max )<br></code>&nbsp;<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 the
     51profile 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
     52quantity shall be output, the following steps have to be carried out in the
     53same 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>&nbsp;&nbsp;&nbsp; dots_label(dots_num<span style="color: rgb(255, 0, 0);">+1</span>) = '<span style="color: rgb(255, 0, 0);">abs_umx</span>'<br>&nbsp;&nbsp;&nbsp; dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+1</span>)&nbsp; = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br>&nbsp;&nbsp;&nbsp; dots_label(dots_num<span style="color: rgb(255, 0, 0);">+2</span>) = '<span style="color: rgb(255, 0, 0);">abs_vmx</span>'<br>&nbsp;&nbsp;&nbsp; dots_unit(dots_num<span style="color: rgb(255, 0, 0);">+2</span>)&nbsp; = '<span style="color: rgb(255, 0, 0);">m/s</span>'<br><br>&nbsp;&nbsp;&nbsp; dots_num_palm = dots_num<br>&nbsp;&nbsp;&nbsp; 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&nbsp;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,&nbsp;but at least for the region <span style="font-style: italic;">"total domain"</span>:<br>&nbsp;<br><code>&nbsp;&nbsp;&nbsp; ts_value(dots_num_palm+1,sr) = ABS( u_max )<br>&nbsp;&nbsp;&nbsp; ts_value(dots_num_palm+2,sr) = ABS( v_max )<br></code></li></ol>&nbsp;<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
    5454quantity "square of the u-component" (<span style="font-weight: bold;">Note:</span> this quantity
    5555could of course easily be calculated from the u-component by
     
    223223';&nbsp; WRITE ( 14 )&nbsp; u2_av</span><br style="font-family: monospace;"><span style="font-family: monospace;">&nbsp;&nbsp;&nbsp;
    224224ENDIF</span><br><br>Otherwise, the calculated
    225 time-average may be wrong. &nbsp;</li></ol><hr>
     225time-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
     226quantity "square of the u-component", <span style="font-style: italic;">u<sup>2</sup></span>. If more than one user-defined
     227quantity shall be output, the following steps have to be carried out in the
     228same way for each of the quantities. First,&nbsp;steps 1 - 6 of <a href="chapter_3.5.4.html#2D_and_3D">2d cross
     229section</a> or <a href="chapter_3.5.4.html#2D_and_3D">3d volume data</a> are required. Second,&nbsp;the gridpoint data of the quantity has to
     230be resorted to array <span style="font-family: monospace;">local_pf</span>
     231in 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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',&nbsp; )<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DO&nbsp; i = nxl, nxr+1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DO&nbsp; j = nys, nyn+1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; DO&nbsp; k = nzb, nz_do3d<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; local_pf(i,j,k) = <span style="color: rgb(255, 0, 0);">u2</span>(k,j,i)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDDO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ENDDO<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>
    226232<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>
    227233<p style="line-height: 100%;"><i>Last
Note: See TracChangeset for help on using the changeset viewer.