Changes between Version 8 and Version 9 of doc/app/userint/output


Ignore:
Timestamp:
Sep 15, 2010 1:27:24 PM (14 years ago)
Author:
suehring
Comment:

--

Legend:

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

    v8 v9  
    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.:
    14 {{{
    15 data_output_pr_user = 'u*v*',
    16 }}}
     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{{{data_output_pr_user = 'u*v*'}}}, \\\\
     15
    1716   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]): \\\\
    18 {{{
    19 CASE ( 'u*v*' )
    20    index = pr_palm + 1                                             ! identification number
    21    dopr_index(var_count) = index
    22    dopr_unit(var_count)  = 'm2/s2'                                 ! physical unit
    23    hom(:,2,index,:)      = SPREAD( zu, 2, statistic_regions+1 )    ! vertical grid
    24 }}}
     17   {{{CASE ( 'u*v*' )}}} \\
     18       {{{index = pr_palm +}}} [[span(1 ,style=color: red)]]                                            {{{! identification number}}} \\
     19       {{{dopr_index(var_count) = index}}} \\
     20       {{{dopr_unit(var_count)  =}}} '[[span(m2s2,style=color: red)]]'                                  {{{! physical unit}}} \\
     21       {{{hom(:,2,index,:)      = SPREAD(}}} [[span(zu,style=color: red)]]{{{, 2, statistic_regions+1 )    ! vertical grid }}}
    2522
    2623   Here only the those parts in [[span(red ,style=color: red)]] color have to be given by the user appropriately.\\
    2724   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).
    2825
    29    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
    42 }}}
     26   3. The quantity has to be calculated for all gridpoints (subroutine user_statistics): \\\\
     27   {{{!$OMP DO}}}
     28      {{{DO  i = nxl, nxr}}}
     29         {{{DO  j = nys, nyn}}}
     30            {{{DO  k = nzb_s_inner(j,i)+1, nzt}}} 
     31               {{{sums_l(k,pr_palm+1,tn) = sums_l(k,pr_palm+1,tn) +}}}              {{{             & }}}
     32                      [[span(({{{0.5*(u(k,j,i)+u(k,j,i+1))-hom(k,1,1,sr))*&}}},style=color: red)]]   \\
     33                      [[span(({{{0.5*(v(k,j,i)+v(k,j+1,i))-hom(k,1,2,sr))   &}}},style=color: red)]]   \\
     34                      {{{* rmask(j,i,sr)}}} 
     35            {{{ENDDO}}} \\
     36         {{{ENDDO}}}  \\
     37      {{{ENDDO}}} \\\\
     38
    4339   Once again, only those parts in red have to be adjusted by the user.\\
    4440   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.