Replies: 1 comment
-
Also |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In XREDS @mpiannucci implemented a cool pattern to support dynamic generation of new
xr.DataArrays
in a dataset based on the existing data.He is using it it to generate Mean Lower Low Water levels based off of NAVD88 in his datasets, and an attribute pointing to the VDatum offsets: https://github.com/asascience-open/xreds/blob/main/xreds/extensions/vdatum.py
To do so he created his own hookspec
DatasetExtensionSpec.transform_dataset
which he calls in his dataset provider https://github.com/asascience-open/xreds/blob/main/xreds/dataset_extension.pyI had been thinking around the same idea for a while, and then @srstsavage brought it up in the XREDS repo to support generating virtual vector variables. asascience-open/xreds#28
I think we should standardize this pattern into a new type of plugin.
Beta Was this translation helpful? Give feedback.
All reactions