Metadata-Version: 2.4
Name: easy_vic_build
Version: 0.1.0
Summary: An open-source Python package for VIC model deployment.
Author-email: XudongZheng <zhengxd@sehemodel.club>
License: MIT License
        
        Copyright (c) [2025] [easy_vic_build]
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/XudongZhengSteven/easy_vic_build
Project-URL: Repository, https://github.com/XudongZhengSteven/easy_vic_build
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.21.2
Requires-Dist: pandas>=1.4.3
Requires-Dist: matplotlib>=3.9.2
Requires-Dist: scipy>=1.13.1
Requires-Dist: tqdm>=4.66.5
Requires-Dist: eofs>=2.0.0
Requires-Dist: geopandas>=0.10.1
Requires-Dist: netcdf4>=1.7.1
Requires-Dist: cfgrib>=0.9.10.3
Requires-Dist: xarray>=2023.8.0
Requires-Dist: rasterio>=1.4.1
Requires-Dist: cartopy>=0.23.0
Requires-Dist: shapely>=2.0.6
Requires-Dist: cdo>=1.6.1
Requires-Dist: whitebox-workflows>=1.3.3
Requires-Dist: deap>=1.4.1
Provides-Extra: dev
Requires-Dist: pytest>=6.0; extra == "dev"
Requires-Dist: black>=21.0; extra == "dev"
Provides-Extra: nco
Requires-Dist: nco>=1.1.2; extra == "nco"
Provides-Extra: rvic
Requires-Dist: rvic>=1.1.1; extra == "rvic"
Provides-Extra: nco-rvic
Requires-Dist: nco>=1.1.2; extra == "nco-rvic"
Requires-Dist: rvic>=1.1.1; extra == "nco-rvic"
Dynamic: license-file

# easy_vic_build[![easy_vic_build Logo](docs/logo_small_size.png)](https://github.com/XudongZhengSteven/easy_vic_build)

This is an open-source Python package for deploying the VIC model.  
![EVB_Architecture](docs/evb_architecture.svg)

## Installation

To install the package, run one of the following commands:

- Basic installation:

  ```bash
  pip install easy_vic_build
  ```

- For additional dependencies, choose one of the following options:
  ```bash
  pip install easy_vic_build[nco]
  pip install easy_vic_build[rvic]
  pip install easy_vic_build[nco_rvic]
  ```

Alternatively, you can install from a `.whl` file:

- Basic installation:

  ```bash
  pip install .whl
  ```

- For additional dependencies:

  ```bash
  pip install .whl[nco]
  pip install .whl[rvic]
  pip install .whl[nco_rvic]

  conda install -c conda-forge gdal
  ```

Choose the appropriate installation based on your environment requirements.

For development purposes, you can install the package directly from the repository:

```bash
git clone https://github.com/XudongZhengSteven/easy_vic_build
cd easy_vic_build
pip install -e .
```

## Usage

After installation, you can use the package in the following sequence:

1. **Build DPC** (`build_dpc`)
2. **Build Domain** (`build_Domain`)
3. **Build Parameters** (`build_Param`)
4. **Perform Hydroanalysis** (`build_hydroanalysis`)
5. **Build Meteorological Forcing** (`build_MeteForcing`) or (`build_MeteForcing_nco`)
6. **Build RVIC Parameters** (`build_RVIC_Param`)
7. **Build Global Parameters** (`build_GlobalParam`)
8. **Calibrate the Model** (`calibrate`)

Other
**Plot Basin Map** (`plot_Basin_map`)  
(Note: You must first run `hydroanalysis_for_basin`)
**Plot VIC Results** (`plot_VIC_result`)

## Features

- Easily deploy the VIC model with multiple configuration options.
- Integrated support for different meteorological forcing formats.
- Support for hydrological analysis and visualization of results.

## Documentation

📖 [Read the documentation here](https://XudongZhengSteven.github.io/easy_vic_build/)[![Documentation Status](https://img.shields.io/badge/docs-online-brightgreen)](https://XudongZhengSteven.github.io/easy_vic_build/)

## Contributing

If you wish to contribute to this project, feel free to fork the repository and submit pull requests. Please ensure that you follow the project's coding guidelines and add relevant tests for new features.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

## Contact

- **Author**: Xudong Zheng
- **Email**: zhengxd@sehemodel.club
- **GitHub**: [@XudongZhengSteven](https://github.com/XudongZhengSteven)

## Notes

1. **RVIC Compilation Note**  
   Please note that **RVIC** should not be compiled with **VIC** if you wish to use parallel processing (e.g., `mpiexec`).

   There are two types of compilation:

   - **Compile VIC with RVIC**:  
     You can run VIC with RVIC and set different timesteps.
   - **Compile VIC without RVIC**:  
     You can run VIC in parallel, but you will need to run RVIC separately (`rvic.convolution.convolution`).  
     Make sure to prepare the `rvic.convolution.cfg` configuration file.  
     Additionally, ensure that the VIC output timestep (daily or hourly) matches the UHBOX timestep (86400 seconds for daily, 3600 seconds for hourly).

## Citation

If you use this package in your research, please cite it as follows:

```plaintext
Zheng, X., Liu, D., Tang, Q., Li, Q., & Wang, H. (under review). An open-source Python framework for the scalable deployment and advanced applications of the Variable Infiltration Capacity (VIC) model. *Environmental Modelling & Software*.

Retrieved from https://github.com/XudongZhengSteven/easy_vic_build
```

## TODO

distributed save: dpc (each component saved, a copuler can be used for combined these components into a dpc)
