Skip to content

Commit

Permalink
New ocean/ice B diag (#1050)
Browse files Browse the repository at this point in the history
### What was done
- Variance partitioning of ice and ocean backgrounds
- Switch to using the `StdDev` saber block with the above fields as a
proxy of the background error
- Changed the obs filtering
- Removed the hybrid B, will plug it back in later
- Use Travis' script to extract the vertical decorrelation scales from
the bkg, using the mld.
- Use of jinja for the new yamls
- setting NMEM_ENS to something larger that 3 will trigger the hybrid
envar and use static or real members, depending on the status or
`DO_HYBVAR`

The results are reasonable but some of the parameters of the variance
partitioning still need to be optimized further

- fixes #982 
- fixes #927 
- fixes #939 (not exactly but good enough. It tests the hybrid envar
with static members)

---------

Co-authored-by: Cory Martin <cory.r.martin@noaa.gov>
  • Loading branch information
guillaumevernieres and CoryMartin-NOAA authored Apr 18, 2024
1 parent 7a58f82 commit 5b464c6
Show file tree
Hide file tree
Showing 26 changed files with 1,090 additions and 203 deletions.
101 changes: 0 additions & 101 deletions parm/soca/berror/saber_blocks.yaml

This file was deleted.

59 changes: 59 additions & 0 deletions parm/soca/berror/soca_diagb.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
geometry:
mom6_input_nml: mom_input.nml
fields metadata: ./fields_metadata.yaml

date: '{{ ATM_WINDOW_MIDDLE }}'

background:
date: '{{ ATM_WINDOW_MIDDLE }}'
basename: ./bkg/
ocn_filename: '{{ RUN }}.ocean.t{{ gcyc }}z.inst.f009.nc'
ice_filename: '{{ RUN }}.agg_ice.t{{ gcyc }}z.inst.f009.nc'
read_from_file: 1

background error:
datadir: ./
date: '{{ ATM_WINDOW_MIDDLE }}'
exp: bkgerr_stddev
type: incr

variables:
name: [tocn, socn, uocn, vocn, hocn, ssh, cicen, hicen, hsnon, mom6_mld]

rescale: 2.0 # rescales the filtered std. dev. by "rescale"
min sst: 0.0 # Added to sst bkg. err.
max ssh: 0.0 # Limits the amplitude of the unbalanced bkg err
number of halo points: 4
number of neighbors: 16
simple smoothing:
horizontal iterations: 2
vertical iterations: 1

# TODO(G): Start using when the normalization is optional
#diffusion:
# saber block name: EXPLICIT_DIFFUSION
# active variables: [tocn, socn, ssh, cicen, hicen, hsnon]
# geometry:
# mom6_input_nml: mom_input.nml
# fields metadata: ./fields_metadata.yaml
# group mapping:
# - name: ocean
# variables:
# - tocn
# - socn
# - ssh
# - name: ice
# variables:
# - cicen
# - hicen
# - hsnon
# read:
# groups:
# - name: ocean
# horizontal:
# filename: hz_ocean.nc
# vertical:
# filename: vt_ocean.nc
# - name: ice
# horizontal:
# filename: hz_ice.nc
92 changes: 92 additions & 0 deletions parm/soca/berror/soca_hybrid_bmat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
covariance model: hybrid
components:
- covariance:
covariance model: SABER
saber central block:
saber block name: EXPLICIT_DIFFUSION
active variables: [tocn, socn, ssh, cicen]
geometry:
mom6_input_nml: mom_input.nml
fields metadata: ./fields_metadata.yaml
group mapping:
- name: ocean
variables:
- tocn
- socn
- ssh
- name: ice
variables:
- cicen
read:
groups:
- name: ocean
horizontal:
filename: hz_ocean.nc
vertical:
filename: vt_ocean.nc
- name: ice
horizontal:
filename: hz_ice.nc

saber outer blocks:
- saber block name: StdDev
read:
model file:
date: '{{ATM_WINDOW_MIDDLE}}'
basename: ./
ocn_filename: 'ocn.bkgerr_stddev.incr.{{ATM_WINDOW_MIDDLE}}.nc'
ice_filename: 'ice.bkgerr_stddev.incr.{{ATM_WINDOW_MIDDLE}}.nc'
read_from_file: 3

