Giter VIP home page Giter VIP logo

tjrcr's Introduction

TJRCR 1.0.0

Library for validating parameters for comprehensive reservoir regulation

Installation

pip install tjrcr

Getting Started

Required Data

For detailed data requirements, see the TJWB library. Reservoir data should span at least 10 years and include complete data for all 12 months each year for effective calculations.

Usage

import pandas as pd
from tjwb import WB

from tjrcr import TJRCR

pre_df = pd.read_csv('data_example.csv')
ets_df = pd.read_csv('elevation_to_storage_example.csv')

pre_df['boxdrain_cong1'] = pre_df['boxdrain_cong1'] / 100  # centimeters to meters
pre_df['valveoverflow_tran1'] = pre_df['valveoverflow_tran1'] / 100  # centimeters to meters
pre_df['valveoverflow_tran2'] = pre_df['valveoverflow_tran2'] / 100  # centimeters to meters
pre_df['valveoverflow_tran3'] = pre_df['valveoverflow_tran3'] / 100  # centimeters to meters
pre_df['timestamp'] = pd.to_datetime(pre_df['timestamp'], format='%d/%m/%Y %H:%M')  # convert to valid format

# Details in the TJWB library
tjwb = WB(
    ets_df,
    boxdrain_elevation=22.5,
    boxdrain_height=0.7,
    valveoverflow_elevation=22,
    valveoverflow_height=3
)

tjrcr = TJRCR(
    tjwb,
    ets_df=ets_df,
    V_c=0.66,  # dead water level
    V_h=2.22  # usable water level
)

result = tjrcr.is_comprehensive_regulation(
    pre_df=pre_df,
    eps=0.022,
    P=0.95,
    round_to=3,  # round results in water balance calculations
    forced_gt_10_year=False,  # require data set to be at least 10 years
    forced_12_months_each_year=True,  # require data set to have complete 12 months each year
    forced_elevation=False  # remove invalid data columns during water balance calculations
)

if result:
    print("Parameters are valid for comprehensive regulation")
else:
    print("Parameters are not valid for comprehensive regulation")

Changelog

Version 1.0.0 - Initial Release - July 21, 2024

  • Initial release with core functionalities

Each section in this changelog provides a summary of what was added, changed, fixed, or removed in each release, helping users and developers understand the evolution of the project and highlighting important updates or improvements.

tjrcr's People

Contributors

duynguyen02 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.