easy_vic_build
easy_vic_build - A Python package for easily building VIC model.
This package provides an open-source Python framework for scalable deployment and advanced applications of the VIC model. It streamlines the process of configuring, preparing, and calibrating the VIC model, and supports automation, preprocessing, and postprocessing workflows. The package is designed to improve efficiency and reduce the complexity of VIC model deployment.
Submodules:
tools: A subpackage containing utility modules for supporting VIC model deployment.
build_dpc: Module for building data processing class at three levels.
build_GlobalParam: Module for building the global parameter file.
build_hydroanalysis: Module for performing hydroanalysis tasks.
build_MeteForcing_nco: Module for building meteorological forcing files with nco.
build_MeteForcing: Module for building meteorological forcing files without nco.
build_RVIC_Param: Module for building RVIC parameter files.
build_Domain: Module for building domain files.
build_Param: Module for building VIC parameter files.
calibrate: Module for calibrating VIC model.
Evb_dir_class: Module containing Evb_dir class for managing path and directory.
warmup: Module for warmuping VIC model.
Usage:
Perform hydrological analysis for level0
Build DPC (build_dpc)
Build Domain (build_Domain)
Build Parameters (build_Param)
Perform Hydroanalysis for level1 (build_hydroanalysis)
Build Meteorological Forcing (build_MeteForcing) or (build_MeteForcing_nco)
Build RVIC Parameters (build_RVIC_Param)
Build Global Parameters (build_GlobalParam)
Calibrate the Model (calibrate)
Plot Basin Map (plot_Basin_map), note that you must first run hydroanalysis_for_basin
Plot VIC Results (plot_VIC_result)
Version: 0.1.0 Author: Xudong Zheng License: MIT
- easy_vic_build.setup_logger(log_level=None, log_format=None, log_to_file=None, log_file=None)[source]
Configure the logger with user-defined settings.
This function allows users to dynamically modify the logger’s configuration, including the logging level, format, and output destination (console or file). If no parameters are provided, the default configuration is used.
Parameters:
- log_levelint, optional
The logging level to set. Default is None (no change).
- log_formatstr, optional
The log format to set. Default is None (no change).
- log_to_filebool, optional
Whether to log to a file. Default is None (no change).
- log_filestr, optional
If logging to a file, specify the file path. Default is None (no change).
Returns:
- Logging.Logger
The configured logger instance.
Example:
- To customize the logger configuration:
>>> setup_logger( ... log_level=logging.DEBUG, ... log_format="%(asctime)s - %(levelname)s - %(message)s", ... log_to_file=True, ... log_file="custom_log.log" ... )