mindearth.utils.get_datapath_from_date
- mindearth.utils.get_datapath_from_date(start_date, idx)[source]
Get data file name of given start date and index of the data.
- Parameters
start_date (datetime.datetime) – The start date of data.
idx (int) – The index of data.
- Returns
date_file_name (str). The data file name. static_file_name (str). The static file name.
- Supported Platforms:
Ascend
CPU
GPU
Examples
>>> from mindearth.utils import get_datapath_from_date >>> date = datetime.datetime(2019, 1, 1, 0, 0, 0) >>> idx = 1 >>> date_file_name, static_file_name = get_datapath_from_date(date, idx) >>> print(f"date_file_name: {date_file_name}, static_file_name: {static_file_name}") date_file_name: 2019/2019_01_01_2.npy, static_file_name: 2019/2019.npy