Skip to content

Commit

Permalink
Revise obs space localization for LETKF (#477)
Browse files Browse the repository at this point in the history
* revise obs space localization for LETKF

* use all ob system

* this was missing

* works but ...

* Help with PR477 (#479)

* ...

* Add to localensembleda-tier1.yaml
    local_ensemble_save_posterior_ensemble: false
    local_ensemble_save_posterior_ensemble_increments: false
    local_ensemble_save_posterior_mean: false
    local_ensemble_save_posterior_mean_increment: true
output jedi_localensembleda_config.yaml shows right.

* In run_jedi_local_ensemble_da_executable.py, hard code if bypass_writing_hofxs:  del [obs space][obsdataout]

* update default for save_posterior_ensemble

* add back lienar_observer: true

---------

Co-authored-by: Yonggang Yu <[email protected]>
Co-authored-by: Yonggang Yu <[email protected]>
  • Loading branch information
3 people authored Dec 20, 2024
1 parent 1033bda commit ac67008
Show file tree
Hide file tree
Showing 38 changed files with 53 additions and 40 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
'configuration/*/*/*',
'configuration/*/*/*/*',
'configuration/*/*/*/*/*',
'configuration/*/*/*/*/*/*',
'utilities/pinned_versions/*.yaml'
],
},
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
obs localizations:
localization method: Horizontal Gaspari-Cohn
lengthscale: 1000.e3
lengthscale: 500.e3
max nobs: 100
14 changes: 11 additions & 3 deletions src/swell/tasks/run_jedi_local_ensemble_da_executable.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,10 +129,10 @@ def execute(self) -> None:
# Prevent both 'local_ensemble_save_posterior_mean' and
# 'local_ensemble_save_posterior_ensemble' from being true
# --------------------------------------------------------
if not self.config.local_ensemble_save_posterior_mean() ^ \
if self.config.local_ensemble_save_posterior_mean() or \
self.config.local_ensemble_save_posterior_ensemble():
raise ValueError("Only one of 'local_ensemble_save_posterior_mean' and\
'local_ensemble_save_posterior_ensemble' may be true at once!")
raise ValueError("'local_ensemble_save_posterior_mean' and\
'local_ensemble_save_posterior_ensemble' cannot be both true!")

# Jedi configuration file
# -----------------------
Expand Down Expand Up @@ -186,6 +186,14 @@ def execute(self) -> None:
observer['obs space'].update(
{'distribution': {'name': 'Halo', 'halo size': 5000.e3}})

# bypass the writing of HofXs
# -------------------------------------------------------------------

bypass_HofXs = True
if bypass_HofXs:
for observer in jedi_config_dict['observations']['observers']:
del observer['obs space']['obsdataout']

# Write the expanded dictionary to YAML file
# ------------------------------------------
with open(jedi_config_file, 'w') as jedi_config_file_open:
Expand Down
2 changes: 1 addition & 1 deletion src/swell/tasks/task_questions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ local_ensemble_inflation_rtps:

local_ensemble_save_posterior_ensemble:
ask_question: false
default_value: true
default_value: false
models:
- geos_atmosphere
options:
Expand Down
8 changes: 6 additions & 2 deletions src/swell/test/suite_tests/localensembleda-tier1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,16 @@ models:
skip_ensemble_hofx: true
local_ensemble_solver: GETKF
local_ensemble_use_linear_observer: true
local_ensemble_save_posterior_mean: false
local_ensemble_save_posterior_ensemble_increments: true
ensmean_only: false
local_ensemble_save_posterior_mean: false # default: false
local_ensemble_save_posterior_mean_increment: true # default: true
local_ensemble_save_posterior_ensemble: false # default: false
local_ensemble_save_posterior_ensemble_increments: false # default: false
path_to_ensemble: /discover/nobackup/projects/gmao/advda/SwellTestData/letk/ensemble/91/Y%Y/M%m/D%d/H%H/geos*%Y%m%d_%H%M%Sz.nc4
observations:
- aircraft
- sondes
- gps
- amsua_aqua
- amsua_n15
- amsua_n18
Expand Down

0 comments on commit ac67008

Please sign in to comment.