From 63f1c2ce8f0f98e9cae9a6ef0f7dbd5d5a74532b Mon Sep 17 00:00:00 2001 From: Matt Williamson <87771120+mattw-nws@users.noreply.github.com> Date: Thu, 17 Aug 2023 17:01:49 +0000 Subject: [PATCH] Fixes after rebase, mainly to remove pdm03 dependency. --- include/core/Layer.hpp | 6 ------ include/core/SurfaceLayer.hpp | 3 +-- include/realizations/catchment/Formulation_Manager.hpp | 2 -- src/NGen.cpp | 6 ++---- test/CMakeLists.txt | 1 + 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/include/core/Layer.hpp b/include/core/Layer.hpp index c68224160f..fb84f6f99b 100644 --- a/include/core/Layer.hpp +++ b/include/core/Layer.hpp @@ -10,8 +10,6 @@ #include "HY_Features.hpp" #endif -#include "Pdm03.h" - namespace ngen { @@ -31,14 +29,12 @@ namespace ngen const Simulation_Time& s_t, feature_type& f, geojson::GeoJSON cd, - std::shared_ptr pdmd, long idx) : description(desc), processing_units(p_u), simulation_time(s_t), features(f), catchment_data(cd), - pdm_et_data(pdmd), output_time_index(idx) { @@ -96,7 +92,6 @@ namespace ngen auto r = features.catchment_at(id); //TODO redesign to avoid this cast auto r_c = std::dynamic_pointer_cast(r); - r_c->set_et_params(pdm_et_data); double response = r_c->get_response(output_time_index, description.time_step); std::string output = std::to_string(output_time_index)+","+current_timestamp+","+ r_c->get_output_line_for_timestep(output_time_index)+"\n"; @@ -138,7 +133,6 @@ namespace ngen Simulation_Time simulation_time; feature_type& features; geojson::GeoJSON catchment_data; - std::shared_ptr pdm_et_data; long output_time_index; }; diff --git a/include/core/SurfaceLayer.hpp b/include/core/SurfaceLayer.hpp index a17cf8a1eb..e25602b3b9 100644 --- a/include/core/SurfaceLayer.hpp +++ b/include/core/SurfaceLayer.hpp @@ -15,11 +15,10 @@ namespace ngen const Simulation_Time& s_t, feature_type& f, geojson::GeoJSON cd, - std::shared_ptr pdmd, long idx, const std::vector& n_u, std::unordered_map& output_files) : - Layer(desc,p_u,s_t,f,cd,pdmd,idx), + Layer(desc,p_u,s_t,f,cd,idx), nexus_ids(n_u), nexus_outfiles(output_files) { diff --git a/include/realizations/catchment/Formulation_Manager.hpp b/include/realizations/catchment/Formulation_Manager.hpp index 1f0afde17c..f4e1a9612c 100644 --- a/include/realizations/catchment/Formulation_Manager.hpp +++ b/include/realizations/catchment/Formulation_Manager.hpp @@ -16,8 +16,6 @@ #include #include "Formulation_Constructors.hpp" #include "Simulation_Time.hpp" -#include "GIUH.hpp" -#include "GiuhJsonReader.h" #include "routing/Routing_Params.h" #include "LayerData.hpp" diff --git a/src/NGen.cpp b/src/NGen.cpp index 26cecfd8a1..305d5c4277 100644 --- a/src/NGen.cpp +++ b/src/NGen.cpp @@ -337,8 +337,6 @@ int main(int argc, char *argv[]) { std::cout<<"Running Models"< pdm_et_data = std::make_shared(get_et_params()); - // check the time loops for the existing layers ngen::LayerDataStorage& layer_meta_data = manager->get_layer_metadata(); @@ -379,11 +377,11 @@ int main(int argc, char *argv[]) { for ( std::string id : features.catchments(keys[i]) ) { cat_ids.push_back(id); } if (keys[i] != 0 ) { - layers[i] = make_shared(desc, cat_ids, sim_time, features, catchment_collection, pdm_et_data, 0); + layers[i] = make_shared(desc, cat_ids, sim_time, features, catchment_collection, 0); } else { - layers[i] = make_shared(desc, cat_ids, sim_time, features, catchment_collection, pdm_et_data, 0, nexus_subset_ids, nexus_outfiles); + layers[i] = make_shared(desc, cat_ids, sim_time, features, catchment_collection, 0, nexus_subset_ids, nexus_outfiles); } } diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index d5b34c8814..b55eedf868 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -141,6 +141,7 @@ endif() NGen::realizations_catchment NGen::core_mediator NGen::forcing + ${NETCDF_LIBRARIES} )