-
Notifications
You must be signed in to change notification settings - Fork 191
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
Update NetCDFOutputWriter
docstring and clobber default
#556
Conversation
Codecov Report
@@ Coverage Diff @@
## master #556 +/- ##
==========================================
+ Coverage 67.72% 71.47% +3.74%
==========================================
Files 69 69
Lines 1952 2033 +81
==========================================
+ Hits 1322 1453 +131
+ Misses 630 580 -50
Continue to review full report at Codecov.
|
|
NetCDFOutputWriter
docstringNetCDFOutputWriter
docstring and clobber default
`Dict` or `NamedTuple`) to a NC file, where `label` is a symbol that labels the output and | ||
`field` is a field from the model (e.g. `model.velocities.u`). | ||
Construct a `NetCDFOutputWriter` that writes `label, field` pairs in `outputs` (which should | ||
be a `Dict`) to a NC file, where `label` is a symbol that labels the output and `field` is |
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.
why can't we handle named tuples... ?
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.
Would be easy to add support for named tuple. I just removed them from the docstring because of #553
We can add support for named tuples in this PR as well.
Named tuples are trivial to support; but maybe users don't care. Personally, I much prefer them in the JLD2OutputWriter. |
If mode="a" then write_grid will almost always fail. I can't think of a reason to append to a grid anyways.
That's what I was thinking too but apparently with NCDatasets.jl the other modes are append (
I actually wasn't able to get named tuples to work with JLD2 but I opened an issue about that: #562 I don't see the big advantage of a
|
Docstring did not match the actual constructor. They do now.
@suyashbire1 Do you think
clobber
should be true or false by default?Also updated the docstring to make it clear that
outputs
needs to be aDict
for now.Resolves #553