Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
52b085a
Backward-compatible OMI implementation
s7yoewer Oct 24, 2025
e8ef120
fortitude changes
jjokella Oct 24, 2025
27c22a3
README: PDAF-OMI
jjokella Oct 24, 2025
85a3b04
compilation fixes
jjokella Oct 27, 2025
25a29c7
compilation fix
jjokella Oct 27, 2025
3e40344
Makefile: distinguish OMI-modules and OMI-subroutines
jjokella Oct 27, 2025
2b1392e
use `da_interval` from `mod_tsmp`
jjokella Oct 27, 2025
8ca7b03
fix missing use statements
jjokella Oct 27, 2025
b84fdc3
fix use statements in OMI modules
jjokella Oct 27, 2025
5739180
docs: add PDAF-OMI information to manual
jjokella Oct 27, 2025
ad94003
ensure backward compatibility with CLM3.5
jjokella Oct 27, 2025
0baac7a
fortitude: line breaks
jjokella Oct 28, 2025
e87944c
Slight adaptions for facilitating merge
jjokella Oct 28, 2025
ad2c191
Merge branch 'heads/PDAF_V2.3' into tsmp-pdaf-patched-v2.3
jjokella Oct 29, 2025
c1a4808
cmake.h: Read `MODULEOPT` from CMake input
jjokella Oct 29, 2025
a1ed2e3
da_interval variable name patch by Yorck
jjokella Oct 29, 2025
a1a11fc
compilation fix
jjokella Oct 31, 2025
9229668
Author additions and bugfix in mod_read_obs (#35)
s7yoewer Nov 4, 2025
1b2ee21
bugfix, type mismatch from huge-function
jjokella Nov 4, 2025
802721f
Merge branch 'tsmp-pdaf-patched' into tsmp-pdaf-patched-omi
jjokella Dec 11, 2025
edd474c
Adapt da_interval implementation
Dec 16, 2025
9126b3a
Changing size of PDAF internal allocated arrays (state vector size) f…
Dec 16, 2025
9d56fc5
Update to PDAF2.3
Dec 16, 2025
66655f7
Add full observation error covariance matrix for PDAF-OMI
Dec 16, 2025
48dae52
Merge branch 'tsmp-pdaf-patched' into tsmp-pdaf-patched-v2.3
jjokella Dec 17, 2025
8ec37a6
Merge branch 'tsmp-pdaf-patched-v2.3' into tsmp-pdaf-patched-omi-v2.3
jjokella Dec 17, 2025
2471de7
Merge branch 'tsmp-pdaf-patched' into tsmp-pdaf-patched-v2.3
jjokella Dec 17, 2025
cba72fc
Merge branch 'tsmp-pdaf-patched-v2.3' into tsmp-pdaf-patched-omi-v2.3
jjokella Dec 17, 2025
e47b89f
Merge branch 'tsmp-pdaf-patched' into tsmp-pdaf-patched-omi
jjokella Dec 17, 2025
2408708
Merge branch 'tsmp-pdaf-patched-omi' into tsmp-pdaf-patched-omi-v2.3
jjokella Dec 17, 2025
1fcb808
Merge branch 'tsmp-pdaf-patched-omi' into tsmp-pdaf-patched-da-enhanc…
jjokella Dec 17, 2025
e0ed4cc
remove unnecessary files
jjokella Dec 17, 2025
7615916
test: remove additional object file
jjokella Dec 17, 2025
c80f2e9
Add reading of observation error covariance matrix
Dec 17, 2025
d987034
Merge branch 'tsmp-pdaf-patched-da-enhancements' of https://github.co…
Dec 17, 2025
641fd5f
Merge branch 'tsmp-pdaf-patched' into tsmp-pdaf-patched-omi
jjokella Dec 19, 2025
789ad1c
Merge branch 'tsmp-pdaf-patched-da-enhancements-yorck' into tsmp-pdaf…
jjokella Dec 19, 2025
c15c97b
interface/model/Makefile: use existing BASEDIR
jjokella Dec 19, 2025
6c3161c
Add PDAF_reset_dim_p to PDAF_interfaces_modules
jjokella Dec 19, 2025
5947463
interface/framework/Makefile: switch order of $(LIBMODEL) / -lpdaf-d
jjokella Dec 19, 2025
1042c40
interface/framework/Makefile: use linker group
jjokella Dec 19, 2025
8dcdef7
Makefile: add PDAF_reset_dim_p.F90 to sources
jjokella Dec 19, 2025
fdc98c1
interface/framework/Makefile: order currently enough
jjokella Dec 19, 2025
baf3f22
Merge pull request #43 from s7yoewer/tsmp-pdaf-patched-da-enhancements
jjokella Dec 19, 2025
4b1f1a2
fortitude changes
jjokella Dec 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CONTRIBUTORS.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ Wolfgang Kurtz
Stefan Poll
Mukund Pondkule
Prabhakar Shrestha
Anne Springer
Lukas Strebel

3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,8 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \
PDAFlocalomi_put_state_nondiagR.F90 \
PDAFlocalomi_put_state_nondiagR_si.F90 \
PDAFlocalomi_put_state_si.F90 \
PDAF_correlation_function.F90
PDAF_correlation_function.F90 \
PDAF_reset_dim_p.F90

# Specific PDAF-routines for SEIK
SRC_SEIK = PDAF_seik_init.F90 \
Expand Down
1 change: 1 addition & 0 deletions docs/_toc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ parts:
- file: users_guide/running_tsmp_pdaf/input_cmd
- file: users_guide/running_tsmp_pdaf/input_obs
- file: users_guide/running_tsmp_pdaf/input_enkfpf
- file: users_guide/running_tsmp_pdaf/tsmp_pdaf_omi

- file: users_guide/debugging_tsmp_pdaf/README
title: Debugging TSMP-PDAF
Expand Down
9 changes: 9 additions & 0 deletions docs/users_guide/running_tsmp_pdaf/input_cmd.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ Details: <https://pdaf.awi.de/trac/wiki/WhichFiltertouse>
`subtype` (integer) Parameter subtype, different options for each
filter. See [](cmd:command-line-examples).

## use_omi ##

`use_omi` (logical) Controls whether to use OMI interface.

- `.true.`: OMI interface is used
- `.false.`: OMI interface is not used

See [](omi:tsmp-pdaf-with-pdaf-omi).

## obs_filename ##

`obs_filename` (string) Prefix for observation files.
Expand Down
14 changes: 14 additions & 0 deletions docs/users_guide/running_tsmp_pdaf/tsmp_pdaf_omi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
(omi:tsmp-pdaf-with-pdaf-omi)=
# TSMP-PDAF with PDAF-OMI

PDAF-OMI for multivariate data assimiliaton.
It is design to handle different observation types (currently soil moisture and TWS) automatically.
Additional to current observation files, the observation type has to be included (SM, GRACE).

See also create observation script for details: https://icg4geo.icg.kfa-juelich.de/ExternalRepos/tsmp-pdaf/tsmp-pdaf-observation-scripts/-/tree/main/omi_obs_data?ref_type=heads

Both global and local filters can be used. To enable multi-scale data assimilation, different localization radii for different observation types can be passed. Note that the localization radius for SM is currently in km and for GRACE in #gridcells.

The framework generates a state vector for each type individually before the assimilation, some things would need to be adapted when mutliple observation types are assimilated at the same timestep. Currently, one observation file only consists of one observation type. As SM observations are usually assimilated at noon and GRACE observations are assimilated at the end of the month at midnight, this should not provide any problems.

If questions arise contact ewerdwalbesloh@geod.uni-bonn.de
17 changes: 13 additions & 4 deletions interface/framework/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -75,10 +75,17 @@ MOD_ASSIM = mod_parallel_pdaf.o \
parser_mpi.o \
mod_read_obs.o

# Routines of observation handling (PDAF-OMI)
MOD_USER_PDAFOMI = obs_GRACE_pdafomi.o \
obs_SM_pdafomi.o

# Model routines used with PDAF
OBJ_MODEL_PDAF =pdaf_terrsysmp.o\
integrate_pdaf.o

# Routines of observation handling (PDAF-OMI)
OBJ_USER_PDAFOMI = callback_obs_pdafomi.o

# Interface to PDAF - model sided
OBJ_PDAF_INT = init_parallel_pdaf.o \
finalize_pdaf.o \
Expand Down Expand Up @@ -121,7 +128,7 @@ OBJ_USER_LOCAL = init_n_domains_pdaf.o \
localize_covar_pdaf.o

# Full list of user-supplied routines for online modes
OBJ_PDAF_USER = $(OBJ_USER_GEN) $(OBJ_USER_SEIK) $(OBJ_USER_ENKF) $(OBJ_USER_LOCAL)
OBJ_PDAF_USER = $(OBJ_USER_GEN) $(OBJ_USER_SEIK) $(OBJ_USER_ENKF) $(OBJ_USER_LOCAL) $(OBJ_USER_PDAFOMI)

######################################################

Expand All @@ -143,10 +150,12 @@ info:


$(PROG) : $(LIBMODEL) libpdaf-d.a \
$(MODULES) $(MOD_ASSIM) $(OBJ_MODEL_PDAF) $(OBJ_PDAF_INT) $(OBJ_PDAF_USER)
$(MODULES) $(MOD_ASSIM) $(MOD_USER_PDAFOMI) \
$(OBJ_MODEL_PDAF) $(OBJ_PDAF_INT) $(OBJ_PDAF_USER)
$(PREP_C) $(LD) $(OPT_LNK) -o $@ \
$(MODULES) $(MOD_ASSIM) $(OBJ_MODEL_PDAF) $(OBJ_PDAF_INT) $(OBJ_PDAF_USER) \
-L$(BASEDIR)/lib -lpdaf-d $(LIBMODEL) $(LIBS) $(LINK_LIBS)
$(MODULES) $(MOD_ASSIM) $(MOD_USER_PDAFOMI) \
$(OBJ_MODEL_PDAF) $(OBJ_PDAF_INT) $(OBJ_PDAF_USER) \
-L$(BASEDIR)/lib $(LIBMODEL) -lpdaf-d $(LIBS) $(LINK_LIBS)

######################################################

Expand Down
62 changes: 61 additions & 1 deletion interface/framework/assimilate_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,14 @@ SUBROUTINE assimilate_pdaf()
ONLY: abort_parallel, mype_world
USE mod_assimilation, & ! Variables for assimilation
ONLY: filtertype
! USE PDAF_interfaces_module ! Check consistency of PDAF calls
USE mod_assimilation, ONLY: use_omi
#ifdef CLMFIVE
USE PDAF_interfaces_module, & ! Check consistency of PDAF calls
ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, &
PDAFomi_assimilate_lenkf, PDAF_get_localfilter, &
PDAFomi_assimilate_enkf_nondiagR, &
PDAFomi_assimilate_global_nondiagR, PDAFomi_assimilate_local_nondiagR
#endif

IMPLICIT NONE

Expand All @@ -57,6 +64,7 @@ SUBROUTINE assimilate_pdaf()

! Local variables
INTEGER :: status_pdaf ! PDAF status flag
INTEGER :: localfilter ! Flag for domain-localized filter (1=true)


! ! External subroutines
Expand Down Expand Up @@ -102,6 +110,19 @@ SUBROUTINE assimilate_pdaf()
! EXTERNAL :: likelihood_hyb_l_pdaf, & ! Compute local likelihood awith hybrid weight for an ensemble member
! prodRinvA_hyb_l_pdaf ! Provide product R^-1 A for some matrix A including hybrid weight

! Interface to PDAF-OMI for local and global filters
EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain
obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain
init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain
localize_covar_pdafomi, & ! Apply localization to covariance matrix in LEnKF
add_obs_err_pdafomi, & ! Add obs. error covariance R to HPH in EnKF
init_obscovar_pdafomi, & ! Initialize obs error covar R in EnKF
prodRinvA_pdafomi, & ! Provide product R^-1 A for some matrix A
prodRinvA_l_pdafomi ! Provide product R^-1 A for some local matrix A




! *** Switch on debug output ***
! *** for main process ***
#ifdef PDAF_DEBUG
Expand All @@ -112,6 +133,43 @@ SUBROUTINE assimilate_pdaf()
! *** Call assimilation routine ***
! *********************************

OMI: IF (use_omi) THEN
#ifdef CLMFIVE
CALL PDAF_get_localfilter(localfilter)

IF (localfilter == 1) THEN

CALL PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, &
init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_ens_pdaf, init_n_domains_pdaf, &
init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, g2l_state_pdaf, &
l2g_state_pdaf, next_observation_pdaf, status_pdaf)


