|
|
|
@ -34,6 +34,26 @@ class BaseData
|
|
|
|
|
explicit operator bool() const { return N() != 0; } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
class UngriddedData: public BaseData |
|
|
|
|
{ |
|
|
|
|
std::vector<real> lons, lats; |
|
|
|
|
|
|
|
|
|
public: |
|
|
|
|
template<class Lon, class Lat> 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 Data> class DefaultAverager: public Data |
|
|
|
|
{ |
|
|
|
|
static constexpr bool isuv = IsUVData<Data>; |
|
|
|
|