Use pooch for the CF standard name table
Closed this issue · 2 comments
dcherian commented
From @malmans2 in another issue:
BTW, maybe we could use pooch instead of shipping the table with cf-xarray? I'm 50/50.
I think we should do this. We can provide a download function for backwards compatibility. It'd be useful to hear how people are using that file.
malmans2 commented
Another good option is fsspec
:
url = "..."
with fsspec.open(f"filecache::{url}") as f:
root = ElementTree.parse(f).getroot()
Zeitsperre commented
This would certainly impact some of the downstream projects we have (such as xclim
and finch
). Perhaps there could be a way to supply this table as a dataframe via a function in cf-xarray? If there is a standardized way of fetching this document or the table contents, we can certainly work to find ways of supporting it downstream.