Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add variable rescaling for aerosol species #1339

Merged
merged 18 commits into from
Nov 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
18 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion parm/aero/berror/aero_diagb.yaml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,26 @@ variables:
- mass_fraction_of_sea_salt003_in_air
- mass_fraction_of_sea_salt004_in_air

rescale: {{ aero_diagb_rescale }} # rescales the filtered std. dev. by "rescale"
global rescale:
geometry:
fms initialization:
namelist filename: ./fv3jedi/fmsmpp.nml
field table filename: ./fv3jedi/field_table
akbk: ./fv3jedi/akbk.nc4
layout:
- {{ layout_x }}
- {{ layout_y }}
nxp: {{ npx_rescale }}
npy: {{ npy_rescale }}
npz: {{ npz_ges }}
field metadata override: ./fv3jedi/fv3jedi_fieldmetadata_restart.yaml
rescale stddev:
filetype: fms restart
skip coupler file: true
dateapath: ./stddev
filename_trcr: rescale.fv_tracer.res.nc
filename_cplr: rescale.coupler.res

number of halo points: {{ aero_diagb_n_halo }}
number of neighbors: {{ aero_diagb_n_neighbors }}
simple smoothing:
Expand Down
25 changes: 20 additions & 5 deletions utils/chem/chem_diagb.h
Original file line number Diff line number Diff line change
Expand Up @@ -230,13 +230,27 @@ namespace gdasapp {
}
}

// Rescale
if (fullConfig.has("rescale")) {
double rescale;
fullConfig.get("rescale", rescale);
util::multiplyFieldSet(bkgErrFs, rescale);
CoryMartin-NOAA marked this conversation as resolved.
Show resolved Hide resolved
// Rescale
if (fullConfig.has("global rescale")) {
const eckit::LocalConfiguration GlobalRescaleConfig(fullConfig, "global rescale");
const eckit::LocalConfiguration GlobalRescaleGeomConfig(GlobalRescaleConfig, "geometry");
const fv3jedi::Geometry GlobalRescaleGeom(GlobalRescaleGeomConfig, this-> getComm());
fv3jedi::Increment global_rescale(GlobalRescaleGeom, chemVars, cycleDate);
global_rescale.zero();
const eckit::LocalConfiguration GlobalRescaleStdConfig(GlobalRescaleConfig,
"rescale stddev");
global_rescale.read(GlobalRescaleStdConfig);
// interpolate to background resolution
fv3jedi::Increment global_rescale_interp(geom, global_rescale);
atlas::FieldSet xrsFs;
global_rescale_interp.toFieldSet(xrsFs);
oops::Log::info() << "global rescaling coefficients:" << std::endl;
oops::Log::info() << xrsFs << std::endl;
util::multiplyFieldSets(bkgErrFs, xrsFs);
}



bkgErr.fromFieldSet(bkgErrFs);

// Hybrid B option
Expand Down Expand Up @@ -274,6 +288,7 @@ namespace gdasapp {
double rescale_staticb;
ClimBConfig.get("staticb rescaling factor", rescale_staticb);


// Combine diagb and climatological background errors
fv3jedi::Increment stddev_hybrid(geom, chemVars, cycleDate);
stddev_hybrid.zero();
Expand Down
Loading