linear variable change:
input variables: [cicen, hicen, hsnon, socn, tocn, uocn, vocn, ssh]
output variables: [cicen, hicen, hsnon, socn, tocn, uocn, vocn, ssh]
linear variable changes:
- linear variable change name: BalanceSOCA

weight:
value: 1.00

- covariance:
covariance model: ensemble
members from template:
template:
read_from_file: 1
date: '{{ATM_WINDOW_MIDDLE}}'
basename: ./static_ens/
ocn_filename: 'ocn.pert.steric.%mem%.nc'
ice_filename: 'ice.%mem%.nc'
state variables: [tocn, socn, ssh, uocn, vocn, cicen, hicen, hsnon]
pattern: '%mem%'
nmembers: ${ENS_SIZE}
localization:
localization method: SABER
saber central block:
saber block name: EXPLICIT_DIFFUSION
active variables: [tocn, socn, ssh]
geometry:
mom6_input_nml: mom_input.nml
fields metadata: ./fields_metadata.yaml
group mapping:
- name: ocean
variables: [tocn, socn, ssh, uocn, vocn]
- name: ice
variables: [cicen, hicen, hsnon]
read:
groups:
- name: ocean
multivariate strategy: duplicated
horizontal:
filename: hz_ocean.nc
vertical:
strategy: duplicated
- name: ice
horizontal:
filename: hz_ice.nc

weight:
read_from_file: 3
basename: ./
ocn_filename: 'ocn.ens_weights.incr.{{ATM_WINDOW_MIDDLE}}.nc'
ice_filename: 'ice.ens_weights.incr.{{ATM_WINDOW_MIDDLE}}.nc'
date: '{{ATM_WINDOW_MIDDLE}}'
4 changes: 3 additions & 1 deletion parm/soca/berror/soca_parameters_diffusion_vt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ background error:
- name: vt_ocean
vertical:
as gaussian: true
fixed value: 5.0
from file:
filename: vt_scales.nc
variable name: vt
write:
filename: vt_ocean.nc
42 changes: 42 additions & 0 deletions parm/soca/berror/soca_static_bmat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
covariance model: SABER
saber central block:
saber block name: EXPLICIT_DIFFUSION
active variables: [tocn, socn, ssh, cicen]
geometry:
mom6_input_nml: mom_input.nml
fields metadata: ./fields_metadata.yaml
group mapping:
- name: ocean
variables:
- tocn
- socn
- ssh
- name: ice
variables:
- cicen
read:
groups:
- name: ocean
horizontal:
filename: hz_ocean.nc
vertical:
filename: vt_ocean.nc
- name: ice
horizontal:
filename: hz_ice.nc

saber outer blocks:
- saber block name: StdDev
read:
model file:
date: '{{ATM_WINDOW_MIDDLE}}'
basename: ./
ocn_filename: 'ocn.bkgerr_stddev.incr.{{ATM_WINDOW_MIDDLE}}.nc'
ice_filename: 'ice.bkgerr_stddev.incr.{{ATM_WINDOW_MIDDLE}}.nc'
read_from_file: 3

linear variable change:
input variables: [cicen, hicen, hsnon, socn, tocn, uocn, vocn, ssh]
output variables: [cicen, hicen, hsnon, socn, tocn, uocn, vocn, ssh]
linear variable changes:
- linear variable change name: BalanceSOCA
13 changes: 13 additions & 0 deletions parm/soca/berror/soca_vtscales.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
gridspec_filename: soca_gridspec.nc
restart_filename: ./INPUT/MOM.res.nc
mld_filename: 'ocn.bkgerr_stddev.incr.{{ ATM_WINDOW_MIDDLE }}.nc'
output_filename: ./vt_scales.nc
output_variable_vt: vt
output_variable_hz: hz

VT_MIN: 5
VT_MAX: 15

HZ_ROSSBY_MULT: 1.0
HZ_MAX: 200e3
HZ_MIN_GRID_MULT: 2.0
Loading

0 comments on commit 5b464c6

Please sign in to comment.