--- license: mit task_categories: - time-series-forecasting tags: - weather - climate - radiation - radiative-transfer - FuXi - FuXi-RTM - MLRTM - RRTMG pretty_name: FuXi-RTM Inference Results size_categories: - 1B **Need denser cadence or the full archive?** Open a discussion on this dataset page or contact the authors — we are happy to release more on demand. ## Inner Data Structure of Each `.tar.gz` After extraction, each archive expands to a per-init directory whose contents follow the layout produced by `infer_onnx_release.py`: ``` / # e.g. 2024010112/ ├── 1.zarr/ ← lead step 1 (T+6h if --hour_interval 6) ├── 2.zarr/ ← lead step 2 (T+12h) ├── 3.zarr/ ← lead step 3 (T+18h) ├── ... └── N.zarr/ ← lead step N ``` - **Format:** [Zarr v2](https://zarr.readthedocs.io/) directory stores (one per lead step). Use the `--save_type nc` flag in the inference script if you prefer NetCDF. - **Tensor dimensions:** `(time, channel, lat, lon)` - **Temporal cadence:** 6-hourly (matches the `_6h_` in the folder name) - **Multi-member ensembles** (when produced with `--total_member > 1`) follow the pattern `m_.zarr`. ### `RTM_tar_gz/` — RRTMG training/test data for MLRTM This directory contains shortwave radiation fields produced by running the **RRTMG** (Rapid Radiative Transfer Model for GCMs) radiative-transfer scheme offline. It is the **training and test set for the MLRTM neural radiation emulator**, *not* a forecasting result. Files are organized by variable and year: | File | Variable | Description | |---|---|---| | `ssrd_.tar.gz` | `ssrd` | Surface solar radiation downwards (single-level, all-sky) | | `swdflx_.tar.gz` | `swdflx` | Shortwave **downward** flux profile, **all-sky** | | `swdflxc_.tar.gz` | `swdflxc` | Shortwave **downward** flux profile, **clear-sky** | | `swuflx_.tar.gz` | `swuflx` | Shortwave **upward** flux profile, **all-sky** | | `swuflxc_.tar.gz` | `swuflxc` | Shortwave **upward** flux profile, **clear-sky** | - Years released: **2017** (training) and **2018** (testing). - All-sky / clear-sky pairs let the emulator learn cloud radiative effects as a residual. ## How to Use ### 1. Download ```bash pip install huggingface_hub hf download --repo-type dataset qiusheng/FuXi-RTM \ --include "RTM_exp_re4_6h_tar_gz/2024010112.tar.gz" \ --local-dir ./fuxi_rtm ``` Or pull the whole dataset (≈ several TB; not recommended unless you really need it): ```bash hf download --repo-type dataset qiusheng/FuXi-RTM --local-dir ./fuxi_rtm ``` ### 2. Extract a forecast bundle ```bash mkdir -p forecasts && tar -xzf fuxi_rtm/RTM_exp_re4_6h_tar_gz/2024010112.tar.gz -C forecasts/ ``` ### 3. Read with `xarray` ```python import xarray as xr ds = xr.open_zarr("forecasts/2024010112/24.zarr") # 24 × 6h = T+144h forecast print(ds) ``` ## Reproducing the Inference The included `infer_onnx_release.py` is the exact script used to produce these archives. ### Dependencies ```bash pip install numpy xarray pandas onnxruntime-gpu # or onnxruntime (CPU) ``` ### Basic usage ```bash python infer_onnx_release.py \ --model \ --input \ --save_dir \ --total_step 400 \ --hour_interval 6 ``` ### Key arguments | Argument | Default | Description | |---|---|---| | `--model` | `exps/RTM_onnx/base_tf/model/test.onnx` | Path to ONNX model file | | `--input` | `datasets/era5.rtm.02_25.6h.c109.new3/` | Input data path (NetCDF/Zarr) | | `--save_dir` | `eval/save` | Output directory | | `--save_type` | `zarr` | `nc` or `zarr` | | `--device` | `cuda` | `cuda` or `cpu` | | `--dtype` | `fp32` | `fp16` or `fp32` | | `--batch_size` | `1` | Number of parallel processes (>1 enables multi-process mode) | | `--total_step` | `400` | Total prediction steps | | `--total_member` | `1` | Number of ensemble members | | `--hour_interval` | `6` | Time interval (hours) | | `--time_splite` | `20240101 20250531` | Time range | | `--init_time_hour` | `0 12` | Initialization hours | ### Execution modes - **Single-process** (`--batch_size 1`): sequential rollout — useful for debugging or limited GPU memory. - **Multi-process** (`--batch_size N`): launches `N` independent worker processes, each loading the model and running one ensemble member in parallel. ### Input data requirements - Format: Zarr or NetCDF. - Dimensions: `(time, channel, lat, lon)`. - Must include `mean.nc` and `std.nc` files for input normalization / output denormalization. ## Citation If you use this dataset, please cite the FuXi-RTM paper (citation block to be added on publication). ## License Released under the MIT license. ## Contact Questions, denser-cadence requests, or issues with the data — please open a discussion on this dataset page.