Changes between Initial Version and Version 1 of PDAF_set_debug_flag


Ignore:
Timestamp:
Feb 19, 2023, 8:02:58 AM (14 months ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAF_set_debug_flag

    v1 v1  
     1= PDAF_set_debug_flag =
     2
     3This page documents the routine `PDAF_set_debug_flag` of PDAF. PDAF debugging outputs were introduced with PDAF version 2.1.
     4
     5The routine activates the debugging output of PDAF. It can be called, e.g. in `init_pdaf` for activate the debug output for the initialization, `assimilate_pdaf` to activate the debug output for the whole analysis, or in `init_dim_l_pdaf` to activate debug output for a single local analysis domain of a domain-localized filter (i.e. LESTKF/LETKF/LNETF/LSEIK/LKNETF).
     6
     7|| Detailed information on how to use and interpret the debugging output is provided in the [wiki:PDAF_debugging documention of the PDAF debugging information].||
     8
     9The interface is:
     10{{{
     11  SUBROUTINE PDAF_set_debug_flag(debugval)
     12
     13    INTEGER, INTENT(in) :: debugval          ! Value for debugging flag
     14                                             ! (0): deactivate debug output
     15                                             ! (>0): activate debug output
     16}}}
     17
     18'''Notes: '''
     19 * To enable syntax checking one can include the interface defintion from 'PDAF_interfaces_module'. For this one has to use-include the routine by
     20{{{
     21  USE PDAF_interfaces_module, only: PDAF_set_debug_flag
     22}}}
     23 * For the localized filters, we recommend to activate the debugging only for single local analysis domain. Thus one can select some value of `domain_p`, e.g. in `init_dim_l_pdaf` and then call `PDAF_set_debug_flag` using `debugval=domain_p`, thus
     24{{{
     25  IF (domain_p==MYDOMAIN) THEN
     26    CALL PDAF_set_debug_flag(domain_p)   ! Activate debug output
     27  ELSE
     28    CALL PDAF_set_debug_flag(0)          ! Deactivate debug output
     29  ENDIF
     30}}}
     31 * The debug output is active until one calls `PDAFomi_set_debug_flag(0)`.
     32 * With parallelization one can active the debug output for a single MPI task. When OpenMP-parallelization is used on can also activate the debug output for a single thread of OpenMP.
     33 * For the local filters, the debug output writes out the complete local state vectors. It can be useful to reduce the size of the local state vector during the debugging to shorten the outputs.
     34 * For the global filters only the first 6 elements of state vectors are shown in order to keep the outputs compact.
     35 * When implementing an application with PDAF it can be useful to activate the debug output in `init_pdaf` so that debug output from `PDAF_init` is shown. In particular one can see whether the input parameters or ensemble states have their correct values inside PDAF. If this is not the case, it might be that PDAF and the use code are compiled with different precision of the floating point (REAL) variables.