13 #include "eckit/config/LocalConfiguration.h"
14 #include "eckit/exception/Exceptions.h"
16 #include "oops/util/Logger.h"
28 const oops::Variables & vars,
29 const util::DateTime & time):
34 oops::Log::trace() <<
"IncrementMPAS constructed." << std::endl;
39 : geom_(new
GeometryMPAS(resol)), vars_(other.vars_), time_(other.time_)
43 oops::Log::trace() <<
"IncrementMPAS constructed from other." << std::endl;
47 : geom_(other.geom_), vars_(other.vars_), time_(other.time_)
55 oops::Log::trace() <<
"IncrementMPAS copy-created." << std::endl;
59 : geom_(other.geom_), vars_(other.vars_), time_(other.time_)
63 oops::Log::trace() <<
"IncrementMPAS copy-created." << std::endl;
68 oops::Log::trace() <<
"IncrementMPAS destructed" << std::endl;
76 oops::Log::debug() <<
"IncrementMPAS:diff x1 " << x1.
toFortran() << std::endl;
77 oops::Log::debug() <<
"IncrementMPAS:diff x2 " << x2.
toFortran() << std::endl;
81 std::shared_ptr<const GeometryMPAS> stateGeom = x1.
geometry();
82 ASSERT(stateGeom->isEqual(*(x2.
geometry())));
83 if (
geom_->isEqual(*stateGeom)) {
198 nn +=
time_.serialSize();
208 std::vector<double> vect_field(nn, 0.0);
210 vect.insert(vect.end(), vect_field.begin(), vect_field.end());
216 time_.serialize(vect);
227 time_.deserialize(vect, index);
238 std::ios oldState(
nullptr);
239 oldState.copyfmt(os);
245 os << std::endl <<
" Valid time: " <<
validTime();
246 os << std::endl <<
" Resolution: nCellsGlobal = " << nc <<
247 ", nFields = " << nf;
248 std::vector<double> zstat(3*nf);
250 os << std::setprecision(9);
251 os << std::scientific;
252 for (
int jj = 0; jj < nf; ++jj) {
253 os << std::endl <<
"Fld=" << jj+1 <<
" Min=" << zstat[3*jj]
254 <<
", Max=" << zstat[3*jj+1] <<
", RMS=" << zstat[3*jj+2]
255 <<
" : " <<
vars_[jj];
259 os.copyfmt(oldState);
GeometryMPAS handles geometry for MPAS model.
Increment Class: Difference between two states.
IncrementMPAS & operator=(const IncrementMPAS &)
void schur_product_with(const IncrementMPAS &)
void setAtlas(atlas::FieldSet *) const
ATLAS.
void print(std::ostream &) const override
Data.
void accumul(const double &, const StateMPAS &)
Other.
size_t serialSize() const override
Serialization.
void deserialize(const std::vector< double > &, size_t &) override
void axpy(const double &, const IncrementMPAS &, const bool check=true)
double dot_product_with(const IncrementMPAS &) const
void read(const eckit::Configuration &)
I/O and diagnostics.
void fromAtlas(atlas::FieldSet *)
void serialize(std::vector< double > &) const override
std::shared_ptr< const GeometryMPAS > geom_
const util::DateTime & validTime() const
void diff(const StateMPAS &, const StateMPAS &)
Basic operators.
void dirac(const eckit::Configuration &)
IncrementMPAS & operator*=(const double &)
void toAtlas(atlas::FieldSet *) const
IncrementMPAS & operator-=(const IncrementMPAS &)
void write(const eckit::Configuration &) const
IncrementMPAS(const GeometryMPAS &, const oops::Variables &, const util::DateTime &)
Constructor, destructor.
IncrementMPAS & operator+=(const IncrementMPAS &)
std::shared_ptr< const GeometryMPAS > geometry() const
const util::DateTime & validTime() const
void mpas_increment_self_add_f90(const F90inc &, const F90inc &)
void mpas_increment_from_atlas_f90(const F90inc &, const F90geom &, const oops::Variables &, atlas::field::FieldSetImpl *)
void mpas_increment_diff_incr_f90(const F90inc &, const F90state &, const F90state &)
void mpas_increment_gpnorm_f90(const F90inc &, const int &, double &)
void mpas_increment_self_sub_f90(const F90inc &, const F90inc &)
void mpas_increment_create_f90(F90inc &, const F90geom &, const oops::Variables &)
void mpas_increment_self_mul_f90(const F90inc &, const double &)
void mpas_increment_self_schur_f90(const F90inc &, const F90inc &)
void mpas_increment_serialize_f90(const F90inc &, const std::size_t &, double[])
void mpas_increment_dirac_f90(const F90inc &, const eckit::Configuration &)
void mpas_increment_read_file_f90(const F90inc &, const eckit::Configuration &, util::DateTime &)
void mpas_increment_copy_f90(const F90inc &, const F90inc &)
void mpas_increment_ones_f90(const F90inc &)
void mpas_increment_random_f90(const F90inc &)
void mpas_increment_axpy_state_f90(const F90inc &, const double &, const F90state &)
void mpas_increment_serial_size_f90(const F90inc &, std::size_t &)
void mpas_increment_axpy_inc_f90(const F90inc &, const double &, const F90inc &)
void mpas_increment_change_resol_f90(const F90inc &, const F90inc &)
void mpas_increment_zero_f90(const F90inc &)
void mpas_increment_dot_prod_f90(const F90inc &, const F90inc &, double &)
constexpr double SerializeCheckValue
void mpas_increment_to_atlas_f90(const F90inc &, const F90geom &, const oops::Variables &, atlas::field::FieldSetImpl *)
void mpas_increment_rms_f90(const F90inc &, double &)
void mpas_increment_deserialize_f90(const F90inc &, const std::size_t &, const double[], const std::size_t &)
void mpas_increment_sizes_f90(const F90inc &, int &, int &)
void mpas_increment_write_file_f90(const F90inc &, const eckit::Configuration &, const util::DateTime &)
void mpas_increment_delete_f90(F90inc &)
void mpas_increment_set_atlas_f90(const F90inc &, const F90geom &, const oops::Variables &, atlas::field::FieldSetImpl *)