Skip to content

Commit

Permalink
Merge branch 'develop' into feature/add_marine_j2
Browse files Browse the repository at this point in the history
  • Loading branch information
guillaumevernieres authored Feb 26, 2025
2 parents dd3e170 + 7a418aa commit ad7058d
Show file tree
Hide file tree
Showing 45 changed files with 1,317 additions and 555 deletions.
13 changes: 11 additions & 2 deletions algorithm/marine/soca_2cice_global.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,20 @@ variable change:
sno_lev: 1
cice output:
restart: {{ ice_rst }}
increment output:
datadir: Data
exp: soca2cice
type: incr
date: '{{ fcst_begin }}'
soca increment:
read_from_file: 1
basename: ./
ocn_filename: {{ ocn_inc }}
ice_filename: {{ ice_inc }}
date: '{{ fcst_begin }}'
output variables:
- sea_water_potential_temperature
- sea_water_salinity
- sea_water_cell_thickness
- sea_ice_area_fraction
- sea_ice_thickness
- sea_ice_snow_thickness
Expand All @@ -47,7 +57,6 @@ states:
state variables:
- sea_water_potential_temperature
- sea_water_salinity
- sea_water_cell_thickness
- sea_ice_area_fraction
- sea_ice_thickness
- sea_ice_snow_thickness
Expand Down
33 changes: 33 additions & 0 deletions algorithm/marine/soca_chgres.yaml.j2
Original file line number Diff line number Diff line change
@@ -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 }}'
10 changes: 8 additions & 2 deletions algorithm/marine/soca_diagb.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -31,10 +36,11 @@ variables:
- mom6_mld

vertical e-folding scale: 500.0
min efold depth ratio: 3.0 # keep the e-folding scale at most
# 1/(min efold depth ratio) of the local depth
rescale: 1.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
min depth: 500.0 # zero out the bkg. error. at less than min depth
min depth: 50.0 # zero out the bkg. error. at less than min depth
number of halo points: 4
number of neighbors: 16

Expand Down
7 changes: 6 additions & 1 deletion algorithm/marine/soca_ensb.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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%'
24 changes: 15 additions & 9 deletions algorithm/marine/soca_ensweights.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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: ./
Expand Down
11 changes: 7 additions & 4 deletions algorithm/marine/soca_parameters_diffusion_hz.yaml.j2
Original file line number Diff line number Diff line change
@@ -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]

