Download scripts/fake_data.py from OneScience-Group/RISE-UNet: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/OneScience-Group/RISE-UNet/resolve/main/scripts/fake_data.py
- Command line
-
hf download hf://OneScience-Group/RISE-UNet/scripts/fake_data.py
-
curl -L -o fake_data.py https://huggingface.co/OneScience-Group/RISE-UNet/resolve/main/scripts/fake_data.py
580 Bytes
| from pathlib import Path | |
| import sys,json | |
| ROOT=Path(__file__).resolve().parents[1];sys.path.insert(0,str(ROOT)) | |
| from model.rise_unet import * | |
| c=load_config(ROOT);x,y=synthetic_initialization(0);assert x.shape==(11,8,48,96) and y.shape==(5,48,96);p=ROOT/c["data"]["manifest"];p.parent.mkdir(parents=True,exist_ok=True);p.write_text(json.dumps({"format_version":c["data"]["format_version"],"input_shape":[11,8,48,96],"target_shape":[5,48,96],"forecast_weeks":[1,2,3,4,5],"resolution_degrees":0.5,"sources":["GLEAM","ERA5","GEFSv12","ECMWF S2S"],"synthetic":True},indent=2));print(p) | |