-
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
Fix 384, prioritize use of BMI potential evapotranspiration #387
Conversation
Looking at the one test failure, here are the relevant 3 failures: [ RUN ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_0_a
/Users/runner/work/ngen/ngen/test/realizations/catchments/Bmi_C_Formulation_Test.cpp:308: Failure
Expected equality of these values:
output
Which is: "0.000000,-0.000000"
"0.000000,0.000000"
Unit conversion error:
[ FAILED ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_0_a (80 ms)
Unable to convert mm s^-1 to m
[ RUN ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_1_a
Returning unconverted value!
/Users/runner/work/ngen/ngen/test/realizations/catchments/Bmi_C_Formulation_Test.cpp:324: Failure
Expected equality of these values:
output
Which is: "-0.000000,0.000000"
"0.000000,0.000000"
[ FAILED ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_1_a (114 ms)
Unit conversion error:
[ RUN ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_1_b
Unable to convert mm s^-1 to m
Returning unconverted value!
Unit conversion error:
Unable to convert mm s^-1 to m
Returning unconverted value!
Unit conversion error:
Unable to convert mm s^-1 to m
/Users/runner/work/ngen/ngen/test/realizations/catchments/Bmi_C_Formulation_Test.cpp:339: Failure
Returning unconverted value!
Expected equality of these values:
Unit conversion error:
output
Unable to convert mm s^-1 to m
Which is: "-0.000000,0.000002"
Returning unconverted value!
"0.000000,0.000002"
Unit conversion error:
[ FAILED ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_1_b (133 ms) Not entirely sure why at the moment these values are coming through as |
4ccd04c might be relevant here... |
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.
Heh, I remember this working differently.
@hellkite500, I'll wait on final approval, since I expect more changes are going to be needed to address the problem with the checks, but otherwise this looks good.
I think the failing test may be fixed by d230f8b |
@hellkite500, that check still fails. |
That commit was merged into master with #389... Not sure why I cannot get the strings to match now... |
Might suggest EXPECT_THAT with MatchesRegex, might give better output on the test failure. |
Found googlemock, trying to figure out if it is built in our configuration and where it puts the required headers to use it... |
Went from a c++ |
Place your bets now on whether it fails again in the post-merge checks?
Never mind... that's not even zero, sorry. And... now it's 0.000001 where it was 0.000002... which I guess is because of #389... not confusing at all. |
So a non-deterministic error seems to exist relating to this PR. In the post-merge check: /Users/runner/work/ngen/ngen/test/realizations/catchments/Bmi_C_Formulation_Test.cpp:310: Failure
Value of: output
Expected: matches regular expression "-?0.000000,-?0.000000"
Actual: "0.000000,-4.000000"
[ FAILED ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_0_a (65 ms)
[ RUN ] Bmi_C_Formulation_Test.GetOutputLineForTimestep_1_a
/Users/runner/work/ngen/ngen/test/realizations/catchments/Bmi_C_Formulation_Test.cpp:326: Failure
Value of: output
Expected: matches regular expression "-?0.000000,-?0.000000"
Actual: "-4.000000,0.000000" I'll open an issue to track this... |
Called it, apparently :-\ |
The current implementation uses internal PET kernels to
calc_et()
in the framework when a module request an evapotranspiration variable as input. This is done regardless of whether or not that variable is available from another BMI module source. This PR is backwards compatible, and will still provide PET when no BMI module in the stack knows how to produce the PET standard name, but it allows for a BMI module to be used first if it is capable of producing the value.Closes #384.
Additions
check_internal_providers
function to look for forcing variables that aren't available from BMI providers.Removals
Changes
get_bmi_var_name
Testing
Checklist
Target Environment support