Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions src/orca-jedi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ model/ModelBiasCovariance.h
model/ModelBias.h
model/ModelBiasIncrement.h
model/Model.h
norm/Norm.h
norm/Norm.cc
state/State.h
state/State.cc
nemo_io/NemoFieldReader.h
Expand Down
37 changes: 37 additions & 0 deletions src/orca-jedi/norm/Norm.cc
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/*
* (C) British Crown Copyright 2026 Met Office
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/

#include "orca-jedi/norm/Norm.h"

#include "eckit/exception/Exceptions.h"

namespace orcamodel {

Norm::Norm(const oops::Variables &,
const eckit::Configuration &,
const State &) {
throw eckit::NotImplemented(Here());
}

void Norm::apply(Increment &) const {
throw eckit::NotImplemented(Here());
}

void Norm::applyInverse(Increment &) const {
throw eckit::NotImplemented(Here());
}

const double Norm::computeNorm(const Increment &) const {
throw eckit::NotImplemented(Here());
return 0.0;
}

void Norm::print(std::ostream &) const {
throw eckit::NotImplemented(Here());
}

} // namespace orcamodel
43 changes: 43 additions & 0 deletions src/orca-jedi/norm/Norm.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
/*
* (C) British Crown Copyright 2026 Met Office
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*/

#pragma once

#include <string>

#include "eckit/config/Configuration.h"

#include "oops/base/Variables.h"
#include "oops/util/ObjectCounter.h"
#include "oops/util/Printable.h"

#include "orca-jedi/increment/Increment.h"
#include "orca-jedi/state/State.h"

namespace orcamodel {

class Norm : public util::Printable,
private util::ObjectCounter<Norm> {
public:
static const std::string classname() {return "orcamodel::Norm";}

// Constructor, destructor
Norm(const oops::Variables &,
const eckit::Configuration &,
const State &);
~Norm() = default;

// Apply norm to increment
void apply(Increment &) const;
void applyInverse(Increment &) const;
const double computeNorm(const Increment &) const;

private:
void print(std::ostream &) const override;
};

} // namespace orcamodel
2 changes: 2 additions & 0 deletions src/orca-jedi/utilities/OrcaModelTraits.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include "orca-jedi/model/ModelBias.h"
#include "orca-jedi/model/ModelBiasIncrement.h"
#include "orca-jedi/model/ModelBiasCovariance.h"
#include "orca-jedi/norm/Norm.h"
#include "orca-jedi/state/State.h"
#include "orca-jedi/utilities/ModelData.h"
#include "orca-jedi/variablechanges/VariableChange.h"
Expand All @@ -38,6 +39,7 @@ struct OrcaModelTraits {
typedef orcamodel::ModelBiasIncrement ModelAuxIncrement;
typedef orcamodel::ModelBiasCovariance ModelAuxCovariance;
typedef orcamodel::Model Model;
typedef orcamodel::Norm Norm;
typedef orcamodel::State State;
typedef orcamodel::LinearModel LinearModel;
typedef orcamodel::VariableChange VariableChange;
Expand Down