Changes between Version 6 and Version 7 of doc/app/userint/output


Ignore:
Timestamp:
Sep 15, 2010 12:34:32 PM (14 years ago)
Author:
suehring
Comment:

--

Legend:

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

    v6 v7  
    1111[=#part_1 '''1. Output of user-defined vertical profiles'''] \\\\
    1212This 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    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.:
     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.:
    1414{{{
    1515data_output_pr_user = 'u*v*',
    1616}}}
    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]):
     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]): \\\\
    1818{{{
    1919CASE ( 'u*v*' )
    20    index = pr_palm + [[span(1 ,style=color: red)]]                 ! identification number
     20   index = pr_palm + 1                                             ! identification number
    2121   dopr_index(var_count) = index
    22    dopr_unit(var_count)  = '[[span(m2s2 ,style=color: red)]]'     ! physical unit
    23    hom(:,2,index,:)      = SPREAD( [[span(zu ,style=color: red)]], 2, statistic_regions+1 )    ! vertical grid
     22   dopr_unit(var_count)  = 'm2/s2'                                 ! physical unit
     23   hom(:,2,index,:)      = SPREAD( zu, 2, statistic_regions+1 )    ! vertical grid
    2424}}}
    25       Here only the those parts in [[span(red ,style=color: blue)]] color have to be given by the user appropriately.
    26       The identification number (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).
     25
     26   Here only the those parts in [[span(red ,style=color: red)]] color have to be given by the user appropriately.\\
     27   The identification number (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).
    2728
    2829   3. The quantity has to be calculated for all gridpoints (subroutine user_statistics):
     30{{{
     31!$OMP DO
     32   DO  i = nxl, nxr
     33      DO  j = nys, nyn
     34         DO  k = nzb_s_inner(j,i)+1, nzt
     35            sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) +           &
     36                   ( 0.5 * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,sr) ) * &
     37                   ( 0.5 * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,sr) )   &
     38                   * rmask(j,i,sr)
     39         ENDDO
     40      ENDDO
     41   ENDDO
    2942
    30           !$OMP DO
    31           DO  i = nxl, nxr
    32              DO  j = nys, nyn
    33                 DO  k = nzb_s_inner(j,i)+1, nzt
    34                    sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) +           &
    35                          ( 0.5 * ( u(k,j,i) + u(k,j,i+1) ) - hom(k,1,1,sr) ) * &
    36                          ( 0.5 * ( v(k,j,i) + v(k,j+1,i) ) - hom(k,1,2,sr) )   &
    37                                                     * rmask(j,i,sr)
    38                 ENDDO
    39              ENDDO
    40           ENDDO
    41 
    42       Once again, only those parts in red have to be adjusted by the user.
    43       The turbulent resolved-scale momentum flux u*v* is defined as the product of the deviations of the horizontal velocities from their respective horizontally averaged mean values. These mean values are stored in array hom(..,1,1,sr) and hom(..,1,2,sr) for the u- and v-component, respectively. Since due to the staggered grid, u and v are not defined at the same gridpoints, they have to be interpolated appropriately (here to the center of the gridbox). The result of the calculation is stored in array sums_l. The second index of this array is the identification number of the profile which must match the one given in the previous step 2.
     43   Once again, only those parts in red have to be adjusted by the user.\\
     44   The turbulent resolved-scale momentum flux ''u*v*'' is defined as the product of the deviations of the horizontal velocities from their respective horizontally averaged mean values. These mean values are stored in array {{{hom(..,1,1,sr)}}} and {{{hom(..,1,2,sr)}}} for the u- and v-component, respectively. Since due to the staggered grid, u and v are not defined at the same gridpoints, they have to be interpolated appropriately (here to the center of the gridbox). The result of the calculation is stored in array {{{sums_l}}}. The second index of this array is the identification number of the profile which must match the one given in the previous step 2.