xarray-contrib/cf-xarray

Use pooch for the CF standard name table

Closed this issue · 2 comments

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.

cc @Zeitsperre @aulemahal @kthyng

Another good option is fsspec:

url = "..."
with fsspec.open(f"filecache::{url}") as f:
    root = ElementTree.parse(f).getroot()

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.