You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want: an easier way to create a target Cube from scratch, with a specified shape
So that: I can easily regrid my source data even when I do not have a target that includes data
A function in iris.util that returns a Cube would seem like the simplest implementation, with various config for coordinate lengths, coordinate units, etcetera. Ideally we could not only create standard rectilinear space (1-dimensional coordinates) but also curvilinear (2-dimensional coordinates) and mesh (using MeshCoords).
To advertise this more strongly we could consider allowing regridders to accept a 'cube shape specification' as the target, in addition to accepting an actual Cube. Perhaps by introducing a CubeShape class somewhere?
Motivation
Currently regridding without a loaded target Cube requires creating a Cube from scratch, with all the necessary Coords attached. Many users are unaware this is possible, and many more find it difficult. More significant: it is not obvious to a non-developer that Iris regridding will work fine with a Cube that has blank data.
Additional context
Mentioned in #4447. Any convenience should be revisited if we ever get the ability to create a data-less Cube.
✨ Feature Request
Cube
from scratch, with a specified shapeA function in
iris.util
that returns aCube
would seem like the simplest implementation, with various config for coordinate lengths, coordinate units, etcetera. Ideally we could not only create standard rectilinear space (1-dimensional coordinates) but also curvilinear (2-dimensional coordinates) and mesh (usingMeshCoord
s).To advertise this more strongly we could consider allowing regridders to accept a 'cube shape specification' as the target, in addition to accepting an actual
Cube
. Perhaps by introducing aCubeShape
class somewhere?Motivation
Currently regridding without a loaded target
Cube
requires creating aCube
from scratch, with all the necessaryCoord
s attached. Many users are unaware this is possible, and many more find it difficult. More significant: it is not obvious to a non-developer that Iris regridding will work fine with aCube
that has blank data.Additional context
Mentioned in #4447. Any convenience should be revisited if we ever get the ability to create a data-less
Cube
.A private testing convenience exists for this in
esmf-regrid.tests.unit.schemes.test__cube_to_GridInfo._grid_cube()
Expand for some typical code that users currently need for this case:
The text was updated successfully, but these errors were encountered: