Changes between Version 1 and Version 2 of PDAF_debugging_PDAF3
- Timestamp:
- Jun 10, 2025, 9:34:59 AM (7 days ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PDAF_debugging_PDAF3
v1 v2 7 7 The PDAF debugging output functionality was added with PDAF V2.1. 8 8 9 When implementing PDAF with your model or adding functionality like extending the state vector or adding support for new observations, it ca b useful to check whether the inputs to the PDAF routines are correctly used inside PDAF. For this purpose, PDAF provides a debugging functionality. It allows you to activate debug output e.g.for a single local analysis domain on a single process of a complex application of a local filter like LESTKF.9 When implementing PDAF with your model or adding functionality like extending the state vector or adding support for new observations, it can useful to check whether the inputs to the PDAF routines are correctly used inside PDAF. For this purpose, PDAF provides a debugging functionality. It allows you to activate debug output, for example, for a single local analysis domain on a single process of a complex application of a local filter like LESTKF. 10 10 11 11 Usually, issues arise inside the user-supplied call-back routines or inside PDAF caused by the values that are provided by the user-supplied call-back routines. Thus, a particular aim of the PDAF debug output is to show values of arrays inside PDAF that depend on operations performed inside the user-supplied call-back routines. 12 12 13 **Note on PDAF-OMI**: When you use PDAF-OMI for the observation handling, there is a separate debug functionality for the observation part. For details see the [wiki:OMI_debugging documentation on PDAF-OMI debuggging]. One can activate the debugging for PDAF and PDAF-OMI separately or can used both in combination. 13 || **Note on PDAF-OMI**: When you use PDAF-OMI for the observation handling, there is a separate debug functionality for the observation part. For details see the [wiki:OMI_debugging_PDAF3 documentation on PDAF-OMI debuggging]. One can activate the debugging for PDAF and PDAF-OMI separately or can used both in combination. || 14 14 15 15 … … 48 48 }}} 49 49 50 For the debugging it is useful to keep the amount of output low. In particular for a large number of observations, a large ensemble or a large local state vector, the output will be very lengthy. To this end, it can be useful to intentionally reduce the size of the local state vector, number of observatios, or the ensemble size for the debugging. For the localized filters it is recommended to only activate the debugging for a single local analysis domain as shown above. The particular domain index can be chosen e.g. based on the coordinates of the domain, which are usually determined in `init_dim_l_pdaf`. Thus, if one encounters an issue in the analysis step for some coordinates one can find the corresponding coordinates in `init_dim_l_pdaf` and subsequently use `PDAF_set_debug_flag` to activate the debug output for this location.51 52 '''For the domain-local filters''', vectors like the local state vector are shown with their full length. Likewise vector or matrices whose dimension is the ensemble size are shown with their full length.50 For the debugging, it is useful to keep the amount of output low. In particular for a large number of observations, a large ensemble or a large local state vector, the output will be very lengthy. To this end, it can be useful to intentionally reduce the size of the local state vector, number of observations, or the ensemble size for the debugging. For the localized filters it is recommended to only activate the debugging for a single local analysis domain as shown above. The particular domain index can be chosen e.g. based on the coordinates of the domain, which are usually determined in `init_dim_l_pdaf`. Thus, if one encounters an issue in the analysis step for some coordinates one can find the corresponding coordinates in `init_dim_l_pdaf` and subsequently use `PDAF_set_debug_flag` to activate the debug output for this location. 51 52 '''For the domain-local filters''', vectors like the local state vector are shown with their full length. Likewise, vector or matrices whose dimension is the ensemble size are shown with their full length. 53 53 54 54 '''For the global filters''', the state vector or the innovation can have a high dimension. To keep the debug output limited, the outputs of the global filters and the 3D-Var methods are generally limited to the first 6 elements of vectors that have the size of the state vector (like single ensemble states) or the size of the observation vector (like the innovation). Only vectors or matrices whose dimension is the ensemble size are shown with their full length. … … 59 59 The debug output prints information on configuration parameter values inside PDAF, dimensions and the values of actual arrays inside PDAF. Here, it depends for which routine or part of a data assimilation method the debugging is activated. We discuss a few options here for ensemble filters based on output obtain when activating debug output in the case `/tutorial/offline_2D_serial`. In addition, we discuss the debug output obtained for 3D-Var based on output obtain when activating debug output in the case `/tutorial/3dvar/offline_2D_serial`. WE discuss the debug output for an implementation using PDAF-OMI. However, its use is analogous for the case of the implementation not using PDAF-OMI. 60 60 61 Generally all debug output lines start with `PDAF-debug`, thus one can use `grep PDAF-debug` when running the data assimilation or on a text file containing the output to see only the debug output. Each line also shows the name of the PDAF routine from which the debug output is written.61 Generally, all debug output lines start with `PDAF-debug`, thus one can use `grep PDAF-debug` when running the data assimilation or on a text file containing the output to see only the debug output. Each line also shows the name of the PDAF routine from which the debug output is written. 62 62 63 63 Here we discuss some aspects of the debug output from different typical cases: 64 - [ wiki:PDAF_debugging#DebugoutputfromPDAF_init Debug output from PDAF_init]65 - [ wiki:PDAF_debugging#Debugoutputforglobalensemblefilters Debug output from for global ensemble filters]66 - [ wiki:PDAF_debugging#Debugoutputforlocalensemblefilters Debug output from for local ensemble filters]67 - [ wiki:PDAF_debugging#Debugoutputfor3D-Var Debug output for 3D-Var]64 - [#DebugoutputfromPDAF_init Debug output from PDAF_init] 65 - [#Debugoutputforglobalensemblefilters Debug output from for global ensemble filters] 66 - [#Debugoutputforlocalensemblefilters Debug output from for local ensemble filters] 67 - [#Debugoutputfor3D-Var Debug output for 3D-Var] 68 68 69 69 === Debug output from `PDAF_init` ===