Changes between Version 83 and Version 84 of doc/app/userint/output


Ignore:
Timestamp:
Nov 22, 2018 2:41:02 PM (6 years ago)
Author:
scharf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • doc/app/userint/output

    v83 v84  
    22[[TracNav(doc/userint/toc)]]
    33
    4 A very typical request of users is the calculation and output of quantities which are not part of {{{PALM}}}'s standard output. The basic user interface includes a number of subroutines which allow the calculation of user-defined quantities and output of these quantities as 1. (horizontally averaged) [#part_1 vertical profiles], 2. [#part_2 time series], 3. [#part_3 2d cross section], [#part_3 3d volume data] or [#part_3 mask data], 4. [#part_4 dvrp objects], 5. [#part_5 spectra] and 6. [#part_6 virtual flights]. The respective subroutines contain sample code lines (written as comment lines) for defining, calculating and output of such quantities.\\\\
    5 Output times, averaging intervals, etc. are steered by the same variables as used for the standard {{{PALM}}} output quantities, e.g. [../../d3par#dt_data_output dt_data_output].\\\\
    6 The following parts of this chapter explains step-by-step how to modify/extend the respective default user interface subroutines in order to generate the respective output:\\
    7    1. (horizontally averaged) [#part_1 vertical profiles]
    8    2. [#part_2 time series]
    9    3. [#part_3 2d cross section], [#part_3 3d volume data] or [#part_3 masked data]
    10    4. [#part_4 dvrp objects]
    11    5. [#part_5 spectra]
    12    6. [#part_6 virtual flights]\\\\
     4A very typical request of users is the calculation and output of quantities which are not part of PALM's standard output. The basic user interface includes a number of subroutines which allow the calculation of user-defined quantities and output of these quantities as:\\
     5   1. [#a1.Outputofuser-definedverticalprofiles (horizontally averaged) vertical profiles]
     6   2. [#a2.Outputofuser-definedtimeseries time series]
     7   3. [#a3.Outputofuser-defined2dcrosssections3dvolumedataormaskeddata 2d cross section, 3d volume data or masked data]
     8   4. [#a4.Outputofuser-definedDVRPobjects dvrp objects]
     9   5. [#a5.Outputofuser-definedspectra spectra]
     10   6. [#a6.Outputofuser-definedflightmeasurements virtual flights]\\
     11
     12This is explaines step-by-step in the following. Furthermore, the respective subroutines already contain sample code lines (written as comment lines) for defining, calculating and output of such quantities. Output times, averaging intervals, etc. are steered by the same variables as used for the standard PALM output quantities, e.g. [../../d3par#dt_data_output dt_data_output].\\\\
    1313
    1414
    1515== 1. Output of user-defined vertical profiles
    1616This example shows the output of the quantity "turbulent resolved-scale horizontal momentum flux" (''u*v*''). If more than one user-defined quantity shall be output, the following steps have to be carried out in the same way for each of the quantities.\\
    17    1. The quantity has to be given a unique string identifier, e.g.'' 'u*v*'.'' This identifier must be different from the identifiers used for the {{{PALM}}} standard output (see list in description of parameter [../../d3par#data_output_pr data_output_pr]). The identifier must not contain more than '''20''' characters. In case that 2d cross section output is defined on one single level only (see chapter 3, paragraph 9, further below), the identifier string must contain an asterisk ({{{"*"}}}). To switch on output of the quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_pr_user data_output_pr_user], eg.:\\
     17   1. The quantity has to be given a unique string identifier, e.g.'' 'u*v*'.'' This identifier must be different from the identifiers used for the PALM standard output (see list in description of parameter [../../d3par#data_output_pr data_output_pr]). The identifier must not contain more than '''20''' characters. In case that 2d cross section output is defined on one single level only (see chapter 3, paragraph 9, further below), the identifier string must contain an asterisk ({{{"*"}}}). To switch on output of the quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_pr_user data_output_pr_user], eg.:\\
    1818
    1919   {{{ data_output_pr_user = 'u*v*' }}}, \\
     
    2626       {{{hom(:,2,user_pr_index,:)      = SPREAD(}}} [[span({{{zu}}},style=color: red)]]{{{, 2, statistic_regions+1 )    ! vertical grid }}}
    2727
    28    The identification number (user_pr_index) must be within the range [ {{{pr_palm+1 , pr_palm+max_pr_user}}} ], where {{{max_pr_user}}} is the number of user-defined profiles as given by parameter [../../userpar#data_output_pr_user data_output_pr_user] in the respective {{{PALM}}} run. The physical unit has to be given with respect to the netCDF conventions. If no unit is given, {{{PALM}}} will abort. The vertical grid has to be either {{{zu}}} ({{{u}}}-grid) or {{{zw}}} ({{{w}}}-grid).
     28   The identification number (user_pr_index) must be within the range [ {{{pr_palm+1 , pr_palm+max_pr_user}}} ], where {{{max_pr_user}}} is the number of user-defined profiles as given by parameter [../../userpar#data_output_pr_user data_output_pr_user] in the respective PALM run. The physical unit has to be given with respect to the netCDF conventions. If no unit is given, PALM will abort. The vertical grid has to be either {{{zu}}} ({{{u}}}-grid) or {{{zw}}} ({{{w}}}-grid).
    2929
    3030   3. The quantity has to be calculated for all grid points (subroutine user_statistics): \\\\
     
    6565== 3. Output of user-defined 2d cross sections, 3d volume data or masked data
    6666
    67 This example shows the output of the quantity "square of the u-component" ('''Note:''' this quantity could of course easily be calculated from the u-component by postprocessing the {{{PALM}}} output so that calculation within {{{PALM}}} is not necessarily required). If more than one user-defined quantity shall be output, the following steps have to be carried out in the same way for each of the quantities.
    68 
    69    1. For output of '''2d cross sections''' and '''3d volume data''', the quantity has to be given a unique string identifier, e.g.'' 'u2'.'' This identifier must be different from the identifiers used for the {{{PALM}}} standard output (see list in description of parameter [../../d3par#data_output data_output]). The identifier must not contain more than '''20''' characters. To switch on output of this quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_user data_output_user], eg.: \\
     67This example shows the output of the quantity "square of the u-component" ('''Note:''' this quantity could of course easily be calculated from the u-component by postprocessing the PALM output so that calculation within PALM is not necessarily required). If more than one user-defined quantity shall be output, the following steps have to be carried out in the same way for each of the quantities.
     68
     69   1. For output of '''2d cross sections''' and '''3d volume data''', the quantity has to be given a unique string identifier, e.g.'' 'u2'.'' This identifier must be different from the identifiers used for the PALM standard output (see list in description of parameter [../../d3par#data_output data_output]). The identifier must not contain more than '''20''' characters. To switch on output of this quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_user data_output_user], eg.: \\
    7070
    7171   {{{ data_output_user = 'u2',  'u2_xy_av' }}}
     
    7373   The pure string'' 'u2' ''switches on the output of instantaneous 3d volume data. Output of cross section data and time averaged data is switched on by additionally appending the strings'' '_xy', '_xz', '_yz', ''and/or'' '_av' ''(for a detailed explanation see parameter [../../d3par#data_output data_output]).\\
    7474
    75    2. For output of '''masked data''', the quantity has to be given a unique string identifier, e.g.'' 'u2'.'' This identifier must be different from the identifiers used for the {{{PALM}}} standard output (see list in description of parameter [../../d3par#data_output_masks data_output_masks]). To switch on output of this quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_masks_user data_output_masks_user], eg.: \\
     75   2. For output of '''masked data''', the quantity has to be given a unique string identifier, e.g.'' 'u2'.'' This identifier must be different from the identifiers used for the PALM standard output (see list in description of parameter [../../d3par#data_output_masks data_output_masks]). To switch on output of this quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_masks_user data_output_masks_user], eg.: \\
    7676
    7777   {{{ data_output_masks_user(1,:) = 'u2', }}}
     
    9191      {{{ unit = 'm2/s2' }}} \\
    9292       
    93    Otherwise, {{{PALM}}} will abort. \\
     93   Otherwise, PALM will abort. \\
    9494
    9595   6. The vertical grid on which the quantity is defined (given by the levels '{{{zu}}}' or '{{{zw}}}', on which the u- or w-component of the velocity are defined) has to be specified for the netCDF output files in subroutine [../int#user_define_netcdf_grid user_define_netcdf_grid]:
     
    315315    B. From [#part_3 part 3. (user-defined 3d volume data)] steps 2, 3, 4, 5, and 6.
    316316       See the sample code (as comment lines) for'' 'u*v*' ''and {{{ustvst}}}, respectively. (Actual output of 3d volume data - step 1 - is not required.)
    317     C. The quantity has to be given a unique string identifier, e.g.'' 'u*v*'.'' This identifier must be different from the identifiers used for the {{{PALM}}} standard output (see list in description of package parameter [../../sppar#data_output_sp data_output_sp]). To switch on output of this quantity, the user has to assign the string identifier to the package parameter [../../sppar#data_output_sp data_output_sp], eg.:
     317    C. The quantity has to be given a unique string identifier, e.g.'' 'u*v*'.'' This identifier must be different from the identifiers used for the PALM standard output (see list in description of package parameter [../../sppar#data_output_sp data_output_sp]). To switch on output of this quantity, the user has to assign the string identifier to the package parameter [../../sppar#data_output_sp data_output_sp], eg.:
    318318        {{{ data_output_sp =  'u*v*' }}}
    319319   Item A. and item B. as prerequisites for C. require a naming convention of identical identifiers, e.g. [../../userpar#data_output_pr_user data_output_pr_user]='' 'u*v*','' [../../userpar#data_output_user data_output_user] ='' 'u*v*' ''and [../../sppar#data_output_sp data_output_sp]='' 'u*v*'.'' This naming convention applies only in case of user-defined spectra.