Skip to content

Commit

Permalink
fixed dirac
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres committed Jun 21, 2023
1 parent cfb5fb4 commit d765863
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/soca/gw/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ add_test(NAME test_gdasapp_soca_run_clean
# Test JGDAS_GLOBAL_OCEAN_ANALYSIS_*
set(jjob_list "JGDAS_GLOBAL_OCEAN_ANALYSIS_PREP"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT"
# "JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT_VRFY"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_BMAT_VRFY"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_RUN"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_CHKPT"
"JGDAS_GLOBAL_OCEAN_ANALYSIS_POST"
Expand Down
14 changes: 11 additions & 3 deletions ush/ufsda/dirac_yaml.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,17 @@ def var2dirac(args):
# Overwrite variables
state_vars = ['cicen', 'hicen', 'hsnon', 'socn', 'tocn', 'ssh', 'hocn', 'mld', 'layer_depth']
diracconfig['initial condition']['state variables'] = state_vars
for sub_bmat in range(len(diracconfig['background error']['components'])):
diracconfig['background error']['components'][sub_bmat]['covariance']['linear variable change']['input variables'] = state_vars
diracconfig['background error']['components'][sub_bmat]['covariance']['linear variable change']['output variables'] = state_vars

# str to integer
nmem=int(diracconfig['background error']['components'][1]['covariance']['members from template']['nmembers'] )
diracconfig['background error']['components'][1]['covariance']['members from template']['nmembers'] = nmem

# Set date to the middle of the window
window_middle = diracconfig['background error']['components'][1]['weight']['date']
diracconfig['initial condition']['date'] = window_middle

# Remove static B
diracconfig['background error'] = diracconfig['background error']['components'][1]['covariance']

# Generate impulse indices
ds = xr.open_dataset(grid)
Expand Down

0 comments on commit d765863

Please sign in to comment.