Skip to content

Commit

Permalink
Fixes after rebase, mainly to remove pdm03 dependency.
Browse files Browse the repository at this point in the history
  • Loading branch information
mattw-nws committed Aug 17, 2023
1 parent 9db5db1 commit 63f1c2c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 14 deletions.
6 changes: 0 additions & 6 deletions include/core/Layer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
#include "HY_Features.hpp"
#endif

#include "Pdm03.h"

namespace ngen
{

Expand All @@ -31,14 +29,12 @@ namespace ngen
const Simulation_Time& s_t,
feature_type& f,
geojson::GeoJSON cd,
std::shared_ptr<pdm03_struct> 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)
{

Expand Down Expand Up @@ -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<realization::Catchment_Formulation>(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";
Expand Down Expand Up @@ -138,7 +133,6 @@ namespace ngen
Simulation_Time simulation_time;
feature_type& features;
geojson::GeoJSON catchment_data;
std::shared_ptr<pdm03_struct> pdm_et_data;
long output_time_index;

};
Expand Down
3 changes: 1 addition & 2 deletions include/core/SurfaceLayer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,10 @@ namespace ngen
const Simulation_Time& s_t,
feature_type& f,
geojson::GeoJSON cd,
std::shared_ptr<pdm03_struct> pdmd,
long idx,
const std::vector<std::string>& n_u,
std::unordered_map<std::string, std::ofstream>& 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)
{
Expand Down
2 changes: 0 additions & 2 deletions include/realizations/catchment/Formulation_Manager.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@
#include <FeatureCollection.hpp>
#include "Formulation_Constructors.hpp"
#include "Simulation_Time.hpp"
#include "GIUH.hpp"
#include "GiuhJsonReader.h"
#include "routing/Routing_Params.h"
#include "LayerData.hpp"

Expand Down
6 changes: 2 additions & 4 deletions src/NGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -337,8 +337,6 @@ int main(int argc, char *argv[]) {

std::cout<<"Running Models"<<std::endl;

std::shared_ptr<pdm03_struct> pdm_et_data = std::make_shared<pdm03_struct>(get_et_params());

// check the time loops for the existing layers
ngen::LayerDataStorage& layer_meta_data = manager->get_layer_metadata();

Expand Down Expand Up @@ -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<ngen::Layer>(desc, cat_ids, sim_time, features, catchment_collection, pdm_et_data, 0);
layers[i] = make_shared<ngen::Layer>(desc, cat_ids, sim_time, features, catchment_collection, 0);
}
else
{
layers[i] = make_shared<ngen::SurfaceLayer>(desc, cat_ids, sim_time, features, catchment_collection, pdm_et_data, 0, nexus_subset_ids, nexus_outfiles);
layers[i] = make_shared<ngen::SurfaceLayer>(desc, cat_ids, sim_time, features, catchment_collection, 0, nexus_subset_ids, nexus_outfiles);
}

}
Expand Down
1 change: 1 addition & 0 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ endif()
NGen::realizations_catchment
NGen::core_mediator
NGen::forcing
${NETCDF_LIBRARIES}
)


Expand Down

0 comments on commit 63f1c2c

Please sign in to comment.