JuliaClimate / ClimateBase.jl

Tools to analyze and manipulate climate (spatiotemporal) data. Also used by ClimateTools and ClimatePlots
https://juliaclimate.github.io/ClimateBase.jl/dev/
Other
39 stars 3 forks source link

Rework .nc IO and space types #58

Closed Datseris closed 3 years ago

Datseris commented 3 years ago

This PR renames the functions related to nc IO to ncread and ncwrite. It also reworks the space type information, generalizing unstructured grids to UnstructuredGrid, which (hopefully) will allow simple interfacing with Meshes.jl in the future.

I've tested my loading with output of Gaussian Equal Area grid, and ICON's icosahedral-based grid and it works fine.

I've added more support for automatically deducing if the grid is lon-lat or unstructured.

Datseris commented 3 years ago

@Balinus I am very happy with this PR. It allows loading automatically any grid I've encountered so far and working flawlessly with all functions like spacemean, zonalmean, etc.. This PR also paves the wave for future integration with Meshes.jl, as then the UnstructuredGrid will be just a mesh from Meshes.jl.

With this PR in, I believe you can go ahead and start updating ClimateTools.jl to the current ClimArray. The IO is awesome and everything seems stable. I've been using it for about a year now.

Then I can safely move the "timeseries analysis" functionality there as well.