= PDAF_localfilter = This page documents the function `PDAF_get_localfilter` of PDAF, which are introduced with PDAF 3.0. The function is an altenative to the routine [wiki:PDAF_get_localfilter]. The function returns the information whether the chosen filter is a domain-localized filter (LESTKF, LETKF, LSEIK, LNETF). It can be called in assimilate_pdaf.F90 to control whether to call either PDAF3_assimilate_global or PDAF3_assimilate_local (or PDAF3_put_state_global or PDAF3_put_state_local). The routine is typically called in the model code in assimilate_pdaf. The function can only be used if PDAF was initialized before by a call to `PDAF_init`. The interface is the following: {{{ INTEGER FUNCTION PDAF_localfilter() }}} without arguments. The return value is * 0: global filter * 1: local filter The return value can be directly used, e.g. as {{{ IF (PDAF_localfilter() == 1) THEN CALL PDAF3_assimilate_local(...) ELSE CALL PDAF3_assimilate_global(...) ENDIF }}} **Notes:** * The difference between the return values 0 and 1 is mainly the way how PDAF-OMI handles observations. * For the ENSRF/EAKF, PDAF_localfilter() also returns the value 1. This is because the observation handling for the ENSRF/EAKF uses the same approach as for domain-localized filters