From 38117be1da0ad6ee47b023ac68d95a1741a277e0 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Thu, 16 Jan 2025 10:08:54 -0600 Subject: [PATCH 1/4] configs for low res B --- algorithm/marine/soca_chgres.yaml.j2 | 33 +++++++++ algorithm/marine/soca_diagb.yaml.j2 | 5 ++ algorithm/marine/soca_ensb.yaml.j2 | 7 +- algorithm/marine/soca_ensweights.yaml.j2 | 24 +++--- .../soca_parameters_diffusion_hz.yaml.j2 | 11 ++- .../soca_parameters_diffusion_vt.yaml.j2 | 12 +-- algorithm/marine/soca_setcorscales.yaml.j2 | 3 +- algorithm/marine/soca_vtscales.yaml.j2 | 6 +- algorithm/marine/socaincr2mom6.yaml.j2 | 2 + .../marine/marine_3dfgat_outer_loop_1.yaml.j2 | 3 +- .../marine/marine_3dvar_outer_loop_1.yaml.j2 | 7 -- ...d_error_hybrid_diffusion_diffusion.yaml.j2 | 74 ++++++++++--------- ..._background_error_static_diffusion.yaml.j2 | 1 + 13 files changed, 122 insertions(+), 66 deletions(-) create mode 100644 algorithm/marine/soca_chgres.yaml.j2 delete mode 100644 model/marine/marine_3dvar_outer_loop_1.yaml.j2 diff --git a/algorithm/marine/soca_chgres.yaml.j2 b/algorithm/marine/soca_chgres.yaml.j2 new file mode 100644 index 0000000..2f417bc --- /dev/null +++ b/algorithm/marine/soca_chgres.yaml.j2 @@ -0,0 +1,33 @@ +input geometry: + mom6_input_nml: mom_input.nml + fields metadata: ./fields_metadata.yaml + +output geometry: + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml + fields metadata: ./fields_metadata.yaml + +states: +- input: + date: '{{ marine_window_end_iso }}' + basename: ./bkg/ + ocn_filename: 'ocean.bkg.f009.nc' + ice_filename: 'ice.bkg.f009.nc' + read_from_file: 1 + + state variables: + - sea_surface_height_above_geoid + - sea_water_potential_temperature + - sea_water_salinity + - sea_water_cell_thickness + - sea_water_depth + - mom6_mld + - sea_ice_area_fraction + - sea_ice_thickness + - sea_ice_snow_thickness + + output: + datadir: anl_geom/ + exp: f009_anl_geom + type: fc + date: '{{ marine_window_end_iso }}' \ No newline at end of file diff --git a/algorithm/marine/soca_diagb.yaml.j2 b/algorithm/marine/soca_diagb.yaml.j2 index 788f674..1f7c0eb 100644 --- a/algorithm/marine/soca_diagb.yaml.j2 +++ b/algorithm/marine/soca_diagb.yaml.j2 @@ -2,6 +2,11 @@ geometry: mom6_input_nml: mom_input.nml fields metadata: ./fields_metadata.yaml +output geometry: + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml + fields metadata: ./fields_metadata.yaml + date: '{{ marine_window_end_iso }}' background: diff --git a/algorithm/marine/soca_ensb.yaml.j2 b/algorithm/marine/soca_ensb.yaml.j2 index 852850f..ab437fa 100644 --- a/algorithm/marine/soca_ensb.yaml.j2 +++ b/algorithm/marine/soca_ensb.yaml.j2 @@ -3,6 +3,11 @@ geometry: mom6_input_nml: mom_input.nml fields metadata: ./fields_metadata.yaml +output geometry: + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml + fields metadata: ./fields_metadata.yaml + date: '{{ marine_window_begin_iso }}' layers variable: [sea_water_cell_thickness] @@ -113,5 +118,5 @@ output increment: date: '{{ marine_window_begin_iso }}' exp: trash type: incr - output file: 'ocn.pert.steric.%mem%.nc' + output file: 'pert.%mem%.nc' pattern: '%mem%' diff --git a/algorithm/marine/soca_ensweights.yaml.j2 b/algorithm/marine/soca_ensweights.yaml.j2 index 9f818b3..00b2e1e 100644 --- a/algorithm/marine/soca_ensweights.yaml.j2 +++ b/algorithm/marine/soca_ensweights.yaml.j2 @@ -2,6 +2,11 @@ geometry: mom6_input_nml: mom_input.nml fields metadata: ./fields_metadata.yaml +output geometry: + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml + fields metadata: ./fields_metadata.yaml + date: '{{ marine_window_middle_iso }}' variables: @@ -29,15 +34,16 @@ weights: ice: 0.0025 # 5% of original variance ocean: 0.0625 # 25% " " # Apply localized weights to the ocean ens. B - ocean local weights: - - lon: -172.0 - lat: 11.0 - amplitude: -1.0 - length scale: 700.0 - - lon: -160.0 - lat: 12.0 - amplitude: -1.0 - length scale: 700.0 + # Example below was for old ens. from Xiao + # ocean local weights: + # - lon: -172.0 + # lat: 11.0 + # amplitude: -1.0 + # length scale: 700.0 + # - lon: -160.0 + # lat: 12.0 + # amplitude: -1.0 + # length scale: 700.0 output: datadir: ./ diff --git a/algorithm/marine/soca_parameters_diffusion_hz.yaml.j2 b/algorithm/marine/soca_parameters_diffusion_hz.yaml.j2 index 8f3cdf7..cb57948 100644 --- a/algorithm/marine/soca_parameters_diffusion_hz.yaml.j2 +++ b/algorithm/marine/soca_parameters_diffusion_hz.yaml.j2 @@ -1,12 +1,15 @@ +# Analysis/B-mat resolution geometry: &geom - mom6_input_nml: mom_input.nml + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml fields metadata: ./fields_metadata.yaml +# Background interpolated at the analysis resolution background: read_from_file: 1 - basename: ./INPUT/ - ocn_filename: MOM.res.nc - ice_filename: cice.res.nc + basename: ./anl_geom/ + ocn_filename: 'ocn.f009_anl_geom.fc.{{ marine_window_end_iso }}.PT0S.nc' + ice_filename: 'ice.f009_anl_geom.fc.{{ marine_window_end_iso }}.PT0S.nc' date: '{{ marine_window_end_iso }}' state variables: [sea_surface_height_above_geoid] diff --git a/algorithm/marine/soca_parameters_diffusion_vt.yaml.j2 b/algorithm/marine/soca_parameters_diffusion_vt.yaml.j2 index 8e23f2d..a5c5d46 100644 --- a/algorithm/marine/soca_parameters_diffusion_vt.yaml.j2 +++ b/algorithm/marine/soca_parameters_diffusion_vt.yaml.j2 @@ -1,13 +1,15 @@ +# Analysis/B-mat resolution geometry: &geom - mom6_input_nml: mom_input.nml + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml fields metadata: ./fields_metadata.yaml +# Background interpolated at the analysis resolution background: read_from_file: 1 - basename: ./INPUT/ - ocn_filename: MOM.res.nc - ice_filename: cice.res.nc - date: '{{ marine_window_middle_iso }}' + basename: ./anl_geom/ + ocn_filename: 'ocn.f009_anl_geom.fc.{{ marine_window_end_iso }}.PT0S.nc' + date: '{{ marine_window_end_iso }}' state variables: [sea_water_potential_temperature] background error: diff --git a/algorithm/marine/soca_setcorscales.yaml.j2 b/algorithm/marine/soca_setcorscales.yaml.j2 index 0c2b9c0..b4e69c1 100644 --- a/algorithm/marine/soca_setcorscales.yaml.j2 +++ b/algorithm/marine/soca_setcorscales.yaml.j2 @@ -1,5 +1,6 @@ resolution: - mom6_input_nml: mom_input.nml + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml fields metadata: ./fields_metadata.yaml date: "0001-01-01T00:00:00Z" diff --git a/algorithm/marine/soca_vtscales.yaml.j2 b/algorithm/marine/soca_vtscales.yaml.j2 index 797af37..f0e68bc 100644 --- a/algorithm/marine/soca_vtscales.yaml.j2 +++ b/algorithm/marine/soca_vtscales.yaml.j2 @@ -1,6 +1,6 @@ -gridspec_filename: soca_gridspec.nc -restart_filename: ./INPUT/MOM.res.nc -mld_filename: './staticb/ocn.bkgerr_stddev.incr.{{ marine_window_end_iso }}.nc' +gridspec_filename: ./anl_geom/soca_gridspec.nc +restart_filename: './anl_geom/ocn.f009_anl_geom.fc.{{ marine_window_end_iso }}.PT0S.nc' +mld_filename: './anl_geom/ocn.f009_anl_geom.fc.{{ marine_window_end_iso }}.PT0S.nc' output_filename: ./vt_scales.nc output_variable_vt: Temp output_variable_hz: ave_ssh diff --git a/algorithm/marine/socaincr2mom6.yaml.j2 b/algorithm/marine/socaincr2mom6.yaml.j2 index 0790fc9..85b8f03 100644 --- a/algorithm/marine/socaincr2mom6.yaml.j2 +++ b/algorithm/marine/socaincr2mom6.yaml.j2 @@ -6,6 +6,8 @@ date: '{{ marine_window_begin }}' layers variable: [sea_water_cell_thickness] +domains: [ocn] + increment variables: - sea_water_potential_temperature - sea_water_salinity diff --git a/model/marine/marine_3dfgat_outer_loop_1.yaml.j2 b/model/marine/marine_3dfgat_outer_loop_1.yaml.j2 index 2931f62..e90d9dd 100644 --- a/model/marine/marine_3dfgat_outer_loop_1.yaml.j2 +++ b/model/marine/marine_3dfgat_outer_loop_1.yaml.j2 @@ -1,7 +1,8 @@ - ninner: {{marine_ninner_1}} gradient norm reduction: {{marine_grad_red_1}} geometry: - mom6_input_nml: mom_input.nml + geom_grid_file: ./anl_geom/soca_gridspec.nc + mom6_input_nml: ./anl_geom/mom_input.nml fields metadata: {{marine_soca_files_path}}/fields_metadata.yaml diagnostics: departures: ombg diff --git a/model/marine/marine_3dvar_outer_loop_1.yaml.j2 b/model/marine/marine_3dvar_outer_loop_1.yaml.j2 deleted file mode 100644 index 2931f62..0000000 --- a/model/marine/marine_3dvar_outer_loop_1.yaml.j2 +++ /dev/null @@ -1,7 +0,0 @@ -- ninner: {{marine_ninner_1}} - gradient norm reduction: {{marine_grad_red_1}} - geometry: - mom6_input_nml: mom_input.nml - fields metadata: {{marine_soca_files_path}}/fields_metadata.yaml - diagnostics: - departures: ombg diff --git a/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 b/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 index 5a5a1ac..22f3322 100644 --- a/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 +++ b/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 @@ -2,6 +2,7 @@ covariance model: hybrid components: - covariance: covariance model: SABER + change background resolution: true saber central block: saber block name: diffusion read: @@ -57,41 +58,44 @@ components: value: 1.00 - covariance: - covariance model: ensemble - members from template: - template: - read_from_file: 1 - date: '{{marine_stddev_time}}' - basename: ../ensdata/ - ocn_filename: 'ocn.pert.steric.%mem%.nc' - ice_filename: 'ens/ice.%mem%.nc' - state variables: - - sea_ice_area_fraction - - sea_ice_thickness - - sea_ice_snow_thickness - - sea_water_salinity - - sea_water_potential_temperature - #- eastward_sea_water_velocity - #- northward_sea_water_velocity - - sea_surface_height_above_geoid - pattern: '%mem%' - nmembers: '{{marine_number_ensemble_members}}' - localization: - localization method: SABER - saber central block: - saber block name: diffusion - read: - groups: - - variables: - - sea_water_potential_temperature - - sea_water_salinity - - sea_surface_height_above_geoid - - sea_ice_area_fraction - horizontal: - filepath: ./staticb/hz_ocean - vertical: - levels: {{marine_vt_levels}} - filepath: ./staticb/vt_ocean + covariance model: SABER + ensemble: + members from template: + template: + read_from_file: 1 + date: '2021-07-01T00:00:00Z' + basename: ../ensdata/ + ocn_filename: ocn.pert.%mem%.nc + ice_filename: ice.pert.%mem%.nc + state variables: + - sea_water_potential_temperature + - sea_water_salinity + #- eastward_sea_water_velocity + #- northward_sea_water_velocity + - sea_surface_height_above_geoid + - sea_ice_area_fraction + - sea_ice_thickness + - sea_ice_snow_thickness + pattern: '%mem%' + nmembers: '{{marine_number_ensemble_members}}' + saber central block: + saber block name: Ensemble + localization: + saber central block: + saber block name: diffusion + read: + groups: + - variables: + - sea_water_potential_temperature + - sea_water_salinity + - sea_surface_height_above_geoid + - sea_ice_area_fraction + multivariate strategy: duplicated + horizontal: + filepath: ./staticb/hz_ocean + vertical: + strategy: duplicated + weight: read_from_file: 3 basename: ./ diff --git a/model/marine/marine_background_error_static_diffusion.yaml.j2 b/model/marine/marine_background_error_static_diffusion.yaml.j2 index 2a41011..1ac5820 100644 --- a/model/marine/marine_background_error_static_diffusion.yaml.j2 +++ b/model/marine/marine_background_error_static_diffusion.yaml.j2 @@ -1,4 +1,5 @@ covariance model: SABER +change background resolution: true saber central block: saber block name: diffusion read: From f2915fbcca55c6bbbbda727fa9e4d23bf1672055 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Thu, 16 Jan 2025 10:25:43 -0600 Subject: [PATCH 2/4] removed 3dvar test --- test/client_integration/gdas-marine-templates.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/test/client_integration/gdas-marine-templates.yaml b/test/client_integration/gdas-marine-templates.yaml index f258cc9..238b4a8 100644 --- a/test/client_integration/gdas-marine-templates.yaml +++ b/test/client_integration/gdas-marine-templates.yaml @@ -1,7 +1,6 @@ # This part is for testing only. Normally this would just show algorithm: # ----------------------------------------------------------------------------------- supported_algorithms: -- 3dvar - hofx3d - hofx4d - 3dfgat From dbe0a71bd5a9b50f24c5979b72c300475163b5e7 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Fri, 17 Jan 2025 10:55:37 -0500 Subject: [PATCH 3/4] Update marine_background_error_hybrid_diffusion_diffusion.yaml.j2 --- .../marine_background_error_hybrid_diffusion_diffusion.yaml.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 b/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 index 22f3322..7edddcb 100644 --- a/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 +++ b/model/marine/marine_background_error_hybrid_diffusion_diffusion.yaml.j2 @@ -63,7 +63,7 @@ components: members from template: template: read_from_file: 1 - date: '2021-07-01T00:00:00Z' + date: '{{marine_stddev_time}}' basename: ../ensdata/ ocn_filename: ocn.pert.%mem%.nc ice_filename: ice.pert.%mem%.nc From 637f1b1dc35c9744db53fe8e45ca2b3af53144b1 Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Mon, 3 Feb 2025 09:17:52 -0600 Subject: [PATCH 4/4] smaller scales for C --- algorithm/marine/soca_setcorscales.yaml.j2 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/algorithm/marine/soca_setcorscales.yaml.j2 b/algorithm/marine/soca_setcorscales.yaml.j2 index b4e69c1..9d07bef 100644 --- a/algorithm/marine/soca_setcorscales.yaml.j2 +++ b/algorithm/marine/soca_setcorscales.yaml.j2 @@ -10,8 +10,8 @@ corr variables: [sea_surface_height_above_geoid] scales: vert layers: 5 # in units of layer sea_surface_height_above_geoid: - rossby mult: 2.00 - min grid mult: 6.0 + rossby mult: 1.50 + min grid mult: 2.0 rh output: datadir: ./