Skip to content

Conversation

@tomchor
Copy link
Collaborator

@tomchor tomchor commented Oct 11, 2025

Another necessary step towards supporting FiedTimeSeries construction from NetCDF output

@tomchor
Copy link
Collaborator Author

tomchor commented Oct 11, 2025

One thing that's making this harder is the fact that we started flattening singleton dimensions in NetCDF output. For example, while a 2D Field in Oceananigans may have size(field) == (Nx, Ny, 1), when it is written to NetCDF is has the size (Nx, Ny). In the past this wasn't a problem (and was even desirable to some extent), now when getting information back from NetCDF to Oceananigans, this requires some extra work.

I wonder if it's worth going back on that decision and keeping singleton dimensions. @ali-ramadhan @glwagner thoughts?

@simone-silvestri
Copy link
Collaborator

If it makes the source code simpler, I vote for keeping the third dimension. In the end, Oceananigans' fields are always three-dimensional.

@glwagner
Copy link
Member

I think it makes sense to keep singleton dimensions in NetCDF output if it simplifies the interface between NetCDF and Oceananigans. I think the disadvantages are minor. If we can identify significant disadvantages in the future, then we can motivate investing energy into supporting the removal of singleton dimensions later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants