Changes between Version 18 and Version 19 of doc/app/userint/output
- Timestamp:
- Sep 15, 2010 3:22:23 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
doc/app/userint/output
v18 v19 3 3 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 or 3d volume data], 4. [#part_4 dvrp objects], and 5. [#part_5 spectra]. The respective subroutines contain sample code lines (written as comment lines) for defining, calculating and output of such quantities.\\\\ 4 4 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].\\\\ 5 The following five 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:\\ \\5 The following five 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:\\ 6 6 1. (horizontally averaged) [#part_1 vertical profiles], 7 7 2. [#part_2 time series], … … 10 10 5. [#part_5 spectra]. \\\\ 11 11 [=#part_1 '''1. Output of user-defined vertical profiles'''] \\\\ 12 This 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.\\ \\12 This 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.\\ 13 13 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]). To switch on output of this quantity, the user has to assign the string identifier to the parameter [../../userpar#data_output_pr_user data_output_pr_user], eg.:\\ 14 14 15 {{{data_output_pr_user = 'u*v*'}}}, \\ \\15 {{{data_output_pr_user = 'u*v*'}}}, \\ 16 16 17 17 2. For the quantity, an identification number, a physical unit, and the vertical grid on which it is defined (u- or w-grid), has to be assigned (subroutine [../int#user_check_data_output_pr user_check]\\ [../int#user_check_data_output_pr _data_output_pr]): \\\\ … … 36 36 {{{ENDDO}}} \\ 37 37 {{{ENDDO}}} \\ 38 {{{ENDDO}}} \\ \\38 {{{ENDDO}}} \\ 39 39 40 40 Once again, only those parts in red have to be adjusted by the user.\\ … … 48 48 {{{dots_unit(dots_num+1) =}}} '[[span(m/s,style=color: red)]]' \\ 49 49 {{{dots_label(dots_num+2) =}}} '[[span(abs_vmx,style=color: red)]]' \\ 50 {{{dots_unit(dots_num+2) =}}} '[[span(m/s,style=color: red)]]' \\ \\50 {{{dots_unit(dots_num+2) =}}} '[[span(m/s,style=color: red)]]' \\ 51 51 52 52 {{{dots_num_palm = dots_num}}} \\ … … 60 60 {{{ts_value(dots_num_palm+2,sr) = ABS( v_max )}}} \\ 61 61 62 [=#part_3 '''3. Output of user-defined 2d cross sections or 3d volume data'''] \\ \\62 [=#part_3 '''3. Output of user-defined 2d cross sections or 3d volume data'''] \\ 63 63 64 64 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 68 {{{data_output_user = 'u2', 'u2_xy_av' }}} \\ 69 69 70 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]).\\ \\70 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]).\\ 71 71 2. In order to store the quantities' grid point data within PALM, a 3d data array has to be declared in module [../int#user_module user]: \\ 72 72 73 73 {{{REAL, DIMENSION(:,:,:), ALLOCATABLE :: u2, u2_av }}} \\ 74 74 75 The second array {{{u2_av}}} is needed in case that output of time averaged data is requested. It is used to store the sum of the data of the respective time levels over which the average has to be carried out. \\ \\75 The second array {{{u2_av}}} is needed in case that output of time averaged data is requested. It is used to store the sum of the data of the respective time levels over which the average has to be carried out. \\ 76 76 3. The data array has to be allocated in subroutine [../int#user_init user_init]: \\ 77 77