Expand Down
12 changes: 7 additions & 5 deletions algorithm/marine/soca_parameters_diffusion_vt.yaml.j2
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
7 changes: 4 additions & 3 deletions algorithm/marine/soca_setcorscales.yaml.j2
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -9,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: ./
Expand Down
6 changes: 3 additions & 3 deletions algorithm/marine/soca_vtscales.yaml.j2
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions algorithm/marine/socaincr2mom6.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 7 additions & 7 deletions algorithm/obstats/aero/viirs_n20_template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
obsdatain:
engine:
type: H5File
obsfile: {{ aero_obsdatain_path }}/diag_{{ obspace }}_{{ stat_current_cycle_YMDH }}.nc4
simulated variables: {{ aero_obsdatatin_simulated_variables }}
observed variables: {{ aero_obsdatain_observed_variables }}
variables: {{ aero_variables }}
groups to process: {{ aero_file_groups }}
qc groups: {{ aero_file_qc_groups }}
obsfile: {{ aero_obsdatain_path }}/aero/diag_{{ obspace }}_aod_{{ stat_current_cycle_YMDH }}.nc
simulated variables: ['aerosolOpticalDepth']
observed variables: ['aerosolOpticalDepth']
variables: ['aerosolOpticalDepth']
groups to process: ['ombg', 'oman']
qc groups: ['EffectiveQC0', 'EffectiveQC1']
statistics to compute: ['mean', 'count', 'RMS']
output file: "{{ obspace }}_{{ stat_current_cycle_YMDH }}_output_aod.nc"
domains to process:
- domain:
name: "nowhere"
name: "Global"
first mask variable: latitude
first mask range: [-180,-100]
- domain:
Expand Down
14 changes: 7 additions & 7 deletions algorithm/obstats/aero/viirs_npp_template.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
obsdatain:
engine:
type: H5File
obsfile: {{ aero_obsdatain_path }}/diag_{{ obspace }}_{{ stat_current_cycle_YMDH }}.nc4
simulated variables: {{ aero_obsdatatin_simulated_variables }}
observed variables: {{ aero_obsdatain_observed_variables }}
variables: {{ aero_variables }}
groups to process: {{ aero_file_groups }}
qc groups: {{ aero_file_qc_groups }}
obsfile: {{ aero_obsdatain_path }}/aero/diag_{{ obspace }}_aod_{{ stat_current_cycle_YMDH }}.nc
simulated variables: ['aerosolOpticalDepth']
observed variables: ['aerosolOpticalDepth']
variables: ['aerosolOpticalDepth']
groups to process: ['ombg', 'oman']
qc groups: ['EffectiveQC0', 'EffectiveQC1']
statistics to compute: ['mean', 'count', 'RMS']
output file: "{{ obspace }}_{{ stat_current_cycle_YMDH }}_output_aod.nc"
domains to process:
- domain:
name: "nowhere"
name: "Global"
first mask variable: latitude
first mask range: [-180,-100]
- domain:
Expand Down
47 changes: 47 additions & 0 deletions algorithm/obstats/snow/ims_snow_template.yaml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
- obs space:
name: ims_snow
obsdatain:
engine:
type: H5File
obsfile: {{ snow_obsdatain_path }}/snow/diag_{{ obspace }}_{{ stat_current_cycle_YMDH }}.nc
simulated variables: ['totalSnowDepth']
observed variables: ['totalSnowDepth']
statistics to compute: ['mean', 'count', 'RMS']
output file: "{{ obspace }}_{{ stat_current_cycle_YMDH }}_output_snow.nc"
domains to process:
- domain:
name: "Global"
first mask variable: latitude
first mask range: [-180,-100]
- domain:
name: "SH"
first mask variable: latitude
first mask range: [-90,0]
- domain:
name: "NH"
first mask variable: latitude
first mask range: [0,90]
- domain:
name: "CONUS"
first mask variable: latitude
first mask range: [25,49]
second mask variable: longitude
second mask range: [-125,-66]
- domain:
name: "Europe"
first mask variable: latitude
first mask range: [35,70]
second mask variable: longitude
second mask range: [-11,38]
- domain:
name: "Africa"
first mask variable: latitude
first mask range: [-35,37]
second mask variable: longitude
second mask range: [-17,52]
- domain:
name: "Asia"
first mask variable: latitude
first mask range: [0,70]
second mask variable: longitude
second mask range: [38, 180]
2 changes: 1 addition & 1 deletion algorithm/snow/snow_obs_staging.yaml.j2
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
mkdir:
- '{{snow_obsdatain_path}}'
copy:
copy_opt:
{% for observation_from_jcb in observations %}
{% if use_observer(observation_from_jcb) %}
{% if not observation_from_jcb == 'ims_snow' %}
Expand Down
2 changes: 1 addition & 1 deletion model/aero/aero_final_increment_gaussian.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ grid type: regular gaussian
local interpolator type: atlas interpolator
interpolation method:
type: finite-element
number of latitude gridpoints: {{ aero_npy_ges - 1 }}
number of latitude gridpoints: {{ aero_npy_anl - 1 }}
variables to output: [mass_fraction_of_sulfate_in_air,
mass_fraction_of_hydrophobic_black_carbon_in_air,
mass_fraction_of_hydrophilic_black_carbon_in_air,
Expand Down
3 changes: 2 additions & 1 deletion model/marine/marine_3dfgat_outer_loop_1.yaml.j2
Original file line number Diff line number Diff line change
@@ -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
7 changes: 0 additions & 7 deletions model/marine/marine_3dvar_outer_loop_1.yaml.j2

This file was deleted.

Loading

0 comments on commit ad7058d

Please sign in to comment.