-
Notifications
You must be signed in to change notification settings - Fork 5
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
Add marrmot M01 model class #56
Conversation
Commits to PR will trigger CI job via synchronize event type
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
So no installation of any deps is needed.
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.
Nice work @SarahAlidoost and @sverhoeven !
The get_value_as_xarray
function seems to only work on flux_out_Q. With both P and T it crashes. Is this "future work"? :-)
Other than that good to go, so feel free to merge (perhaps add an issue on the limited use of get_value_as_xarray)
""" | ||
if work_dir is None: | ||
scratch_dir = CFG['output_dir'] | ||
# TODO this timestamp isnot safe for parallel processing |
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 going to be a problem quickly. Perhaps add milliseconds to kick the can down the road?
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.
When I was working with marrmot calibration and parallel processing, I found that this solution does not work because the CPU time would be the same for all cores. We added a random filename generator there.
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.
Created #67
Sonarcloud is complaining about duplicate lines in test code. I guess we should either fix or ignore test code in quality verification. @sverhoeven do you know what the approach usually is? |
Thank you @nielsdrost. I made issue eWaterCycle/ewatercycle-marrmot#6 and added a TODO and |
Sonarcloud does not report duplication in test code only in ewatercycle/models/marrmot.py. I would not change the gate, but do some work after EGU to lower code duplication and increase coverage. The get_value_as_xarray method should be moved to a super class, as all models we currently have can use same method. However later we will get some models that will not be able to return xarray due to their grid type. So we might need a sub class of AbstractModel to handle implement get_value_as_xarray and the models can be subclasses of that one. |
SonarCloud Quality Gate failed. |
No description provided.