Changes between Version 90 and Version 91 of doc/app/userint/output


Ignore:
Timestamp:
Oct 17, 2019 6:59:19 AM (5 years ago)
Author:
Giersch
Comment:

--

Legend:

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

    v90 v91  
    4646== 2. Output of user-defined time series
    4747This example shows the output of two time series for the maxima of the absolute values of the horizontal velocities u and 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.\\\\
    48    1. For each time series quantity you have to give a label and a unit in subroutine [../int#user_init user_init] (user_check_data_output_ts for newer versions), which will be used for the netCDF file. They must not contain more than '''13''' characters. The value of {{{dots_num}}} has to be increased by the number of new time series quantities. Its old value has to be stored in {{{dots_num_palm}}}.
    49 
    50    {{{dots_label(dots_num+}}}[[span({{{1}}},style=color: red)]]{{{) =}}} '[[span({{{abs_umx}}},style=color: red)]]' \\
    51    {{{dots_unit(dots_num+}}}[[span({{{1}}},style=color: red)]]{{{) =}}} '[[span({{{m/s}}},style=color: red)]]' \\
    52    {{{dots_label(dots_num+}}}[[span({{{2}}},style=color: red)]]{{{) =}}} '[[span({{{abs_vmx}}},style=color: red)]]' \\
    53    {{{dots_unit(dots_num+}}}[[span({{{2}}},style=color: red)]]{{{) =}}} '[[span({{{m/s}}},style=color: red)]]' \\
     48   1. For each time series quantity you have to give a label and a unit in subroutine [../int#user_init user_init] (user_check_data_output_ts for newer versions), which will be used for the netCDF file. They must not contain more than '''13''' characters. The value of {{{dots_num}}} and {{{dots_num_user}}} have to be increased by the number of new time series quantities. The old value of {{{dots_num}}} has to be stored in {{{dots_num_palm}}}.
    5449
    5550   {{{dots_num_palm = dots_num}}} \\
    56    {{{dots_num = dots_num}}} [[span({{{+2}}},style=color: red)]] \\
    57 
     51
     52   {{{dots_num = dots_num + 1}}} \\
     53   {{{dots_num_user = dots_num_user + 1}}} \\
     54   {{{dots_label(dots_num) = 'abs_umax'}}}' \\
     55   {{{dots_unit(dots_num) = 'm/s'}}} \\
     56
     57   {{{dots_num = dots_num + 1}}} \\
     58   {{{dots_num_user = dots_num_user + 1}}} \\
     59   {{{dots_label(dots_num) = 'abs_vmax'}}} \\
     60   {{{dots_unit(dots_num) = 'm/s'}}} \\
    5861
    5962   2. These quantities are calculated and output in subroutine [../int#user_statistics user_statistics] for every statistic region {{{sr}}} defined by the user, but at least for the region "total domain":
    6063
    61    {{{ ts_value(dots_num_palm+1,sr) = ABS( u_max ) }}} \\
    62    {{{ ts_value(dots_num_palm+2,sr) = ABS( v_max ) }}} \\\\
     64   {{{ ts_value_l(1) = ABS( u_max ) }}} \\
     65   {{{ ts_value_l(2) = ABS( v_max ) }}} \\
     66
     67Subsequently, collect / send values to PE0, because only PE0 outputs the time series. However, collection is done by taking the sum over all processors. You may have to normalize this sum, depending on the quantity that you like to calculate. For serial runs, nothing has to be done:
     68
     69{{{#if defined( __parallel )}}}
     70       {{{IF ( collective_wait )  CALL MPI_BARRIER( comm2d, ierr )}}}\\
     71       {{{CALL MPI_ALLREDUCE( ts_value_l(1),                            &}}}\\
     72                           {{{ts_value(dots_num_palm+1,sr),             &}}}\\
     73                           {{{dots_num_user, MPI_REAL, MPI_MAX, comm2d, &}}}\\
     74                           {{{ierr )}}}
     75{{{#else}}}\\
     76       {{{ts_value(dots_num_palm+1:dots_num_palm+dots_num_user,sr) = ts_value_l}}}\\
     77{{{#endif}}}\\
    6378
    6479