Skip to content

Commit

Permalink
Merge branch 'release/1.20.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
pmaciel committed Mar 25, 2024
2 parents fbf269f + 423c9d1 commit ab6b0c5
Show file tree
Hide file tree
Showing 348 changed files with 2,414 additions and 1,136 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.19.1
1.20.0
4 changes: 4 additions & 0 deletions etc/mir/grib-input.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,7 @@ gridType=space_view:
- interpolation: k-nearest
- nearest-method: longest-element-diagonal-and-nclosest
- reset-missing-values: true

# gridType=healpix,orderingConvention=nested isn't fully supported, this is a patch
gridType=healpix, orderingConvention=nested:
- finite-element-matrix-reorder-cols: healpix-ring-to-nested
28 changes: 16 additions & 12 deletions etc/mir/parameter-class.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,6 @@ index:
- 260539 # Fire detection indicator

index.associated:
- 3059 # Precipitation rate
- 129029 # Type of low vegetation gradient
- 129030 # Type of high vegetation gradient
- 129043 # Soil type gradient
Expand All @@ -786,17 +785,6 @@ index.associated:
- 200029 # Type of low vegetation difference
- 200030 # Type of high vegetation difference
- 200043 # Soil type difference
- 228217 # Instantaneous large-scale surface precipitation fraction
- 228218 # Convective rain rate
- 228219 # Large scale rain rate
- 228220 # Convective snowfall rate water equivalent
- 228221 # Large scale snowfall rate water equivalent
- 228222 # Maximum total precipitation rate in the last 3 hours
- 228223 # Minimum total precipitation rate in the last 3 hours
- 228224 # Maximum total precipitation rate in the last 6 hours
- 228225 # Minimum total precipitation rate in the last 6 hours
- 228226 # Maximum total precipitation rate since previous post-processing
- 228227 # Minimum total precipitation rate since previous post-processing

intensity:
- 1 # Stream function
Expand Down Expand Up @@ -2630,6 +2618,8 @@ numerics.accumulated:
- 231041 # Time-integrated total lightning flash density
- 231053 # Snow depth water equivalent on roof
- 231054 # Snow depth water equivalent on road
- 231057 # Convective snowfall water equivalent
- 231058 # Large-scale snowfall water equivalent
- 233000 # Time-integrated total column vertically-integrated eastward geopotential flux
- 233001 # Time-integrated total column vertically-integrated northward geopotential flux
- 233002 # Time-integrated total column vertically-integrated divergence of water geopotential flux
Expand Down Expand Up @@ -3541,6 +3531,7 @@ rate.energy-flux:

