From 46b37ba7f953f7ec48f91c7d450b45a5279dc8e6 Mon Sep 17 00:00:00 2001 From: Anna Shlyaeva Date: Fri, 21 Feb 2025 05:52:50 -0700 Subject: [PATCH] Add options to inflate the ensemble while recentering (#1501) # Description Adds code to the ensemble recentering to optionally inflate/deflate the ensemble variance by either a scalar (same for all variables) or a field from the file (has to be specified for all variables). This is not exercised yet, since we don't know the parameters of inflation/deflation yet, but I tested with both options to check whether it behaves as expected. Note: in the future refactoring we should switch to oops::Inflation that provides several different inflation options. # Issues Related to #1496 (doesn't fix yet since we need to decide what parameters to use this with) # Automated CI tests to run in Global Workflow - [ ] atm_jjob - [ ] C96C48_ufs_hybatmDA - [ ] C96C48_hybatmaerosnowDA - [ ] C48mx500_3DVarAOWCDA - [x] C48mx500_hybAOWCDA - [ ] C96C48_hybatmDA --------- Co-authored-by: Anna Shlyaeva Co-authored-by: Guillaume Vernieres --- utils/soca/gdas_ens_handler.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/utils/soca/gdas_ens_handler.h b/utils/soca/gdas_ens_handler.h index d3f22d15f..4674c392d 100644 --- a/utils/soca/gdas_ens_handler.h +++ b/utils/soca/gdas_ens_handler.h @@ -170,6 +170,22 @@ namespace gdasapp { // Set variables to zero if specified in the configuration postProcIncr.setToZero(incr); + // Optionally apply inflation + if (fullConfig.has("ensemble inflation.value")) { + const double inflation = fullConfig.getDouble("ensemble inflation.value"); + mom6_incr *= inflation; + oops::Log::info() << "incr after scalar inflation " << i << ":" + << mom6_incr << std::endl; + } + if (fullConfig.has("ensemble inflation.field")) { + soca::Increment weight(geomOut, mom6_incr.variables(), mom6_incr.validTime()); + const eckit::LocalConfiguration weightConf(fullConfig, "ensemble inflation.field"); + weight.read(weightConf); + mom6_incr.schur_product_with(weight); + oops::Log::info() << "incr after field inflation " << i << ":" + << mom6_incr << std::endl; + } + // Save the increments used to initialize the ensemble forecast result = postProcIncr.save(mom6_incr, i+1);