ELSE

IF (filtertype == 8) THEN
! LEnKF has its own OMI interface routine
CALL PDAFomi_assimilate_lenkf(collect_state_pdaf, distribute_state_pdaf, &
init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_ens_pdaf, &
localize_covar_pdafomi, next_observation_pdaf, status_pdaf)

ELSEIF (filtertype == 2) then ! non diagonal R for EnKF has its own callback routine
CALL PDAFomi_assimilate_enkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, &
init_dim_obs_pdafomi, obs_op_pdafomi, add_obs_err_pdafomi, init_obscovar_pdafomi, &
prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf)

ELSE

CALL PDAFomi_assimilate_global_nondiagR(collect_state_pdaf, distribute_state_pdaf, &
init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, &
prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf)

ENDIF

ENDIF
#endif
ELSE OMI

! IF (filtertype == 1) THEN
! CALL PDAF_assimilate_seik(collect_state_pdaf, distribute_state_pdaf, &
! init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, &
Expand Down Expand Up @@ -182,6 +240,8 @@ SUBROUTINE assimilate_pdaf()
! likelihood_pdaf, next_observation_pdaf, status_pdaf)
END IF

END IF OMI

! Check for errors during execution of PDAF

IF (status_pdaf /= 0) THEN
Expand Down
Loading