diff --git a/parm/aero/berror/aero_diagb.yaml.j2 b/parm/aero/berror/aero_diagb.yaml.j2 index 31cf00b34..a2b0ea95f 100644 --- a/parm/aero/berror/aero_diagb.yaml.j2 +++ b/parm/aero/berror/aero_diagb.yaml.j2 @@ -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: diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 703d4841f..10fc6b5fe 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -230,13 +230,27 @@ namespace gdasapp { } } - // Rescale - if (fullConfig.has("rescale")) { - double rescale; - fullConfig.get("rescale", rescale); - util::multiplyFieldSet(bkgErrFs, rescale); + // 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 @@ -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();