-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adds recentering task script and methods, with ctests (#968)
Resolves #912 --------- Co-authored-by: Guillaume Vernieres <guillaume.vernieres@noaa.gov>
- Loading branch information
1 parent
82e16bb
commit d18b322
Showing
8 changed files
with
379 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
# This yaml is for applying deterministic recentering increments to the ensemble members | ||
|
||
geometry: | ||
mom6_input_nml: mom_input.nml | ||
fields metadata: ./fields_metadata.yaml | ||
|
||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
|
||
layers variable: [hocn] | ||
|
||
increment variables: [tocn, socn, uocn, vocn, ssh, hocn, cicen, hicen, hsnon] | ||
|
||
set increment variables to zero: [ssh] | ||
|
||
vertical geometry: | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
basename: ./INPUT/ | ||
ocn_filename: MOM.res.nc | ||
read_from_file: 3 | ||
|
||
add recentering increment: false | ||
|
||
soca increments: # Could also be states, but they are read as increments | ||
number of increments: {{ NMEM_ENS }} | ||
pattern: '%mem%' | ||
template: | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
basename: ./ens/ | ||
ocn_filename: 'ocean.%mem%.nc' | ||
ice_filename: 'ice.%mem%.nc' | ||
read_from_file: 3 | ||
|
||
steric height: | ||
linear variable changes: | ||
- linear variable change name: BalanceSOCA # Only the steric balance is applied | ||
|
||
#ensemble mean output: | ||
# datadir: ./static_ens | ||
# date: '{{ ATM_WINDOW_BEGIN }}' | ||
# exp: ens_mean | ||
# type: incr | ||
|
||
ssh output: | ||
unbalanced: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: ssh_unbal_stddev | ||
type: incr | ||
|
||
steric: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: ssh_steric_stddev | ||
type: incr | ||
|
||
total: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: ssh_total_stddev | ||
type: incr | ||
|
||
explained variance: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: steric_explained_variance | ||
type: incr | ||
|
||
recentering error: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: ssh_recentering_error | ||
type: incr | ||
|
||
background error output: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: bkgerr_stddev | ||
type: incr | ||
|
||
#linear variable change: | ||
# linear variable changes: | ||
# - linear variable change name: BkgErrFILT | ||
# ocean_depth_min: 500 # zero where ocean is shallower than 500m | ||
# rescale_bkgerr: 1.0 # rescale perturbation | ||
# efold_z: 1500.0 # Apply exponential decay | ||
# - linear variable change name: BalanceSOCA | ||
|
||
trajectory: | ||
state variables: [tocn, socn, uocn, vocn, ssh, hocn, layer_depth, mld, cicen, hicen, hsnon] | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
basename: ./INPUT/ | ||
ocn_filename: MOM.res.nc | ||
ice_filename: cice.res.nc | ||
read_from_file: 1 | ||
|
||
output increment: | ||
datadir: ./ | ||
date: '{{ ATM_WINDOW_BEGIN }}' | ||
exp: trash | ||
type: incr | ||
output file: 'ocn.recenter.incr.%mem%.nc' | ||
pattern: '%mem%' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env python3 | ||
# exgdas_global_marine_analysis_ecen.py | ||
# This script creates an MarineRecenter class | ||
# and runs the initialize, run, and finalize methods | ||
# which currently are stubs | ||
import os | ||
|
||
from wxflow import Logger, cast_strdict_as_dtypedict | ||
# TODO (AFE): change to from pygfs.task.marine_recenter import MarineRecenter | ||
from soca.marine_recenter import MarineRecenter | ||
|
||
# Initialize root logger | ||
logger = Logger(level='DEBUG', colored_log=True) | ||
|
||
|
||
if __name__ == '__main__': | ||
|
||
# Take configuration from environment and cast it as python dictionary | ||
config = cast_strdict_as_dtypedict(os.environ) | ||
|
||
# Instantiate the aerosol analysis task | ||
MarineRecen = MarineRecenter(config) | ||
MarineRecen.initialize() | ||
MarineRecen.run() | ||
MarineRecen.finalize() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.