Skip to content

Commit

Permalink
Clear out some residual cruft
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilMiller committed Sep 17, 2024
1 parent 9fd9510 commit 5ed7fd5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 26 deletions.
27 changes: 3 additions & 24 deletions include/forcing/NetCDFMeshPointsDataProvider.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<std::chrono::system_clock>;

NetCDFMeshPointsDataProvider(std::string input_path,
Expand All @@ -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<const std::string> 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 */
Expand Down Expand Up @@ -100,22 +90,11 @@ namespace data_access
// And an implementation of the usual version using it
std::vector<data_type> get_values(const selection_type& selector, data_access::ReSampleMethod) override
{
std::vector<data_type> 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<std::vector<int>>(&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?
Expand Down
2 changes: 0 additions & 2 deletions src/forcing/NetCDFMeshPointsDataProvider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,6 @@ boost::span<const std::string> 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]);
Expand All @@ -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<std::chrono::seconds>(time_stride).count();
Expand Down

0 comments on commit 5ed7fd5

Please sign in to comment.