diff --git a/include/basedata.h b/include/basedata.h index 2a7f0c1..41082c7 100644 --- a/include/basedata.h +++ b/include/basedata.h @@ -34,6 +34,26 @@ class BaseData explicit operator bool() const { return N() != 0; } }; +class UngriddedData: public BaseData +{ + std::vector lons, lats; + + public: + template UngriddedData(size_t n, Lon genlon, Lat genlat): BaseData(n), lons(n), lats(n) + { + for(size_t i = 0; i < n; i++) + { + lons[i] = genlon(i); + lats[i] = genlat(i); + } + }; + + UngriddedData() = default; + + real Lon(size_t i) const { return lons[i]; } + real Lat(size_t i) const { return lats[i]; } +}; + template class DefaultAverager: public Data { static constexpr bool isuv = IsUVData;