credit.datasets.gen_2.gefs_download#
Download raw GEFS cube-sphere initialization files for local Gen2 loading.
The downloader uses the same source configuration as GEFSDataset and
preserves the public GEFS layout:
{base_path}/gefs.YYYYMMDD/HH/atmos/init/{member}/gfs_ctrl.nc
{base_path}/gefs.YYYYMMDD/HH/atmos/init/{member}/gfs_data.tile1.nc
{base_path}/gefs.YYYYMMDD/HH/atmos/init/{member}/sfc_data.tile1.nc
All six atmospheric and six surface tiles are downloaded for every selected member and initialization time. Forecast lead products are not supported;
Command-line usage:
python -m credit.datasets.gen_2.gefs_download -c config/gefs.yml
python -m credit.datasets.gen_2.gefs_download -c config/gefs.yml --num-workers 8 --overwrite
Attributes#
Functions#
|
Download selected GEFS initialization files for local |
Module Contents#
- credit.datasets.gen_2.gefs_download.logger#
- credit.datasets.gen_2.gefs_download.download_gefs(data_config: dict[str, Any], num_workers: int = 4, overwrite: bool = False) None#
Download selected GEFS initialization files for local
GEFSDatasetuse.- Parameters:
data_config – Top-level
dataconfiguration with exactly onedataset_type: "gefs"source. The source must definebase_path. Omittedmembersdownloadsc00; an empty member list discovers all members in the first requested run.num_workers – Number of concurrent file downloads. Defaults to
4.overwrite – Redownload existing files when
True. Defaults toFalse.
- Raises:
KeyError – If the configuration does not contain a
sourceblock.ValueError – If the configuration has multiple sources, the wrong dataset type, no base path, or a forecast lead setting.
FileNotFoundError – If any selected member or required tile is missing for a requested initialization.
Example
>>> from credit.datasets.gen_2.gefs_download import download_gefs >>> download_gefs(config["data"], num_workers=8)
- credit.datasets.gen_2.gefs_download.parser#