From 8680d958524f8c12d25fb79a9f184d8ff38aa72a Mon Sep 17 00:00:00 2001 From: Anna Shlyaeva Date: Wed, 4 Feb 2026 21:54:38 +0000 Subject: [PATCH 1/2] Update marine LETKF-related configs --- parm/marine/marine_bmat_config.yaml.j2 | 2 +- parm/marine/marine_det_config.yaml.j2 | 2 +- parm/marine/marine_ecen_config.yaml.j2 | 2 +- parm/marine/marine_ens_config.yaml.j2 | 38 ++++++++++---------------- 4 files changed, 18 insertions(+), 26 deletions(-) diff --git a/parm/marine/marine_bmat_config.yaml.j2 b/parm/marine/marine_bmat_config.yaml.j2 index c754e96fc..705fd3255 100644 --- a/parm/marine/marine_bmat_config.yaml.j2 +++ b/parm/marine/marine_bmat_config.yaml.j2 @@ -59,7 +59,7 @@ data_in: copy_req: {% filter indent(width=4) %} {% include 'marine_det_stage_bkg.yaml.j2' %} -{% include 'marine_stage_fix_' ~ OCNRES ~ '.yaml.j2' %} +{% include 'marine_stage_fix_' ~ '%03d'|format(OCNRES|int) ~ '.yaml.j2' %} {% include 'marine_stage_utilities.yaml.j2' %} {% if DOHYBVAR_OCN == "YES" or NMEM_ENS >= 2 %} {% include 'marine_ens_stage_bkg.yaml.j2' %} diff --git a/parm/marine/marine_det_config.yaml.j2 b/parm/marine/marine_det_config.yaml.j2 index d0ffea874..fbc39f281 100644 --- a/parm/marine/marine_det_config.yaml.j2 +++ b/parm/marine/marine_det_config.yaml.j2 @@ -42,7 +42,7 @@ data_in: {% filter indent(width=4) %} {% include 'marine_det_stage_bkg.yaml.j2' %} -{% include 'marine_stage_fix_' ~ OCNRES ~ '.yaml.j2' %} +{% include 'marine_stage_fix_' ~ '%03d'|format(OCNRES|int) ~ '.yaml.j2' %} {% include 'marine_stage_utilities.yaml.j2' %} {% endfilter %} diff --git a/parm/marine/marine_ecen_config.yaml.j2 b/parm/marine/marine_ecen_config.yaml.j2 index 7e098ebae..8cca8abb8 100644 --- a/parm/marine/marine_ecen_config.yaml.j2 +++ b/parm/marine/marine_ecen_config.yaml.j2 @@ -38,7 +38,7 @@ data_in: {% filter indent(width=4) %} {% include 'marine_det_stage_bkg.yaml.j2' %} -{% include 'marine_stage_fix_' ~ OCNRES ~ '.yaml.j2' %} +{% include 'marine_stage_fix_' ~ '%03d'|format(OCNRES|int) ~ '.yaml.j2' %} {% include 'marine_stage_utilities.yaml.j2' %} {% endfilter %} diff --git a/parm/marine/marine_ens_config.yaml.j2 b/parm/marine/marine_ens_config.yaml.j2 index ad1faceb9..d4e26d7d1 100644 --- a/parm/marine/marine_ens_config.yaml.j2 +++ b/parm/marine/marine_ens_config.yaml.j2 @@ -29,14 +29,12 @@ data_in: - ['{{ COMIN_ICE_HISTORY_PREV }}/{{ GPREFIX }}inst.f009.nc', '{{ DATA }}/INPUT/cice.res.nc'] {% filter indent(width=4) %} -{% include 'marine_stage_fix_' ~ OCNRES ~ '.yaml.j2' %} +{% include 'marine_stage_fix_' ~ '%03d'|format(OCNRES|int) ~ '.yaml.j2' %} {% include 'marine_ens_stage_bkg.yaml.j2' %} {% endfilter %} data_out: mkdir: - - '{{ COMOUT_OCEAN_LETKF }}/diags' - {% for mem in range(1, NMEM_ENS + 1) %} {% set tmpl_dict = {'${ROTDIR}':ROTDIR, '${RUN}': GDUMP_ENS, @@ -44,8 +42,8 @@ data_out: '${HH}': current_cycle | strftime('%H'), '${MEMDIR}':'mem' + '%03d' % mem} %} - - '{{ COM_OCEAN_LETKF_TMPL | replace_tmpl(tmpl_dict) }}' - - '{{ COM_ICE_LETKF_TMPL | replace_tmpl(tmpl_dict) }}' + - '{{ COM_OCEAN_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}' + - '{{ COM_ICE_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}' {% endfor %} copy_req: @@ -58,26 +56,20 @@ data_out: '${HH}': current_cycle | strftime('%H'), '${MEMDIR}':'mem' + '%03d' % mem} %} - - ['{{ DATA }}/letkf_output/ocn.letkf.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_OCEAN_LETKF_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_ICE_LETKF_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_OCEAN_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_ICE_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] {% endfor %} # Save LETKF background and analysis mean and variance, mean analysis increment - - ['{{ DATA }}/letkf_output/ocn.letkf.mean_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_LETKF }}/{{ APREFIX_ENS }}ensmean_prior.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.mean_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_LETKF }}/{{ APREFIX_ENS }}ensmean_prior.nc'] - - ['{{ DATA }}/letkf_output/ocn.letkf.var_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_LETKF }}/{{ APREFIX_ENS }}ensvar_prior.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.var_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_LETKF }}/{{ APREFIX_ENS }}ensvar_prior.nc'] - - ['{{ DATA }}/letkf_output/ocn.letkf.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_LETKF }}/{{ APREFIX_ENS }}ensmean_post.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_LETKF }}/{{ APREFIX_ENS }}ensmean_post.nc'] - - ['{{ DATA }}/letkf_output/ocn.letkf.var_post.an.{{ WINDOW_MIDDLE | to_isotime}}.nc', '{{ COMOUT_OCEAN_LETKF }}/{{ APREFIX_ENS }}ensvar_post.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.var_post.an.{{ WINDOW_MIDDLE | to_isotime}}.nc', '{{ COMOUT_ICE_LETKF }}/{{ APREFIX_ENS }}ensvar_post.nc'] - - ['{{ DATA }}/letkf_output/ocn.letkf.inc.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_LETKF }}/{{ APREFIX_ENS }}ensmean_incr.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.inc.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_LETKF }}/{{ APREFIX_ENS }}ensmean_incr.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.mean_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_ANALYSIS }}/{{ APREFIX_ENS }}ensmean_prior.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.mean_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_ANALYSIS }}/{{ APREFIX_ENS }}ensmean_prior.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.var_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_ANALYSIS }}/{{ APREFIX_ENS }}ensvar_prior.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.var_prior.fc.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_ANALYSIS }}/{{ APREFIX_ENS }}ensvar_prior.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_ANALYSIS }}/{{ APREFIX_ENS }}ensmean_post.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_ANALYSIS }}/{{ APREFIX_ENS }}ensmean_post.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.var_post.an.{{ WINDOW_MIDDLE | to_isotime}}.nc', '{{ COMOUT_OCEAN_ANALYSIS }}/{{ APREFIX_ENS }}ensvar_post.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.var_post.an.{{ WINDOW_MIDDLE | to_isotime}}.nc', '{{ COMOUT_ICE_ANALYSIS }}/{{ APREFIX_ENS }}ensvar_post.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.inc.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_OCEAN_ANALYSIS }}/{{ APREFIX_ENS }}ensmean_incr.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.inc.ens.0.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COMOUT_ICE_ANALYSIS }}/{{ APREFIX_ENS }}ensmean_incr.nc'] - ['{{ DATA }}/letkf.yaml', '{{ COMOUT_CONF }}/soca_letkf.yaml'] - - copy_opt: - # save obs diags -{% for ob_name in observations %} - - ['{{ DATA }}/diags/{{ ob_name }}.nc', '{{ COMOUT_OCEAN_LETKF }}/diags'] -{% endfor %} From 53cc2f04139497e0b5cbb2aba1ad865fb90f2512 Mon Sep 17 00:00:00 2001 From: AndrewEichmann-NOAA Date: Wed, 15 Apr 2026 19:35:10 +0000 Subject: [PATCH 2/2] letkf2ecen --- .../model/marine/marine_background_ensemble.yaml.j2 | 3 ++- .../marine/marine_output_ensemble_increments.yaml.j2 | 4 ++++ parm/marine/jcb-base.yaml.j2 | 7 ++++++- parm/marine/marine_ecen_config.yaml.j2 | 9 +++++++-- parm/marine/marine_ens_config.yaml.j2 | 4 ++-- 5 files changed, 21 insertions(+), 6 deletions(-) create mode 100644 parm/jcb-gdas/model/marine/marine_output_ensemble_increments.yaml.j2 diff --git a/parm/jcb-gdas/model/marine/marine_background_ensemble.yaml.j2 b/parm/jcb-gdas/model/marine/marine_background_ensemble.yaml.j2 index 911cf80ac..ca2ed86ab 100644 --- a/parm/jcb-gdas/model/marine/marine_background_ensemble.yaml.j2 +++ b/parm/jcb-gdas/model/marine/marine_background_ensemble.yaml.j2 @@ -5,6 +5,7 @@ members from template: ice_filename: "ice.%mem%.nc" read_from_file: 1 basename: {{ marine_enspert_relpath }}/ens/ - state variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction] + #state variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction] + state variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction, sea_ice_thickness, sea_ice_snow_thickness] pattern: '%mem%' nmembers: {{ marine_number_ensemble_members }} diff --git a/parm/jcb-gdas/model/marine/marine_output_ensemble_increments.yaml.j2 b/parm/jcb-gdas/model/marine/marine_output_ensemble_increments.yaml.j2 new file mode 100644 index 000000000..4cae31926 --- /dev/null +++ b/parm/jcb-gdas/model/marine/marine_output_ensemble_increments.yaml.j2 @@ -0,0 +1,4 @@ +datadir: letkf_output/ +date: '{{ marine_window_begin_iso }}' +exp: letkf.inc +type: ens diff --git a/parm/marine/jcb-base.yaml.j2 b/parm/marine/jcb-base.yaml.j2 index aaa4a56df..f251bcf23 100644 --- a/parm/marine/jcb-base.yaml.j2 +++ b/parm/marine/jcb-base.yaml.j2 @@ -114,12 +114,17 @@ local_ensemble_da_solver: Deterministic LETKF use_linear_observer: true # Increment variables -increment_variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction] +#increment_variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction] +#increment_variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction, sea_ice_volume] +#increment_variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction, sea_ice_thickness] +increment_variables: [sea_water_salinity, sea_water_potential_temperature, sea_surface_height_above_geoid, sea_water_cell_thickness, eastward_sea_water_velocity, northward_sea_water_velocity, sea_ice_area_fraction, sea_ice_thickness, sea_ice_snow_thickness] # Driver driver_save_posterior_mean: true driver_save_prior_mean: true driver_save_posterior_mean_increment: true +driver_save_posterior_ensemble_increments: true +driver_save_posterior_ensemble: false driver_save_prior_variance: true driver_save_posterior_variance: true driver_do_posterior_observer: true diff --git a/parm/marine/marine_ecen_config.yaml.j2 b/parm/marine/marine_ecen_config.yaml.j2 index 8cca8abb8..e48b9bc73 100644 --- a/parm/marine/marine_ecen_config.yaml.j2 +++ b/parm/marine/marine_ecen_config.yaml.j2 @@ -21,8 +21,13 @@ data_in: link_req: {% for imem in range(1,NMEM_ENS+1) %} - - [ "{{ DATA }}/../ensdata/ens/ocean.{{ imem | string }}.nc", '{{ DATA }}/ens/' ] - - [ "{{ DATA }}/../ensdata/ens/ice.{{ imem | string }}.nc", '{{ DATA }}/ens/' ] +# - [ "{{ DATA }}/../ensdata/ens/ocean.{{ imem | string }}.nc", '{{ DATA }}/ens/' ] +# - [ "{{ DATA }}/../ensdata/ens/ice.{{ imem | string }}.nc", '{{ DATA }}/ens/' ] +# - [ "{{ DATA }}/../marineanlletkf/letkf_output/ocn.letkf.inc.ens.{{ imem | string }}.2025-10-10T03:00:00Z.PT3H.nc", '{{ DATA }}/ens/ocean.{{ imem | string }}.nc' ] +# - [ "{{ DATA }}/../marineanlletkf/letkf_output/ice.letkf.inc.ens.{{ imem | string }}.2025-10-10T03:00:00Z.PT3H.nc", '{{ DATA }}/ens/ice.{{ imem | string }}.nc' ] + - ['{{ DATA }}/../marineanlletkf/letkf_output/ocn.letkf.inc.ens.{{ imem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ DATA }}/ens/ocean.{{ imem | string }}.nc' ] + - ['{{ DATA }}/../marineanlletkf/letkf_output/ice.letkf.inc.ens.{{ imem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ DATA }}/ens/ice.{{ imem | string }}.nc' ] + {% endfor %} copy_req: diff --git a/parm/marine/marine_ens_config.yaml.j2 b/parm/marine/marine_ens_config.yaml.j2 index d4e26d7d1..df7ccd5b4 100644 --- a/parm/marine/marine_ens_config.yaml.j2 +++ b/parm/marine/marine_ens_config.yaml.j2 @@ -56,8 +56,8 @@ data_out: '${HH}': current_cycle | strftime('%H'), '${MEMDIR}':'mem' + '%03d' % mem} %} - - ['{{ DATA }}/letkf_output/ocn.letkf.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_OCEAN_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] - - ['{{ DATA }}/letkf_output/ice.letkf.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_ICE_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] + - ['{{ DATA }}/letkf_output/ocn.letkf.inc.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_OCEAN_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] + - ['{{ DATA }}/letkf_output/ice.letkf.inc.ens.{{ mem }}.{{ WINDOW_BEGIN | to_isotime }}.PT3H.nc', '{{ COM_ICE_ANALYSIS_TMPL | replace_tmpl(tmpl_dict) }}/{{ APREFIX_ENS }}jedi_analysis.a006.nc'] {% endfor %} # Save LETKF background and analysis mean and variance, mean analysis increment