146 | | |
| 146 | In this routine user actions can be implemented which are to be executed either at each time step or at certain times (defined by the user). Since in each case the routine is called at the beginning and at the end of a time step as well as after each prognostic equation it must be defined at which place (and/or at which places) the respective actions are supposed to be executed. For this purpose an appropriate CASE structure is already inserted in this routine. The location of the calling routine is passed to this routine via the argument {{{location}}}. For example, if called at the beginning of a time step, {{{location}}} ='' 'before_timestep' ''and if called at the end, {{{location}}} ='' 'after_timestep'.''\\ |
| 147 | Calculation of user-defined output quantities should be carried out at {{{location}}} ='' 'after_integration'.''\\\\ |
| 148 | '''Important:''' if the cache-optimized version of prognostic_equation.f90 is used (this is the default for IBM-Regatta-Systems), the loop variables i and j must be passed as arguments for all calls within {{{prognostic_equations}}}.\\\\ |
| 149 | CPU time for user_actions appears within the category "user_actions" in the local file [../../iofiles#CPU_MEASURES CPU_MEASURES]. If the cache-optimized version of {{{prognostic_equation.f90}}} is used, this time measurement only considers the CPU time which was needed outside of the prognostic equations. Time needed for calls within prognostic_equations is considered within the category "all prog.equations".\\\\ |
| 150 | Important: this subroutine is written as a {{{FORTRAN}}} module, which uses so-called function overloading. It can be called in two ways: with one argument ({{{location}}}) and with three arguments {{{(i, j, location)}}}. The three argument version is used in the cache-optimized version of {{{prognostic_equations}}}. Depending on the number of given arguments the subroutine internally calls {{{user_actions}}} or {{{user_actions_ij}}}. So the user must insert the actions (code extensions) desired for the respective prognostic equation either in the {{{CASE}}} structure of {{{user_actions}}}, or/and in the {{{CASE}}} structure of {{{user_actions_ij}}}! |