easy_vic_build.Evb_dir_class
Directory and path manager for easy_vic_build cases.
The Evb_dir class centralizes case-folder creation and stores the
canonical file paths used by the build pipeline.
Example
>>> project = Evb_dir(cases_home="./cases")
>>> project.builddir("baseline_scenario")
>>> project.dpcFile_dir
Classes
|
Manage directory layout and key file paths for one VIC case. |
- class easy_vic_build.Evb_dir_class.Evb_dir(cases_home=None)[source]
Bases:
objectManage directory layout and key file paths for one VIC case.
Initialize the root folder and path placeholders.
- Parameters:
cases_home (str, optional) – Root directory that stores all cases. If
None, defaults toos.path.join(os.getcwd(), "cases").
- __init__(cases_home=None)[source]
Initialize the root folder and path placeholders.
- Parameters:
cases_home (str, optional) – Root directory that stores all cases. If
None, defaults toos.path.join(os.getcwd(), "cases").
- builddir(case_name)[source]
Create the case directory tree and assign standard file paths.
- Parameters:
case_name (str) – Case identifier used as the folder name under
cases_home.- Return type:
None
- attach_logger_file(logger: Logger, log_file: str | None = None, log_level: int | None = None, log_format: str | None = None, max_bytes: int = 10485760, backup_count: int = 5)[source]
Attach a rotating file handler to an existing logger.
If a file handler already exists, the logger is returned unchanged.
- Parameters:
logger (logging.Logger) – Logger instance to update.
log_file (str, optional) – Target log file path. Defaults to
<case>/VICLog/evb.log.log_level (int, optional) – Logger level override.
log_format (str, optional) – Custom formatter string. Uses
Default_log_formatwhen omitted.max_bytes (int, optional) – Maximum log size before rotation.
backup_count (int, optional) – Number of rotated log files to keep.
- Returns:
The same logger instance after handler setup.
- Return type:
logging.Logger
- property MeteForcing_src_dir
- property MeteForcing_src_suffix
- property forcing_prefix
- property vic_exe_path
- property dpc_VIC_level0_path
- property dpc_VIC_level1_path
- property dpc_VIC_level2_path
- property dpc_VIC_level3_path
- property dpc_VIC_plot_grid_basin_path
- property dpc_VIC_plot_columns_path
- property domainFile_path
- property veg_param_json_path
- property params_dataset_level0_path
- property params_dataset_level1_path
- property flow_direction_file_path
- property pourpoint_file_path
- property uhbox_file_path
- property rvic_param_cfg_file_path
- property rvic_param_cfg_file_reference_path
- property rvic_conv_cfg_file_path
- property rvic_conv_cfg_file_reference_path
- property rout_param_dir
- property globalParam_path
- property globalParam_reference_path
- property calibrate_cp_path