Skip to content
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

Modify Formulation_Manager.hpp to parse forcing "file_pattern" #489

Merged
merged 3 commits into from
Jan 19, 2023

Conversation

stcui007
Copy link
Contributor

This commit enable ngen to parse forcing "file_pattern" in explicit catchments formulation.

Additions

data/test_bmi_multi_realization_config.json
data/test_bmi_multi_realization_config_w_netcdf.json
data/test_bmi_multi_realization_config_w_noah_pet_cfe.json
data/test_realization_config.json

Removals

Changes

include/realizations/catchment/Formulation_Manager.hpp

Testing

unit tests
run ngen tests in serial
run ngen tests in parallel

Screenshots

Notes

Todos

Checklist

  • [x ] PR has an informative and human-readable title
  • [x ] Changes are limited to a single goal (no scope creep)
  • [x ] Code can be automatically merged (no conflicts)
  • [x ] Code follows project standards (link if applicable)
  • Passes all existing automated tests
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future todos are captured in comments
  • Project documentation has been updated (including the "Unreleased" section of the CHANGELOG)
  • Reviewers requested with the Reviewers tool ➡️

Testing checklist (automated report can be put here)

Target Environment support

  • [x ] Linux

@mattw-nws
Copy link
Contributor

This looks promising... I will try testing with the files tomorrow... could you try adding an automated test for this? Would probably make sense in Formulation_Manager_Test.cpp.

@stcui007
Copy link
Contributor Author

stcui007 commented Jan 12, 2023 via email

Copy link
Member

@hellkite500 hellkite500 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks good to me. Doesn't change the existing semantics but allows significant code reuse! My only concern is the test coverage now doesn't consider the case when an explicit path is passed.

@@ -608,7 +620,9 @@ const std::string EXAMPLE_4 = "{ "
"} "
"], "
"\"forcing\": { "
"\"path\": \"./data/forcing/cat-67_2015-12-01 00_00_00_2015-12-30 23_00_00.csv\" "
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would leave one or two of these tests with just the path and not pattern to ensure that both cases work.

@stcui007
Copy link
Contributor Author

stcui007 commented Jan 17, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Catchment-specific formulation configs ignore forcing file_pattern value
3 participants