From 5ed7fd5282e383776c8757ce60f1938ba99776dd Mon Sep 17 00:00:00 2001 From: Phil Miller Date: Tue, 17 Sep 2024 14:45:47 -0700 Subject: [PATCH] Clear out some residual cruft --- .../forcing/NetCDFMeshPointsDataProvider.hpp | 27 +++---------------- src/forcing/NetCDFMeshPointsDataProvider.cpp | 2 -- 2 files changed, 3 insertions(+), 26 deletions(-) diff --git a/include/forcing/NetCDFMeshPointsDataProvider.hpp b/include/forcing/NetCDFMeshPointsDataProvider.hpp index 6c2aa100af..0f63d7e404 100644 --- a/include/forcing/NetCDFMeshPointsDataProvider.hpp +++ b/include/forcing/NetCDFMeshPointsDataProvider.hpp @@ -35,16 +35,6 @@ namespace data_access { public: - enum TimeUnit - { - TIME_HOURS, - TIME_MINUTES, - TIME_SECONDS, - TIME_MILLISECONDS, - TIME_MICROSECONDS, - TIME_NANOSECONDS - }; - using time_point_type = std::chrono::time_point; NetCDFMeshPointsDataProvider(std::string input_path, @@ -60,10 +50,10 @@ namespace data_access void finalize() override; - /** Return the variables that are accessable by this data provider */ + /** Return the variables that are accessible by this data provider */ boost::span get_available_variable_names() const override; - /** Return the first valid time for which data from the request variable can be requested */ + /** Return the first valid time for which data from the requested variable can be requested */ long get_data_start_time() const override; /** Return the last valid time for which data from the requested variable can be requested */ @@ -100,22 +90,11 @@ namespace data_access // And an implementation of the usual version using it std::vector get_values(const selection_type& selector, data_access::ReSampleMethod) override { - std::vector output(selected_points_count(selector)); - get_values(selector, output); - return output; + throw std::runtime_error("Unimplemented"); } private: - size_t mesh_size(std::string const& variable_name); - - size_t selected_points_count(const selection_type& selector) - { - auto* points = boost::get>(&selector.points); - size_t size = points ? points->size() : this->mesh_size(selector.variable_name); - return size; - } - time_point_type sim_start_date_time_epoch; time_point_type sim_end_date_time_epoch; std::chrono::seconds sim_to_data_time_offset; // Deliberately signed--sim should never start before data, yes? diff --git a/src/forcing/NetCDFMeshPointsDataProvider.cpp b/src/forcing/NetCDFMeshPointsDataProvider.cpp index ad477c9875..385c4502ff 100644 --- a/src/forcing/NetCDFMeshPointsDataProvider.cpp +++ b/src/forcing/NetCDFMeshPointsDataProvider.cpp @@ -119,7 +119,6 @@ boost::span NetCDFMeshPointsDataProvider::get_available_varia return variable_names; } -/** Return the first valid time for which data from the request variable can be requested */ long NetCDFMeshPointsDataProvider::get_data_start_time() const { return std::chrono::system_clock::to_time_t(time_vals[0]); @@ -130,7 +129,6 @@ long NetCDFMeshPointsDataProvider::get_data_start_time() const #endif } -/** Return the last valid time for which data from the requested variable can be requested */ long NetCDFMeshPointsDataProvider::get_data_stop_time() const { return std::chrono::system_clock::to_time_t(time_vals.back()) + std::chrono::duration_cast(time_stride).count();