-
Notifications
You must be signed in to change notification settings - Fork 215
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
(0.96.0) Improve the NetCDFOutputWriter
experience
#4046
base: main
Are you sure you want to change the base?
Conversation
I haven't checked the tests yet, but so far it's looking great! I'll try to check the tests tomorrow. |
It's not a ReducedField, its a WindowedField. But properly supporting WindowedField is intrinsic to NetCDF output writing without halos so there should be a general solution to this. |
I'm not sure a FieldTimeSeries refactor is necessary (note that we also support NetCDF FieldTimeSeries on ClimaOcean, so I don't entirely understand why refactoring is necessary). However, in the case that such a refactor bumps the version again, would it be prudent to be more conservative about version bumping here? |
In case its helpful: a WindowedField is a Field with non-default Thus with a general way of "windowing" dimensions, we should support free surface and |
@glwagner Thanks for pointing out that the free surface is a |
Ah I may have just assumed a large refactor would be necessary without digging into I believe that according to semantic versioning which Oceananigans.jl follows (still I think?), this PR would necessitate a minor version bump as it changes the It's probably not nice to increment the minor version very often, but is there a particular reason to be conservative about version bumping? |
For sure if introduces a breaking change to Re: conservatism, no, I think we just want to try our best to follow the protocol; ie do not bump when not warranted, so as not to confuse interpretation of code changes. |
This PR updates the
NetCDFOutputWriter
to:RectilinearGrid
andLatitudeLongitudeGrid
(with correct and useful output attributes).LagrangianParticles
output.FieldTimeSeries
construction from NetCDF (full support to be added in a subsequent PR).Tests have been added for all these features. Thank you to @tomchor and @almacarolina for helpful discussions during this refactor!
There's still a little bit left to do, but if anyone has any thoughts or feedback and would like to leave a review I'd appreciate it! There are a lot of line additions but thankfully the changes are almost fully isolated to just two files.
TODO:
xareas
,volumes
, etc. viaKernelFunctionOperation
?NetCDFOutputWriter
to highlight all features.NetCDFOutputWriter
+ some fancier features in an example.Some comments:
FieldTimeSeries
. I was planning on working on it here (as the branch name suggests) but it will involve refactoringfield_time_series.jl
which seems best suited for a separate PR.Field
but is kind of aReducedField
we cannot dispatch on its type and work with it correctly. Will open an issue to discuss.NetCDFOutputWriter
.Resolves #1334 (via the dimension name generator)
Resolves #2248
Resolves #2770 (Maybe? You can save u, v, w, T, S, and η in the same NetCDF file but it's a bit hacky, see above.)
Resolves #3997
This PR makes progress on issue #3935
This PR supercedes PR #2652