Replies: 4 comments 6 replies
-
@bsherratt Thanks for taking the time to raise this. We've briefly discussed this and we feel that we'd like to discuss this more openly, so I'm going to covert this issue to a GitHub Discussion... and we can take it from there. Thanks again 🍻 |
Beta Was this translation helpful? Give feedback.
-
@SciTools/iris-devs Let's start thinking about @bsherratt issue, which might run deep and wide within |
Beta Was this translation helpful? Give feedback.
-
From my naïve standpoint this approach sounds neat and makes sense, providing there are no hidden issues. |
Beta Was this translation helpful? Give feedback.
-
For me, this relates to the whole problem of "round-trip" data, i.e. what metadata in a file we currently discard on load, or can't control on save. For saving netcdf, we have added some special control aspects :
For loading, some extra metadata details are recorded (which might not have been) :
It may not always be a good idea to consider those things as part of "identity" -- as with var_name, but also the "history" attribute can be a problem. Also, some things are lost altogether:
|
Beta Was this translation helpful? Give feedback.
-
✨ Feature Request
When saving a netCDF file, it would be helpful to have an option to choose the names used for "grid mapping variables" - the dummy variables used to hold parameters for coordinate reference systems.
Motivation
I have to provide data for a system that appears to be strangely specific about things like this.
In fact, the final product may not be so picky, but its specification does strongly imply that a specific
grid_mapping
must be used. And of course there's a simple enough workaround, to save the files as usual then tweak them withnetCDF4
.Whether or not it's required on this particular occasion, it's possible that there may be some future need for it. It strikes me as very similar to choosing the
_FillValue
, which Iris does expose as an option.Additional context
If I've interpreted the CF conventions correctly:
grid_mapping
attribute, which should be the name of another variable in the file (a "grid mapping variable")grid_mapping_name
attribute and various attributes as required by the CRS to define itgrid_mapping_name
.@stephenworsley has suggested that the cleanest way of implementing this would be to add a
CoordSystem.var_name
attribute, in line withCube.var_name
andCoord.var_name
. This would also allow a slightly more consistent round-trip when loading and re-saving netCDF files, by simply setting that attribute according to whatever is found in the file.Beta Was this translation helpful? Give feedback.
All reactions