-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing catchment id to CatchmentAggrDataSelector #480
Conversation
try { | ||
precip = this->forcing->get_value(CatchmentAggrDataSelector("","precip_rate", t_unix, dt, "")); // classic forcing object/format | ||
precip = this->forcing->get_value(CatchmentAggrDataSelector(this->id, CSDMS_STD_NAME_LIQUID_EQ_PRECIP_RATE, t_current, t_delta_s, ""), data_access::SUM); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
End result of this change is that the same thing is in thetry
and catch
blocks. I think that the new DataProviders will reconcile these two different names so the try/catch is now unnecessary... remove the try/catch block and replace with just the one line.
double precip; | ||
time_t t_unix = this->forcing->get_data_start_time() + (t * 3600); | ||
const std::string forcing_name = CSDMS_STD_NAME_LIQUID_EQ_PRECIP_RATE; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is never used anywhere, please remove.
Will do. Thanks.
…On Fri, Dec 9, 2022 at 3:21 PM Matt Williamson ***@***.***> wrote:
***@***.**** requested changes on this pull request.
------------------------------
In src/realizations/catchment/Simple_Lumped_Model_Realization.cpp
<#480 (comment)>:
> try {
- precip = this->forcing->get_value(CatchmentAggrDataSelector("","precip_rate", t_unix, dt, "")); // classic forcing object/format
+ precip = this->forcing->get_value(CatchmentAggrDataSelector(this->id, CSDMS_STD_NAME_LIQUID_EQ_PRECIP_RATE, t_current, t_delta_s, ""), data_access::SUM);
End result of this change is that the same thing is in thetry and catch
blocks. I think that the new DataProviders will reconcile these two
different names so the try/catch is now unnecessary... remove the try/catch
block and replace with just the one line.
------------------------------
In src/realizations/catchment/Simple_Lumped_Model_Realization.cpp
<#480 (comment)>:
> double precip;
- time_t t_unix = this->forcing->get_data_start_time() + (t * 3600);
+ const std::string forcing_name = CSDMS_STD_NAME_LIQUID_EQ_PRECIP_RATE;
This is never used anywhere, please remove.
—
Reply to this email directly, view it on GitHub
<#480 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACA4SRNWB2BQMPMKSMRY64DWMOPGJANCNFSM6AAAAAASJEDA74>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Passing catchment id in place of an empty string in get_value function.
Additions
Removals
Changes
src/realizations/catchment/Simple_Lumped_Model_Realization.cpp
src/realizations/catchment/Tshirt_C_Realization.cpp
src/realizations/catchment/Tshirt_Realization.cpp
Testing
Screenshots
Notes
Todos
Checklist
Testing checklist (automated report can be put here)
Target Environment support