From 94160f8663897789a81fe9f10ec9426486df26d0 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Fri, 18 Oct 2024 18:20:51 +0000 Subject: [PATCH 01/11] Changes to chem_diagb.h to allow for variable rescaling for different aerosol species. Does not yet include a way to read the values in from a yaml or config file. --- utils/chem/chem_diagb.h | 65 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 61 insertions(+), 4 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 703d4841f..3e596ce11 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -130,6 +130,12 @@ namespace gdasapp { atlas::FieldSet bkgErrFs; bkgErr.toFieldSet(bkgErrFs); + // print chemVars + auto vars = chemVars.variables(); // Call the function and store the returned value + for (size_t i = 0; i < vars.size(); ++i) { + std::cout << "Species " << i + 1 << ": " << vars[i] << std::endl; + } + // Loop through variables for (auto & var : chemVars.variables()) { nodeColumns.haloExchange(xbFs[var]); @@ -230,15 +236,66 @@ namespace gdasapp { } } + std::cout << "Number of variables in chemVars: " << chemVars.size() << std::endl; + + for (size_t i = 0; i < chemVars.size(); ++i) { + std::cout << "Variable " << i << ": " << chemVars[i].name() << std::endl; +} + // Rescale + // if (fullConfig.has("rescale")) { - double rescale; - fullConfig.get("rescale", rescale); - util::multiplyFieldSet(bkgErrFs, rescale); - } + // Define rescaling factors for each species + std::vector rescaleFactors = {.5, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0}; + + + for (size_t k = 0; k < bkgErrFs.size(); ++k) { + std::cout << "Field " << k << ": " << bkgErrFs.field(k).name() << std::endl; +} + + std:: cout << "before Loop through the variables i= "; + // Loop through the variables and apply the appropriate rescaling factor + for (size_t i = 0; i < chemVars.size(); ++i) { + std:: cout << "i = " << i << std::endl; + const std::string &variableName = chemVars[i].name(); // Use name() to get the variable's name as a string + std:: cout << " before atlas::Field "; + atlas::Field &field = bkgErrFs.field(variableName); // Get the field by name + std:: cout << "before Access the field data" ; + // Get the number of dimensions + int rank = field.rank(); + std::cout << "Field " << variableName << " has " << rank << " dimensions." << std::endl; + + // Access the field data based on its dimensions + if (rank == 1) { + auto data = atlas::array::make_view(field); + // Apply the rescaling factor element-wise + for (size_t j = 0; j < data.size(); ++j) { + data(j) *= rescaleFactors[i]; + } + } else if (rank == 2) { + auto data = atlas::array::make_view(field); + // Apply the rescaling factor for 2D field element-wise + for (size_t j = 0; j < data.shape(0); ++j) { + for (size_t k = 0; k < data.shape(1); ++k) { + data(j, k) *= rescaleFactors[i]; + } + } + } else { + std::cerr << "Unsupported field rank: " << rank << std::endl; + } + + } + } + + std:: cout << "Number of variables in chemVars: " << chemVars.size() << std::endl; + std:: cout << " before bkgErr.fromFieldSet"; bkgErr.fromFieldSet(bkgErrFs); + std:: cout << "after rescaling"; + std:: cout << "Number of variables in chemVars: " << chemVars.size() << std::endl; + + std:: cout << "size of bkgErrFs " << bkgErrFs.size() << std::endl; // Hybrid B option if (fullConfig.has("climate background error")) { const eckit::LocalConfiguration ClimBConfig(fullConfig, "climate background error"); From 18de78fe6628d0cf50e85aa1344bb3d7baad76c5 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Mon, 21 Oct 2024 14:28:20 +0000 Subject: [PATCH 02/11] Added read for global rescaling file in chem_diagb.h --- utils/chem/chem_diagb.h | 75 ++++++++--------------------------------- 1 file changed, 14 insertions(+), 61 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 3e596ce11..92281f7fe 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -78,6 +78,16 @@ namespace gdasapp { oops::Log::info() << "Background:" << std::endl; oops::Log::info() << xb << std::endl; + /// Read the global rescaling file + //------------------------------- + fv3jedi::State xrs(geom, chemVars); + const eckit::LocalConfiguration bkgConfig(fullConfig, "background"); + xrs.read(bkgConfig); + atlas::FieldSet xrsFs; + xb.toFieldSet(xrsFs); + oops::Log::info() << "global rescaling coefficients:" << std::endl; + oops::Log::info() << xrs << std::endl; + /// Create the mesh connectivity (Copy/paste of Francois's stuff) // -------------------------------------------------------------- // Build edges, then connections between nodes and edges @@ -130,12 +140,6 @@ namespace gdasapp { atlas::FieldSet bkgErrFs; bkgErr.toFieldSet(bkgErrFs); - // print chemVars - auto vars = chemVars.variables(); // Call the function and store the returned value - for (size_t i = 0; i < vars.size(); ++i) { - std::cout << "Species " << i + 1 << ": " << vars[i] << std::endl; - } - // Loop through variables for (auto & var : chemVars.variables()) { nodeColumns.haloExchange(xbFs[var]); @@ -236,66 +240,15 @@ namespace gdasapp { } } - std::cout << "Number of variables in chemVars: " << chemVars.size() << std::endl; - - for (size_t i = 0; i < chemVars.size(); ++i) { - std::cout << "Variable " << i << ": " << chemVars[i].name() << std::endl; -} - // Rescale - // if (fullConfig.has("rescale")) { - // Define rescaling factors for each species - std::vector rescaleFactors = {.5, 1.0, 1.0, 1.0, 1.0, 2.0, 2.0, 2.0, 2.0, 2.0, 1.0, 1.0, 1.0, 1.0}; - - - for (size_t k = 0; k < bkgErrFs.size(); ++k) { - std::cout << "Field " << k << ": " << bkgErrFs.field(k).name() << std::endl; -} - - std:: cout << "before Loop through the variables i= "; - // Loop through the variables and apply the appropriate rescaling factor - for (size_t i = 0; i < chemVars.size(); ++i) { - std:: cout << "i = " << i << std::endl; - const std::string &variableName = chemVars[i].name(); // Use name() to get the variable's name as a string - std:: cout << " before atlas::Field "; - atlas::Field &field = bkgErrFs.field(variableName); // Get the field by name - std:: cout << "before Access the field data" ; - // Get the number of dimensions - int rank = field.rank(); - std::cout << "Field " << variableName << " has " << rank << " dimensions." << std::endl; - - // Access the field data based on its dimensions - if (rank == 1) { - auto data = atlas::array::make_view(field); - // Apply the rescaling factor element-wise - for (size_t j = 0; j < data.size(); ++j) { - data(j) *= rescaleFactors[i]; - } - } else if (rank == 2) { - auto data = atlas::array::make_view(field); - // Apply the rescaling factor for 2D field element-wise - for (size_t j = 0; j < data.shape(0); ++j) { - for (size_t k = 0; k < data.shape(1); ++k) { - data(j, k) *= rescaleFactors[i]; - } - } - } else { - std::cerr << "Unsupported field rank: " << rank << std::endl; - } - - } - } - - std:: cout << "Number of variables in chemVars: " << chemVars.size() << std::endl; - std:: cout << " before bkgErr.fromFieldSet"; + double rescale; + fullConfig.get("rescale", rescale); + util::multiplyFieldSet(bkgErrFs, rescale); + } bkgErr.fromFieldSet(bkgErrFs); - std:: cout << "after rescaling"; - std:: cout << "Number of variables in chemVars: " << chemVars.size() << std::endl; - - std:: cout << "size of bkgErrFs " << bkgErrFs.size() << std::endl; // Hybrid B option if (fullConfig.has("climate background error")) { const eckit::LocalConfiguration ClimBConfig(fullConfig, "climate background error"); From 6e5a6cc456f24c125740f5dbd914ffd77a2a71e2 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Mon, 21 Oct 2024 15:00:08 +0000 Subject: [PATCH 03/11] Initial try for global rescaling field in chem_diagb.h --- utils/chem/chem_diagb.h | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 92281f7fe..58a52c0de 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -78,16 +78,6 @@ namespace gdasapp { oops::Log::info() << "Background:" << std::endl; oops::Log::info() << xb << std::endl; - /// Read the global rescaling file - //------------------------------- - fv3jedi::State xrs(geom, chemVars); - const eckit::LocalConfiguration bkgConfig(fullConfig, "background"); - xrs.read(bkgConfig); - atlas::FieldSet xrsFs; - xb.toFieldSet(xrsFs); - oops::Log::info() << "global rescaling coefficients:" << std::endl; - oops::Log::info() << xrs << std::endl; - /// Create the mesh connectivity (Copy/paste of Francois's stuff) // -------------------------------------------------------------- // Build edges, then connections between nodes and edges @@ -241,11 +231,23 @@ namespace gdasapp { } // Rescale - if (fullConfig.has("rescale")) { - double rescale; - fullConfig.get("rescale", rescale); - util::multiplyFieldSet(bkgErrFs, rescale); - } +// if (fullConfig.has("rescale")) { +// double rescale; +// fullConfig.get("rescale", rescale); +// util::multiplyFieldSet(bkgErrFs, rescale); +// } + // Rescale + if (fullConfig.has("globalRescale")) { + fv3jedi::State global_rescale(geom, chemVars); + const eckit::LocalConfiguration bkgConfig(fullConfig, "rescale"); + global_rescale.read(bkgConfig); + atlas::FieldSet grsFs; + global_rescale.toFieldSet(xrsFs); + oops::Log::info() << "global rescaling coefficients:" << std::endl; + oops::Log::info() << grsFs << std::endl; + util::multiplyFieldSet(bkgErrFS, xrsFs) + + bkgErr.fromFieldSet(bkgErrFs); From 5ad73a4587efef1e2f28f331cf87e5531c18b6bd Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Mon, 21 Oct 2024 19:51:43 +0000 Subject: [PATCH 04/11] Updated chem_diagb.h and aero_diagb.yaml.j2 to read in rescale file and multply with stddev file. --- parm/aero/berror/aero_diagb.yaml.j2 | 7 ++++++- utils/chem/chem_diagb.h | 30 ++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/parm/aero/berror/aero_diagb.yaml.j2 b/parm/aero/berror/aero_diagb.yaml.j2 index 31cf00b34..537238ac3 100644 --- a/parm/aero/berror/aero_diagb.yaml.j2 +++ b/parm/aero/berror/aero_diagb.yaml.j2 @@ -76,7 +76,12 @@ 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: + filetype: fms restart + 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 58a52c0de..7ee9c8dbf 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -78,6 +78,11 @@ namespace gdasapp { oops::Log::info() << "Background:" << std::endl; oops::Log::info() << xb << std::endl; + /// Read the global rescale + //-------------------------- + oops::Log::info() << "=================== read global rescale" << std::endl; + fv3jedi:: + /// Create the mesh connectivity (Copy/paste of Francois's stuff) // -------------------------------------------------------------- // Build edges, then connections between nodes and edges @@ -230,22 +235,17 @@ namespace gdasapp { } } - // Rescale -// if (fullConfig.has("rescale")) { -// double rescale; -// fullConfig.get("rescale", rescale); -// util::multiplyFieldSet(bkgErrFs, rescale); -// } // Rescale - if (fullConfig.has("globalRescale")) { - fv3jedi::State global_rescale(geom, chemVars); - const eckit::LocalConfiguration bkgConfig(fullConfig, "rescale"); - global_rescale.read(bkgConfig); - atlas::FieldSet grsFs; - global_rescale.toFieldSet(xrsFs); - oops::Log::info() << "global rescaling coefficients:" << std::endl; - oops::Log::info() << grsFs << std::endl; - util::multiplyFieldSet(bkgErrFS, xrsFs) + if (fullConfig.has("global rescale")) { + fv3jedi::State global_rescale(geom, chemVars); + const eckit::LocalConfiguration GlobalRescaleConfig(fullConfig, "global rescale"); + global_rescale.read(GlobalRescaleConfig); + atlas::FieldSet grsFs; + global_rescale.toFieldSet(xrsFs); + oops::Log::info() << "global rescaling coefficients:" << std::endl; + oops::Log::info() << grsFs << std::endl; + util::multiplyFieldSets(bkgErrFS, xrsFs) + } From c8d41b1d4a3b4ccba4c3be58ee14d149aaa0e91a Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Tue, 22 Oct 2024 16:40:52 +0000 Subject: [PATCH 05/11] Changes to chem_diagb.h to multiply by rescaling file --- utils/chem/chem_diagb.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 7ee9c8dbf..9b6383a82 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -80,8 +80,8 @@ namespace gdasapp { /// Read the global rescale //-------------------------- - oops::Log::info() << "=================== read global rescale" << std::endl; - fv3jedi:: +// oops::Log::info() << "=================== read global rescale" << std::endl; +// fv3jedi:: /// Create the mesh connectivity (Copy/paste of Francois's stuff) // -------------------------------------------------------------- @@ -237,14 +237,14 @@ namespace gdasapp { // Rescale if (fullConfig.has("global rescale")) { - fv3jedi::State global_rescale(geom, chemVars); + fv3jedi::State global_rescale(geom, chemVars,cycleDate); const eckit::LocalConfiguration GlobalRescaleConfig(fullConfig, "global rescale"); global_rescale.read(GlobalRescaleConfig); - atlas::FieldSet grsFs; + atlas::FieldSet xrsFs; global_rescale.toFieldSet(xrsFs); oops::Log::info() << "global rescaling coefficients:" << std::endl; - oops::Log::info() << grsFs << std::endl; - util::multiplyFieldSets(bkgErrFS, xrsFs) + oops::Log::info() << xrsFs << std::endl; + util::multiplyFieldSets(bkgErrFs, xrsFs); } From 35eef0e434412badabfca9eb4bd6539ea7e16514 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Thu, 24 Oct 2024 16:58:53 +0000 Subject: [PATCH 06/11] Updates to make global rescaling work. --- parm/aero/berror/aero_diagb.yaml.j2 | 22 ++++++++++++++++++---- utils/chem/chem_diagb.h | 28 ++++++++++++++++++++++++---- 2 files changed, 42 insertions(+), 8 deletions(-) diff --git a/parm/aero/berror/aero_diagb.yaml.j2 b/parm/aero/berror/aero_diagb.yaml.j2 index 537238ac3..a2b0ea95f 100644 --- a/parm/aero/berror/aero_diagb.yaml.j2 +++ b/parm/aero/berror/aero_diagb.yaml.j2 @@ -77,10 +77,24 @@ variables: - mass_fraction_of_sea_salt004_in_air global rescale: - filetype: fms restart - dateapath: ./stddev - filename_trcr: rescale.fv_tracer.res.nc - filename_cplr: rescale.coupler.res + 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 }} diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 9b6383a82..ca79c4b30 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -237,11 +237,30 @@ namespace gdasapp { // Rescale if (fullConfig.has("global rescale")) { - fv3jedi::State global_rescale(geom, chemVars,cycleDate); - const eckit::LocalConfiguration GlobalRescaleConfig(fullConfig, "global rescale"); - global_rescale.read(GlobalRescaleConfig); + const eckit::LocalConfiguration GlobalRescaleConfig(fullConfig, "global rescale"); +// fv3jedi::State global_rescale(rescaleGeom, chemVars,cycleDate); +// fv3jedi::State global_rescale_interp(geom, chemVars, cycleDate); + 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"); + // Get the 'datapath' and 'filename_trcr' from the YAML configuration + std::string datapath, filename_trcr; + GlobalRescaleStdConfig.get("datapath", datapath); + GlobalRescaleStdConfig.get("filename_trcr", filename_trcr); + + // Combine the path and filename to get the full file path + std::string fullPath = datapath + filename_trcr; + + // Print out the full path to verify + std::cout << "Attempting to read the global rescale file from: " << fullPath << std::endl; + + global_rescale.read(GlobalRescaleStdConfig); + // interpolate to background resolution + fv3jedi::Increment global_rescale_interp(geom, global_rescale); atlas::FieldSet xrsFs; - global_rescale.toFieldSet(xrsFs); + global_rescale_interp.toFieldSet(xrsFs); oops::Log::info() << "global rescaling coefficients:" << std::endl; oops::Log::info() << xrsFs << std::endl; util::multiplyFieldSets(bkgErrFs, xrsFs); @@ -286,6 +305,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(); From f0be7ba57a6e6e10b930ef7d3b9669a39dc15d66 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Wed, 20 Nov 2024 17:13:37 +0000 Subject: [PATCH 07/11] Fixed coding norm errors --- utils/chem/chem_diagb.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index ca79c4b30..9f04c995a 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -235,16 +235,14 @@ namespace gdasapp { } } - // Rescale + // Rescale if (fullConfig.has("global rescale")) { - const eckit::LocalConfiguration GlobalRescaleConfig(fullConfig, "global rescale"); -// fv3jedi::State global_rescale(rescaleGeom, chemVars,cycleDate); -// fv3jedi::State global_rescale_interp(geom, chemVars, cycleDate); - const eckit::LocalConfiguration GlobalRescaleGeomConfig(GlobalRescaleConfig,"geometry"); + 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.zero(); + const eckit::LocalConfiguration GlobalRescaleStdConfig(GlobalRescaleConfig, "rescale stddev"); // Get the 'datapath' and 'filename_trcr' from the YAML configuration std::string datapath, filename_trcr; GlobalRescaleStdConfig.get("datapath", datapath); @@ -257,8 +255,8 @@ namespace gdasapp { std::cout << "Attempting to read the global rescale file from: " << fullPath << std::endl; global_rescale.read(GlobalRescaleStdConfig); - // interpolate to background resolution - fv3jedi::Increment global_rescale_interp(geom, global_rescale); + // 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; From 8c6d54f1b000ea7aedece52990facc4e34ecfc3b Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Wed, 20 Nov 2024 17:16:52 +0000 Subject: [PATCH 08/11] More coding norm fixes. --- utils/chem/chem_diagb.h | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 9f04c995a..9ca2bcba9 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -240,10 +240,11 @@ namespace gdasapp { 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); + fv3jedi::Increment global_rescale(GlobalRescaleGeom, chemVars, cycleDate); global_rescale.zero(); - const eckit::LocalConfiguration GlobalRescaleStdConfig(GlobalRescaleConfig, "rescale stddev"); - // Get the 'datapath' and 'filename_trcr' from the YAML configuration + const eckit::LocalConfiguration GlobalRescaleStdConfig(GlobalRescaleConfig, + "rescale stddev"); + // Get the 'datapath' and 'filename_trcr' from the YAML configuration std::string datapath, filename_trcr; GlobalRescaleStdConfig.get("datapath", datapath); GlobalRescaleStdConfig.get("filename_trcr", filename_trcr); From 0dcd51a0e686c3b63fca60862391229d3fa34425 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Wed, 20 Nov 2024 17:18:35 +0000 Subject: [PATCH 09/11] tab removed --- utils/chem/chem_diagb.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 9ca2bcba9..03dfed80b 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -243,7 +243,7 @@ namespace gdasapp { fv3jedi::Increment global_rescale(GlobalRescaleGeom, chemVars, cycleDate); global_rescale.zero(); const eckit::LocalConfiguration GlobalRescaleStdConfig(GlobalRescaleConfig, - "rescale stddev"); + "rescale stddev"); // Get the 'datapath' and 'filename_trcr' from the YAML configuration std::string datapath, filename_trcr; GlobalRescaleStdConfig.get("datapath", datapath); From 7664109775a8ca9bc78c24f0b3d716c706bf890c Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Wed, 20 Nov 2024 18:02:30 +0000 Subject: [PATCH 10/11] removed uneeded lines. --- utils/chem/chem_diagb.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 03dfed80b..23995f0da 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -78,11 +78,6 @@ namespace gdasapp { oops::Log::info() << "Background:" << std::endl; oops::Log::info() << xb << std::endl; - /// Read the global rescale - //-------------------------- -// oops::Log::info() << "=================== read global rescale" << std::endl; -// fv3jedi:: - /// Create the mesh connectivity (Copy/paste of Francois's stuff) // -------------------------------------------------------------- // Build edges, then connections between nodes and edges From 17ef5a2e56c3133ef31611443e74a71dd86b2084 Mon Sep 17 00:00:00 2001 From: "Andrew.Tangborn" Date: Wed, 20 Nov 2024 18:21:51 +0000 Subject: [PATCH 11/11] Removed lines to write out filename_trcr --- utils/chem/chem_diagb.h | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/utils/chem/chem_diagb.h b/utils/chem/chem_diagb.h index 23995f0da..10fc6b5fe 100644 --- a/utils/chem/chem_diagb.h +++ b/utils/chem/chem_diagb.h @@ -239,17 +239,6 @@ namespace gdasapp { global_rescale.zero(); const eckit::LocalConfiguration GlobalRescaleStdConfig(GlobalRescaleConfig, "rescale stddev"); - // Get the 'datapath' and 'filename_trcr' from the YAML configuration - std::string datapath, filename_trcr; - GlobalRescaleStdConfig.get("datapath", datapath); - GlobalRescaleStdConfig.get("filename_trcr", filename_trcr); - - // Combine the path and filename to get the full file path - std::string fullPath = datapath + filename_trcr; - - // Print out the full path to verify - std::cout << "Attempting to read the global rescale file from: " << fullPath << std::endl; - global_rescale.read(GlobalRescaleStdConfig); // interpolate to background resolution fv3jedi::Increment global_rescale_interp(geom, global_rescale);