Skip to content

Commit

Permalink
Debug OOPS apps
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidNew-NOAA committed Dec 30, 2024
1 parent 2e7bdeb commit 5e14753
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion utils/fv3jedi/fv3jedi_ecen.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace gdasapp {
: Application(comm) {}
static const std::string classname() {return "gdasapp::ecen";}

int execute(const eckit::Configuration & fullConfig, bool validate) const {
int execute(const eckit::Configuration & fullConfig) const {
// Get analysis parameters
std::vector<std::string> fcstHours;
std::string windowBeginStr;
Expand Down
24 changes: 12 additions & 12 deletions utils/fv3jedi/fv3jedi_fv3inc.h
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,13 @@ namespace gdasapp {
// ---------------------------------------------------------------------------------

// Setup geometries
const fv3jedi::Geometry stateGeom(stateGeomConfig, this->getComm());
const fv3jedi::Geometry jediIncrGeom(jediIncrGeomConfig, this->getComm());
const fv3jedi::Geometry fv3IncrGeom(fv3IncrGeomConfig, this->getComm());
const oops::Geometry<fv3jedi::Traits> stateGeom(stateGeomConfig, this->getComm());
const oops::Geometry<fv3jedi::Traits> jediIncrGeom(jediIncrGeomConfig, this->getComm());
const oops::Geometry<fv3jedi::Traits> fv3IncrGeom(fv3IncrGeomConfig, this->getComm());

// Setup variable change
std::unique_ptr<fv3jedi::VariableChange> vc;
vc.reset(new fv3jedi::VariableChange(varChangeConfig, stateGeom));
std::unique_ptr<oops::VariableChange<fv3jedi::Traits>> vc;
vc.reset(new oops::VariableChange<fv3jedi::Traits>(varChangeConfig, stateGeom));

// Loop through ensemble member
// ---------------------------------------------------------------------------------
Expand All @@ -113,10 +113,10 @@ namespace gdasapp {
const eckit::LocalConfiguration anlOuputConfig(membersConfig[imem], "analysis to structured grid");

// Read background state
fv3jedi::State xxBkg(stateGeom, stateInputConfig);
oops::State<fv3jedi::Traits> xxBkg(stateGeom, stateInputConfig);

// Read JEDI increment
fv3jedi::Increment dxJEDI(jediIncrGeom, jediIncrVars, xxBkg.validTime());
oops::Increment<fv3jedi::Traits> dxJEDI(jediIncrGeom, jediIncrVars, xxBkg.validTime());
dxJEDI.read(jediIncrInputConfig);

// Testing output for inputs
Expand All @@ -134,15 +134,15 @@ namespace gdasapp {
// ---------------------------------------------------------------------------------

// Add JEDI increment to background to get analysis
fv3jedi::State xxAnl(stateGeom, xxBkg);
oops::State<fv3jedi::Traits> xxAnl(stateGeom, xxBkg);
xxAnl += dxJEDI;

// Perform variables change on background and analysis
vc->changeVar(xxBkg, varChangeIncrVars);
vc->changeVar(xxAnl, varChangeIncrVars);

// Get FV3 increment by subtracting background and analysis after variable change
fv3jedi::Increment dxFV3(fv3IncrGeom, fv3IncrVars, xxBkg.validTime());
oops::Increment<fv3jedi::Traits> dxFV3(fv3IncrGeom, fv3IncrVars, xxBkg.validTime());
dxFV3.diff(xxAnl, xxBkg);

// Put JEDI increment fields not created by variable change into FV3 increment
Expand Down Expand Up @@ -182,9 +182,9 @@ namespace gdasapp {
dxFV3.write(fv3IncrOuputConfig);

// Write analysis
// const oops::StructuredGridWriter<fv3jedi::Traits> analysis(anlOuputConfig, xxAnl.geometry());
const oops::Geometry<fv3jedi::Traits> foo(stateGeomConfig, this->getComm());
const oops::StructuredGridWriter<fv3jedi::Traits> analysis(anlOuputConfig, foo);
const oops::StructuredGridWriter<fv3jedi::Traits> analysis(anlOuputConfig, xxAnl.geometry());
// const oops::Geometry<fv3jedi::Traits> foo(stateGeomConfig, this->getComm());
// const oops::StructuredGridWriter<fv3jedi::Traits> analysis(anlOuputConfig, foo);
analysis.interpolateAndWrite(xxAnl);
}

Expand Down

0 comments on commit 5e14753

Please sign in to comment.