-
Notifications
You must be signed in to change notification settings - Fork 121
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 opendrift command line tool for doing a subset of simulations #739
base: master
Are you sure you want to change the base?
Conversation
Interesting! |
This is the tool written by @vegardb for drifty. We have discussed moving it into opendrift for a while, which makes sense. If we constrain ourselves to supporting a limited set of features it should be feasible to make it generic. |
Nice! Maybe replace |
Possibility to do |
Yes, I think it should take a template file in yaml or toml, and let the command line override that so that you easily tweak a per-defined simulation. |
Yes, I was more thinking of a config-file with both config-settings as well as other things like seeding, readers etc. |
Tests can be added with: https://click.palletsprojects.com/en/8.0.x/testing/, did not look like you already tested this way @vegardb ? |
No, no tests so far. |
} | ||
|
||
|
||
plots = { |
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 fine for now, but further down the road it would be nice to generalize this functionality, so that "any" postprocessing method can be applied. That requires some careful thinking.
Then also post-processing methods could be made available through Drifty.
I had earlier in mind that any OpenDrift module could be called the same way as this script, i.e.
I don't know whether that is feasible, or whether it is better than having a dedicated script |
'heatmap': lambda model, filename: model.write_netcdf_density_map(filename=filename), | ||
'text': lambda model, filename: model.export_ascii(filename), | ||
'oil_budget': lambda model, filename: model.plot_oil_budget(filename=filename) | ||
} |
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.
@vegardb: Let's see if this happens.