CrocoDash.extract_forcings package#

Subpackages#

Submodules#

CrocoDash.extract_forcings.driver module#

CrocoDash.extract_forcings.utils module#

class CrocoDash.extract_forcings.utils.Config(config_path: str = 'config.json')#

Bases: object

keys()#
CrocoDash.extract_forcings.utils.check_date_continuity(boundary_file_list: dict)#

Check for overlaps or missing dates between consecutive files.

CrocoDash.extract_forcings.utils.parse_dataset_folder(folder: str | Path, input_dataset_regex: str, date_format: str)#

Parse a folder to find and extract dataset file information based on a regex pattern.

Parameters:
  • folder (str or Path) – Path to the folder containing the dataset files.

  • input_dataset_regex (str) – Regular expression pattern to match dataset filenames. Example: “(north|east|south|west)_unprocessed.(d{8})_(d{8}).nc”

  • date_format (str) – Date format string used to parse dates in filenames (e.g., “%Y%m%d”).

Returns:

Dictionary mapping boundaries to a list of tuples with: - Start date (datetime) - End date (datetime) - Full file path (Path)

Example: {

”north”: [(datetime(2000, 1, 1), datetime(2000, 1, 2), Path(“/path/to/north_20000101_20000102.nc”))], “east”: [(datetime(2000, 1, 3), datetime(2000, 1, 4), Path(“/path/to/east_20000103_20000104.nc”))]

}

Return type:

dict

Module contents#