wiki:PDAF_set_debug_flag

Version 2 (modified by lnerger, 14 months ago) (diff)

--

PDAF_set_debug_flag

This page documents the routine PDAF_set_debug_flag of PDAF. PDAF debug outputs were introduced with PDAF version 2.1.

The 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).

Detailed information on how to use and interpret the debugging output is provided in the documention of the PDAF debugging information.

The interface is:

  SUBROUTINE PDAF_set_debug_flag(debugval)

    INTEGER, INTENT(in) :: debugval          ! Value for debugging flag
                                             ! (0): deactivate debug output
                                             ! (>0): activate debug output

Notes:

  • To enable syntax checking one can include the interface defintion from 'PDAF_interfaces_module'. For this one has to use-include the routine by
      USE PDAF_interfaces_module, only: PDAF_set_debug_flag
    
  • 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
      IF (domain_p==MYDOMAIN) THEN
        CALL PDAF_set_debug_flag(domain_p)   ! Activate debug output
      ELSE
        CALL PDAF_set_debug_flag(0)          ! Deactivate debug output
      ENDIF
    
  • The debug output is active until one calls PDAFomi_set_debug_flag(0).
  • 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.
  • 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.
  • For the global filters only the first 6 elements of state vectors are shown in order to keep the outputs compact.
  • 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.