shermansiu
commited on
Commit
•
6c071a1
1
Parent(s):
1dff314
Add usage example.
Browse files
README.md
CHANGED
@@ -52,6 +52,21 @@ ECMWF data products are subject to the following terms:
|
|
52 |
3. Licence Statement: ECMWF data is published under a Creative Commons Attribution 4.0 International (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/
|
53 |
4. Disclaimer: ECMWF does not accept any liability whatsoever for any error or omission in the data, their availability, or for any loss or damage arising from their use.
|
54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
## Citation
|
56 |
- Paper: https://www.science.org/doi/10.1126/science.adi2336
|
57 |
- Preprint: https://arxiv.org/abs/2212.12794
|
|
|
52 |
3. Licence Statement: ECMWF data is published under a Creative Commons Attribution 4.0 International (CC BY 4.0). https://creativecommons.org/licenses/by/4.0/
|
53 |
4. Disclaimer: ECMWF does not accept any liability whatsoever for any error or omission in the data, their availability, or for any loss or damage arising from their use.
|
54 |
|
55 |
+
## Usage
|
56 |
+
Use the Huggingface Hub file system to load files. The `datasets` library doesn't support netCDF files yet.
|
57 |
+
|
58 |
+
```python3
|
59 |
+
from huggingface_hub import HfFileSystem
|
60 |
+
import xarray
|
61 |
+
|
62 |
+
fs = HfFileSystem()
|
63 |
+
|
64 |
+
files = fs.ls("datasets/shermansiu/dm_graphcast_datasets/dataset", detail=False)
|
65 |
+
|
66 |
+
with fs.open(files[0], "rb") as f:
|
67 |
+
example_batch1 = xarray.load_dataset(f).compute()
|
68 |
+
```
|
69 |
+
|
70 |
## Citation
|
71 |
- Paper: https://www.science.org/doi/10.1126/science.adi2336
|
72 |
- Preprint: https://arxiv.org/abs/2212.12794
|