rate.mass-flux:
- 232 # Instantaneous moisture flux
- 3059 # Precipitation rate
- 3062 # large scale precipitation
- 3063 # Convective precipitation (water)
- 3064 # Snow fall rate water equivalent
Expand Down Expand Up @@ -4155,6 +4146,16 @@ rate.mass-flux:
- 228143 # Convective precipitation
- 228144 # Snow Fall water equivalent
- 228205 # Water runoff and drainage
- 228218 # Convective rain rate
- 228219 # Large scale rain rate
- 228220 # Convective snowfall rate water equivalent
- 228221 # Large scale snowfall rate water equivalent
- 228222 # Maximum total precipitation rate in the last 3 hours
- 228223 # Minimum total precipitation rate in the last 3 hours
- 228224 # Maximum total precipitation rate in the last 6 hours
- 228225 # Minimum total precipitation rate in the last 6 hours
- 228226 # Maximum total precipitation rate since previous post-processing
- 228227 # Minimum total precipitation rate since previous post-processing
- 228228 # Total Precipitation
- 230044 # Snow evaporation (variable resolution)
- 230045 # Snowmelt (variable resolution)
Expand All @@ -4172,6 +4173,8 @@ rate.mass-flux:
- 231042 # Maximum total column integrated graupel (snow pellets)
- 231053 # Snow depth water equivalent on roof
- 231054 # Snow depth water equivalent on road
- 231057 # Convective snowfall water equivalent
- 231058 # Large-scale snowfall water equivalent
- 233014 # Time integrated, vertically integrated divergence of mass flux
- 233015 # Time integrated, vertically integrated eastward mass flux
- 233016 # Time integrated, vertically integrated northward mass flux
Expand Down Expand Up @@ -4877,6 +4880,7 @@ ratio.fraction:
- 228034 # Fraction of convective precipitation cover
- 228091 # Canopy cover fraction
- 228092 # Soil texture fraction
- 228217 # Instantaneous large-scale surface precipitation fraction
- 228244 # Surface albedo of direct radiation
- 228245 # Surface albedo of diffuse radiation
- 228248 # Surface short wave-effective total cloudiness
Expand Down
30 changes: 19 additions & 11 deletions src/mir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -218,10 +218,10 @@ list(APPEND mir_srcs
data/space/SpaceLogarithmic.h
grib/BasicAngle.cc
grib/BasicAngle.h
grib/Packing.cc
grib/Packing.h
grib/Config.cc
grib/Config.h
grib/Packing.cc
grib/Packing.h
input/ArtificialInput.cc
input/ArtificialInput.h
input/ConstantInput.cc
Expand Down Expand Up @@ -426,8 +426,8 @@ list(APPEND mir_srcs
method/nonlinear/NoNonLinear.h
method/nonlinear/NonLinear.cc
method/nonlinear/NonLinear.h
method/nonlinear/SimulateMissingValue.cc
method/nonlinear/SimulateMissingValue.h
method/nonlinear/SimulatedMissingValue.cc
method/nonlinear/SimulatedMissingValue.h
method/solver/Multiply.cc
method/solver/Multiply.h
method/solver/Solver.h
Expand Down Expand Up @@ -487,6 +487,10 @@ list(APPEND mir_srcs
param/SameParametrisation.h
param/SimpleParametrisation.cc
param/SimpleParametrisation.h
reorder/Identity.cc
reorder/Identity.h
reorder/Reorder.cc
reorder/Reorder.h
repres/Gridded.cc
repres/Gridded.h
repres/Iterator.cc
Expand Down Expand Up @@ -770,10 +774,10 @@ if(mir_HAVE_ATLAS)
caching/legendre/NoLoader.h
caching/legendre/SharedMemoryLoader.cc
caching/legendre/SharedMemoryLoader.h
key/grid/NamedHEALPix.cc
key/grid/NamedHEALPix.h
key/grid/HEALPixPattern.cc
key/grid/HEALPixPattern.h
key/grid/NamedHEALPix.cc
key/grid/NamedHEALPix.h
key/grid/NamedORCA.cc
key/grid/NamedORCA.h
key/grid/ORCAPattern.cc
Expand All @@ -800,12 +804,16 @@ if(mir_HAVE_ATLAS)
method/structured/StructuredMethod.h
output/GmshOutput.cc
output/GmshOutput.h
repres/proxy/ProxyGrid.h
repres/proxy/ProxyGrid.cc
repres/proxy/ORCA.h
repres/proxy/ORCA.cc
repres/proxy/HEALPix.h
reorder/HEALPix.cc
reorder/HEALPix.h
repres/proxy/HEALPix.cc
repres/proxy/HEALPix.h
repres/proxy/ORCA.cc
repres/proxy/ORCA.h
repres/proxy/ProxyGrid.cc
repres/proxy/ProxyGrid.h
repres/unsupported/HEALPixNested.cc
repres/unsupported/HEALPixNested.h
stats/statistics/Integral.cc
stats/statistics/Integral.h)
else()
Expand Down
3 changes: 1 addition & 2 deletions src/mir/action/filter/ShTruncate.cc
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,7 @@ bool ShTruncate::sameAs(const Action& other) const {


void ShTruncate::print(std::ostream& out) const {
out << "ShTruncate["
<< "truncation=" << truncation_ << "]";
out << "ShTruncate[" << "truncation=" << truncation_ << "]";
}


Expand Down
3 changes: 1 addition & 2 deletions src/mir/action/interpolate/Gridded2GridDef.cc
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,7 @@ void Gridded2GridDef::custom(std::ostream& out) const {


void Gridded2GridDef::print(std::ostream& out) const {
out << "Gridded2GridDef["
<< "griddef=" << griddef_ << ",";
out << "Gridded2GridDef[" << "griddef=" << griddef_ << ",";
Gridded2UnrotatedGrid::print(out);
out << "]";
}
Expand Down
3 changes: 1 addition & 2 deletions src/mir/action/interpolate/Gridded2RegularLL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ Gridded2RegularLL::Gridded2RegularLL(const param::MIRParametrisation& parametris

repres::latlon::LatLon::globaliseBoundingBox(bbox_, increments_, reference_);

Log::debug() << "Gridded2RegularLL: globalise:"
<< "\n\t" << increments_ << "\n\t" << bbox_
Log::debug() << "Gridded2RegularLL: globalise:" << "\n\t" << increments_ << "\n\t" << bbox_
<< "\n\t"
"shifted in latitude? "
<< increments_.isLatitudeShifted(bbox_)
Expand Down
3 changes: 1 addition & 2 deletions src/mir/action/interpolate/Gridded2RotatedLL.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ Gridded2RotatedLL::Gridded2RotatedLL(const param::MIRParametrisation& parametris

repres::latlon::LatLon::globaliseBoundingBox(bbox_, increments_, reference_);

Log::debug() << "Gridded2RotatedLL: globalise:"
<< "\n\t" << increments_ << "\n\t" << bbox_
Log::debug() << "Gridded2RotatedLL: globalise:" << "\n\t" << increments_ << "\n\t" << bbox_
<< "\n\t"
"shifted in latitude? "
<< increments_.isLatitudeShifted(bbox_)
Expand Down
2 changes: 1 addition & 1 deletion src/mir/action/io/EndAction.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) EndActionright 1996- ECMWF.
* (C) Copyright 1996- ECMWF.
*
* 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.
Expand Down
2 changes: 1 addition & 1 deletion src/mir/action/io/EndAction.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) EndActionright 1996- ECMWF.
* (C) Copyright 1996- ECMWF.
*
* 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.
Expand Down
3 changes: 1 addition & 2 deletions src/mir/action/plan/Action.cc
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,7 @@ Action* ActionFactory::build(const std::string& name, const param::MIRParametris

if (j != m->end()) {
std::ostringstream oss;
oss << "ActionFactory: ambiguous '" << name << "'"
<< ", could be '" << j->first << "'"
oss << "ActionFactory: ambiguous '" << name << "'" << ", could be '" << j->first << "'"
<< " or '" << p->first << "'";
Log::error() << " " << j->first << std::endl;
throw exception::SeriousBug(oss.str());
Expand Down
33 changes: 7 additions & 26 deletions src/mir/action/plan/ActionPlan.cc
Original file line number Diff line number Diff line change
Expand Up @@ -144,21 +144,13 @@ void ActionPlan::execute(context::Context& ctx) const {

for (const auto& p : *this) {
if (Log::debug_active()) {
Log::debug() << "Executing:"
<< "\n"
<< sep << "\n"
<< *p << "\n"
<< sep << std::endl;
Log::debug() << "Executing:" << "\n" << sep << "\n" << *p << "\n" << sep << std::endl;
}

p->perform(ctx);

if (Log::debug_active()) {
Log::debug() << "Result:"
<< "\n"
<< sep << "\n"
<< ctx << "\n"
<< sep << std::endl;
Log::debug() << "Result:" << "\n" << sep << "\n" << ctx << "\n" << sep << std::endl;
}
}

Expand Down Expand Up @@ -188,11 +180,7 @@ void ActionPlan::estimate(context::Context& ctx, api::MIREstimation& estimation)
void ActionPlan::compress() {
const char* sep = "#########";

Log::debug() << "Compress:"
<< "\n"
<< sep << "\n"
<< *this << "\n"
<< sep << std::endl;
Log::debug() << "Compress:" << "\n" << sep << "\n" << *this << "\n" << sep << std::endl;

bool hasCompressed = false;
bool more = true;
Expand All @@ -205,9 +193,8 @@ void ActionPlan::compress() {

if (action(i).mergeWithNext(action(i + 1))) {

Log::debug() << "ActionPlan::compress: "
<< "\n " << oldAction.str() << "\n + " << action(i + 1) << "\n = " << action(i)
<< std::endl;
Log::debug() << "ActionPlan::compress: " << "\n " << oldAction.str() << "\n + " << action(i + 1)
<< "\n = " << action(i) << std::endl;

delete at(i + 1);
erase(begin() + long(i + 1));
Expand All @@ -230,16 +217,10 @@ void ActionPlan::compress() {
}

if (hasCompressed) {
Log::debug() << "Compress result:"
<< "\n"
<< sep << "\n"
<< *this << "\n"
<< sep << std::endl;
Log::debug() << "Compress result:" << "\n" << sep << "\n" << *this << "\n" << sep << std::endl;
}
else {
Log::debug() << "Compress result: unable to compress"
<< "\n"
<< sep << std::endl;
Log::debug() << "Compress result: unable to compress" << "\n" << sep << std::endl;
}
}

Expand Down
9 changes: 4 additions & 5 deletions src/mir/action/transform/ShToGridded.cc
Original file line number Diff line number Diff line change
Expand Up @@ -187,8 +187,8 @@ void ShToGridded::transform(data::MIRField& field, const repres::Representation&
}
else if (!creator.supported()) {

Log::warning() << "ShToGridded: LegendreCacheCreator is not supported for:"
<< "\n representation: " << representation << "\n options: " << options_ << std::endl
Log::warning() << "ShToGridded: LegendreCacheCreator is not supported for:" << "\n representation: "
<< representation << "\n options: " << options_ << std::endl
<< "ShToGridded: continuing with hindered performance" << std::endl;

trans = atlas_trans_t(grid, domain, truncation, options_);
Expand Down Expand Up @@ -317,9 +317,8 @@ bool ShToGridded::mergeWithNext(const Action& next) {
repres::RepresentationHandle out(outputRepresentation());
cropping_.boundingBox(out->extendBoundingBox(bbox));

Log::debug() << "ShToGridded::mergeWithNext: "
<< "\n " << oldAction.str() << "\n + " << next << "\n = " << *this << "\n + "
<< "(...)" << std::endl;
Log::debug() << "ShToGridded::mergeWithNext: " << "\n " << oldAction.str() << "\n + " << next
<< "\n = " << *this << "\n + " << "(...)" << std::endl;
}
return false;
}
Expand Down
5 changes: 2 additions & 3 deletions src/mir/caching/InMemoryCache.cc
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,8 @@ void InMemoryCache<T>::reserve(const InMemoryCacheUsage& usage) {
auto u = usage;
auto p = (f + u) - c;

Log::debug() << "CACHE-RESERVE-" << name_ << " "
<< " => " << u << " footprint: " << f << " capacity: " << c << " f+u: " << f + u << " f+u-c: " << p
<< std::endl;
Log::debug() << "CACHE-RESERVE-" << name_ << " " << " => " << u << " footprint: " << f << " capacity: " << c
<< " f+u: " << f + u << " f+u-c: " << p << std::endl;


if (p) {
Expand Down
1 change: 1 addition & 0 deletions src/mir/caching/InMemoryCacheUsage.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

#pragma once

#include <cstddef>
#include <iosfwd>


Expand Down
2 changes: 2 additions & 0 deletions src/mir/caching/WeightCache.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ class WeightCache : public eckit::CacheManager<WeightCacheTraits> {
public: // methods
explicit WeightCache(const param::MIRParametrisation&);

static int version() { return WeightCacheTraits::version(); }

private: // members
friend WeightCacheTraits;
};
Expand Down
Loading

0 comments on commit ab6b0c5

Please sign in to comment.