Saving subset ugrid to disk #1324
Replies: 3 comments 17 replies
-
Hi @Chrismarsh UXarray currently operates with the assumption that Grid and Data files are separated. This means that the UGRID topology is typically stored in one file, and any other data variables are stored separately. uxds = ...
subset = uxds['var'].subset.bounding_box(lon, lat)
# 1) Save the data
subset.to_xarray().to_netcdf("data.nc")
# 2) Save the grid
subset.uxgrid.to_xarray().to_netcdf("grid.nc") I'm going to take a look into this and we can include a usage notebook better detailing this. |
Beta Was this translation helpful? Give feedback.
-
I
With the current implmentation, I think |
Beta Was this translation helpful? Give feedback.
-
@rajeeja @philipc2 replying here so I don't have to duplicate replies in two different threads.
If I do
I can then load this data against my original netcdf that contains the ugrid topology and it works correctly. ✅
However, if I do:
to write the ugrid topology, it just spins inside Poking around trying a few things, I thought I would compute
however I can't select out a single time dim
But time is totally there because |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
What is the approach to save a subset ugrid to disk? For example, suppose I do
The test2.nc file does not contain valid ugrid topology:
Beta Was this translation helpful? Give feedback.
All reactions