| 1 | = PDAF_localfilter = |
| 2 | |
| 3 | This page documents the function `PDAF_get_localfilter` of PDAF, which are introduced with PDAF 3.0. |
| 4 | |
| 5 | The function is an altenative to the routine [wiki:PDAF_get_localfilter]. |
| 6 | |
| 7 | 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). |
| 8 | |
| 9 | 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`. |
| 10 | |
| 11 | The interface is the following: |
| 12 | {{{ |
| 13 | INTEGER FUNCTION PDAF_localfilter() |
| 14 | }}} |
| 15 | without arguments. The return value is |
| 16 | * 0: global filter |
| 17 | * 1: local filter |
| 18 | |
| 19 | The return value can be directly used, e.g. as |
| 20 | {{{ |
| 21 | IF (PDAF_localfilter() == 1) THEN |
| 22 | CALL PDAF3_assimilate_local(...) |
| 23 | ELSE |
| 24 | CALL PDAF3_assimilate_global(...) |
| 25 | ENDIF |
| 26 | }}} |
| 27 | |
| 28 | **Notes:** |
| 29 | * The difference between the return values 0 and 1 is mainly the way how PDAF-OMI handles observations. |
| 30 | * 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 |