diff --git a/parm/soca/berror/soca_ensb.yaml b/parm/soca/berror/soca_ensb.yaml index 0175cc0e6..814dfc7ac 100644 --- a/parm/soca/berror/soca_ensb.yaml +++ b/parm/soca/berror/soca_ensb.yaml @@ -69,10 +69,10 @@ background error output: 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: 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: diff --git a/scripts/exgdas_global_marine_analysis_bmat.sh b/scripts/exgdas_global_marine_analysis_bmat.sh index e83c97d8d..5cd52272d 100755 --- a/scripts/exgdas_global_marine_analysis_bmat.sh +++ b/scripts/exgdas_global_marine_analysis_bmat.sh @@ -123,7 +123,7 @@ fi # 3 - Copy h from deterministic to unbalanced perturbations # 4 - Compute moments of converted ensemble perturbations -# Process climatological ensemble +# Process static ensemble clean_yaml soca_clim_ens_moments.yaml $APRUN_OCNANAL $JEDI_BIN/gdas_ens_handler.x soca_ensb.yaml export err=$?; err_chk diff --git a/utils/soca/gdas_ens_handler.h b/utils/soca/gdas_ens_handler.h index bfd7b168a..9e3c97a63 100644 --- a/utils/soca/gdas_ens_handler.h +++ b/utils/soca/gdas_ens_handler.h @@ -1,7 +1,5 @@ #pragma once -#include - #include #include #include @@ -115,8 +113,8 @@ namespace gdasapp { // Get the steric variable change configuration eckit::LocalConfiguration stericVarChangeConfig; - fullConfig.get("steric variable change", stericVarChangeConfig); - + fullConfig.get("steric height", stericVarChangeConfig); + oops::Log::info() << "steric config 0000: " << stericVarChangeConfig << std::endl; // Initialize trajectories const eckit::LocalConfiguration trajConfig(fullConfig, "trajectory"); soca::State cycleTraj(geom, trajConfig); // trajectory of the cycle @@ -128,6 +126,9 @@ namespace gdasapp { soca::Increment deterministicError(geom, postProcIncr.socaIncrVar_, postProcIncr.dt_); deterministicError.diff(cycleTraj, meanTraj); eckit::LocalConfiguration sshRecErrOutputConfig(fullConfig, "ssh output.recentering error"); + deterministicError = postProcIncr.setToZero(deterministicError); + oops::Log::info() << "steric config : " << stericVarChangeConfig << std::endl; + postProcIncr.applyLinVarChange(deterministicError, stericVarChangeConfig, cycleTraj); oops::Log::info() << "ensemble mean: " << meanTraj << std::endl; oops::Log::info() << "deterministic: " << cycleTraj << std::endl; oops::Log::info() << "error: " << deterministicError << std::endl; @@ -159,7 +160,7 @@ namespace gdasapp { // Compute the original steric height perturbation from T and S eckit::LocalConfiguration stericConfig(fullConfig, "steric height"); - incr = postProcIncr.applyLinVarChange(incr, stericConfig, meanTraj); + postProcIncr.applyLinVarChange(incr, stericConfig, meanTraj); ssh_tmp = incr; sshSteric.push_back(ssh_tmp); @@ -179,7 +180,7 @@ namespace gdasapp { // Filter ensemble member and recompute ssh, recentering around the cycle's trajectory if ( fullConfig.has("linear variable change") ) { eckit::LocalConfiguration lvcConfig(fullConfig, "linear variable change"); - incr = postProcIncr.applyLinVarChange(incr, lvcConfig, cycleTraj); + postProcIncr.applyLinVarChange(incr, lvcConfig, cycleTraj); } // Save final perturbation, used in the offline EnVAR diff --git a/utils/soca/gdas_incr_handler.h b/utils/soca/gdas_incr_handler.h index 744a89cd5..3abd34f5b 100644 --- a/utils/soca/gdas_incr_handler.h +++ b/utils/soca/gdas_incr_handler.h @@ -1,7 +1,5 @@ #pragma once -#include - #include #include #include @@ -65,7 +63,7 @@ namespace gdasapp { if ( fullConfig.has("linear variable change") ) { soca::State traj = postProcIncr.getTraj(fullConfig, geom); eckit::LocalConfiguration lvcConfig(fullConfig, "linear variable change"); - incrWithLayer = postProcIncr.applyLinVarChange(incrWithLayer, lvcConfig, traj); + postProcIncr.applyLinVarChange(incrWithLayer, lvcConfig, traj); } // Save final increment diff --git a/utils/soca/gdas_postprocincr.h b/utils/soca/gdas_postprocincr.h index dad3d766b..45993d2b5 100644 --- a/utils/soca/gdas_postprocincr.h +++ b/utils/soca/gdas_postprocincr.h @@ -95,7 +95,7 @@ class PostProcIncr { // Append layer thicknesses to increment // TODO(guillaume): There's got to be a better way to append a variable. - soca::Increment appendLayer(soca::Increment socaIncr) { + soca::Increment appendLayer(soca::Increment& socaIncr) { oops::Log::info() << "==========================================" << std::endl; oops::Log::info() << "====== Append Layers" << std::endl; @@ -129,7 +129,7 @@ class PostProcIncr { // ----------------------------------------------------------------------------- // Set specified variables to 0 - soca::Increment setToZero(soca::Increment socaIncr) { + soca::Increment setToZero(soca::Increment& socaIncr) { oops::Log::info() << "==========================================" << std::endl; if (!this->setToZero_) { oops::Log::info() << "====== no variables to set to 0.0" << std::endl; @@ -161,22 +161,22 @@ class PostProcIncr { // ----------------------------------------------------------------------------- // Apply linear variable changes - soca::Increment applyLinVarChange(soca::Increment socaIncr, - const eckit::LocalConfiguration lvcConfig, - const soca::State xTraj) { + void applyLinVarChange(soca::Increment& socaIncr, + const eckit::LocalConfiguration& lvcConfig, + const soca::State& xTraj) { oops::Log::info() << "==========================================" << std::endl; oops::Log::info() << "====== applying specified change of variables" << std::endl; soca::LinearVariableChange lvc(this->geom_, lvcConfig); lvc.changeVarTraj(xTraj, socaIncrVar_); lvc.changeVarTL(socaIncr, socaIncrVar_); - - return socaIncr; + oops::Log::info() << "$%^#& in var change:" << socaIncr << std::endl; + //return socaIncr; } // ----------------------------------------------------------------------------- // Save increment - int save(soca::Increment socaIncr, int ensMem = 1) { + int save(soca::Increment& socaIncr, int ensMem = 1) { oops::Log::info() << "==========================================" << std::endl; oops::Log::info() << "-------------------- save increment: " << std::endl; socaIncr.write(outputIncrConfig_); diff --git a/utils/soca/gdas_socahybridweights.h b/utils/soca/gdas_socahybridweights.h index c0a3dc927..adf20188a 100644 --- a/utils/soca/gdas_socahybridweights.h +++ b/utils/soca/gdas_socahybridweights.h @@ -1,7 +1,5 @@ #pragma once -#include - #include #include #include