From 25c66b8dfd5462ae873b77c57178ec903f8af59f Mon Sep 17 00:00:00 2001 From: Guillaume Vernieres Date: Tue, 17 Sep 2024 08:51:07 -0400 Subject: [PATCH] Revive the marine jcb implementation (#26) Some updates/fixes to the marine yaml templates. --- algorithm/marine/soca_2cice_antarctic.yaml.j2 | 43 +++++++++++++++++++ algorithm/marine/soca_2cice_arctic.yaml.j2 | 40 +++++++++++++++++ ...caincr2mom6.yaml => socaincr2mom6.yaml.j2} | 10 ++--- ..._background_error_static_diffusion.yaml.j2 | 12 +++--- 4 files changed, 94 insertions(+), 11 deletions(-) create mode 100644 algorithm/marine/soca_2cice_antarctic.yaml.j2 create mode 100644 algorithm/marine/soca_2cice_arctic.yaml.j2 rename algorithm/marine/{socaincr2mom6.yaml => socaincr2mom6.yaml.j2} (64%) diff --git a/algorithm/marine/soca_2cice_antarctic.yaml.j2 b/algorithm/marine/soca_2cice_antarctic.yaml.j2 new file mode 100644 index 0000000..73fa367 --- /dev/null +++ b/algorithm/marine/soca_2cice_antarctic.yaml.j2 @@ -0,0 +1,43 @@ +input geometry: + mom6_input_nml: mom_input.nml + fields metadata: fields_metadata.yaml + geom_grid_file: soca_gridspec.nc + +output geometry: + mom6_input_nml: mom_input.nml + fields metadata: fields_metadata.yaml + geom_grid_file: soca_gridspec.nc + +variable change: + variable change name: Soca2Cice + do inverse: false + seaice edge: 0.9 + shuffle: false # seg. fault when true + rescale prior: + min hice: 0.5 + min hsno: 0.1 + domain: antarctic + cice background state: + restart: {{ ice_rst }} + grid: ' ' + ncat: 5 + ice_lev: 7 + sno_lev: 1 + tstep: PT1H + cice output: + restart: {{ ice_rst }} + output variables: [tocn, socn, hocn, cicen, hicen, hsnon] + +states: +- input: + read_from_file: 1 + basename: ./ + ocn_filename: {{ ocn_ana }} + ice_filename: {{ ice_ana }} + date: '{{ fcst_begin }}' + state variables: [tocn, socn, hocn, cicen, hicen, hsnon] + output: + datadir: Data + exp: soca2cice + type: fc + date: '{{ fcst_begin }}' diff --git a/algorithm/marine/soca_2cice_arctic.yaml.j2 b/algorithm/marine/soca_2cice_arctic.yaml.j2 new file mode 100644 index 0000000..e686eea --- /dev/null +++ b/algorithm/marine/soca_2cice_arctic.yaml.j2 @@ -0,0 +1,40 @@ +input geometry: + mom6_input_nml: mom_input.nml + fields metadata: ./fields_metadata.yaml + +output geometry: + mom6_input_nml: mom_input.nml + fields metadata: ./fields_metadata.yaml + +variable change: + variable change name: Soca2Cice + do inverse: false + seaice edge: 0.8 + shuffle: false + rescale prior: + min hice: 0.5 + min hsno: 0.1 + domain: arctic + cice background state: + restart: {{ ice_rst }} + ncat: 5 + ice_lev: 7 + sno_lev: 1 + tstep: PT1H + cice output: + restart: {{ ice_rst }} + output variables: [tocn, socn, hocn, cicen, hicen, hsnon] + +states: +- input: + read_from_file: 1 + basename: ./ + ocn_filename: {{ ocn_ana }} + ice_filename: {{ ice_ana }} + date: '{{ fcst_begin }}' + state variables: [tocn, socn, hocn, cicen, hicen, hsnon] + output: + datadir: Data + exp: soca2cice + type: fc + date: '{{ fcst_begin }}' diff --git a/algorithm/marine/socaincr2mom6.yaml b/algorithm/marine/socaincr2mom6.yaml.j2 similarity index 64% rename from algorithm/marine/socaincr2mom6.yaml rename to algorithm/marine/socaincr2mom6.yaml.j2 index 83ce704..ececb6b 100644 --- a/algorithm/marine/socaincr2mom6.yaml +++ b/algorithm/marine/socaincr2mom6.yaml.j2 @@ -2,27 +2,27 @@ geometry: mom6_input_nml: mom_input.nml fields metadata: ./fields_metadata.yaml -date: '{{marine_window_begin}}' +date: '{{ marine_window_begin }}' layers variable: [hocn] increment variables: [tocn, socn, uocn, vocn, ssh] vertical geometry: - date: '{{marine_window_begin}}' + date: '{{ marine_window_begin }}' basename: ./INPUT/ ocn_filename: MOM.res.nc read_from_file: 1 soca increment: - date: '{{marine_window_begin}}' + date: '{{ marine_window_begin }}' basename: ./Data/ - ocn_filename: 'ocn.3dvarfgat_pseudo.incr.{{ATM_WINDOW_MIDDLE}}.nc' + ocn_filename: 'ocn.3dvarfgat_pseudo.incr.{{marine_window_middle}}.nc' read_from_file: 1 output increment: datadir: ./ - date: '{{marine_window_begin}}' + date: '{{ marine_window_begin }}' exp: mom6_iau type: incr output file: inc.nc diff --git a/model/marine/marine_background_error_static_diffusion.yaml.j2 b/model/marine/marine_background_error_static_diffusion.yaml.j2 index a2d7e05..4275f3e 100644 --- a/model/marine/marine_background_error_static_diffusion.yaml.j2 +++ b/model/marine/marine_background_error_static_diffusion.yaml.j2 @@ -18,21 +18,21 @@ saber central block: groups: - name: ocean horizontal: - filename: hz_ocean.nc + filename: ./staticb/hz_ocean.nc vertical: - filename: vt_ocean.nc + filename: ./staticb/vt_ocean.nc - name: ice horizontal: - filename: hz_ice.nc + filename: ./staticb/hz_ice.nc saber outer blocks: - saber block name: StdDev read: model file: date: '{{marine_stddev_time}}' - basename: ./ - ocn_filename: 'ocn.bkgerr_stddev.incr.{{marine_stddev_time}}.nc' - ice_filename: 'ice.bkgerr_stddev.incr.{{marine_stddev_time}}.nc' + basename: ./staticb/ + ocn_filename: 'ocn.bkgerr_stddev.nc' + ice_filename: 'ice.bkgerr_stddev.nc' read_from_file: 3 linear variable change: