Saravanan666/pypi-org huggingface dataset:
Package: hydroeval
hydroevalis an open-sourceevaluatorof goodness of fit between
simulated and observed streamflow time series in Python. It is licensed
under GNU GPL-3.0. The package provides a bundle of the most commonly
used objective functions in hydrological science. The package is designed
to calculate all objective functions in a vectorised manner (usingnumpy, and therefore C code
in the background) which makes for very efficient computation of the
objective functions.If you are usinghydroeval, please consider citing the software as
follows (click on the link to get the DOI of a specific version):Hallouin, T. (XXXX). HydroEval: Streamflow Simulations Evaluator (Version X.X.X). Zenodo.https://doi.org/10.5281/zenodo.2591217Brief overview of the APIimporthydroevalashesimulations=[5.3,4.2,5.7,2.3]evaluations=[4.7,4.3,5.5,2.7]nse=he.evaluator(he.nse,simulations,evaluations)kge,r,alpha,beta=he.evaluator(he.kge,simulations,evaluations)Objective functions availableThe objective functions currently available inhydroevalto evaluate the fit
between observed and simulated streamflow time series are as follows:Nash-Sutcliffe Efficiency(nse)Original Kling-Gupta Efficiency(kge) and its three components (r, α, β)Modified Kling-Gupta Efficiency(kgeprime) and its three components (r, γ, β)Non-Parametric Kling-Gupta Efficiency(kgenp) and its three components (r, α, β)Root Mean Square Error (rmse)Mean Absolute Relative Error (mare)Percent Bias (pbias)Moreover, some objective functions can be calculated in a bounded version followingMathevet et al. (2006):Bounded Nash-Sutcliffe Efficiency (nse_c2m)Bounded Original Kling-Gupta Efficiency (kge_c2m)Bounded Modified Kling-Gupta Efficiency (kgeprime_c2m)Bounded Non-Parametric Kling-Gupta Efficiency (kgenp_c2m)Finally, theevaluatorcan take an optional argumenttransform.
This argument allows to apply a transformation on both the observed and the
simulated streamflow time series prior the calculation of the objective function.
The possible transformations are as follows:Inverted flows (usingtransform=’inv’)Square Root-transformed flows (usingtransform=’sqrt’)Natural Logarithm-transformed flows (usingtransform=’log’)AcknowledgementEarly versions of this tool were developed with the financial support of
Ireland’s Environmental Protection Agency (Grant Number 2014-W-LS-5).
Package: hydrogels
hydrogelsSimulation and Numerical Integration for Hydrogel DegradationThis repository contains a variety of tools for simulating hydrogels. The main part of the code is for generating configurations and simulation systems for use with the software package called ReaDDy.Then, in thetheoryfolder, a numerical integration framework for integrating differential equations can be found. This is used for describing the enzymatic degradation of a hydrogel nanoparticle. This module in particular contains C++/Python code that is bound usingpybind11. Also contained in the main repository, are Jupyter Notebooks with examples of how to use thehydrogels.theorymodule.Pre-requisites:hydrogelsis available on Linux, MacOS and Windows using Python3.6,3.7,3.8, and3.9.At the time of writing it is only possible to install the package on a Linux architecture. This requires the following prerequisites:gxxpybind11numpypandasreaddyscipynetworkxsoftnanotoolsstarpolymersInstalling most these packages is generally trivial and can be done using eitherpiporanaconda. However installreaddyis typically done only by usinganaconda.# optional - only add if you don't have it alreadycondaconfig--addchannelsconda-forge# install readdycondainstall-creaddyreaddyIn our continuous integration, we provide a method for installingreaddyviapip, but in some environments, in particular on local machines, problems locatingHDF5can arise, hence we recommend usingcondainstead. Here is how to buildreaddymanually usingpip:gitclonehttps://github.com/readdy/readdypushdreaddy
pipinstall.popdInstallinghydrogelsTo install, do the following command from the main directory:pipinstall.And to test (also from the main directory):pytest--import-mode=importlib
Package: hydrogen
The full documentation, including a tutorial and autogenerated method documentation, is available onReadTheDocs.GeneralHydroGenis a hydrograph generator, i.e. a tool for the stochastic generation of domestic water consumption events. Domestic water events are generated as rectangular pulses according to user-provided probability distributions and consumption data. This package was developed in parallel with the WaterHub Modelica package (see projectWaterHubfor more information).HydroGenis still under heavy development.
Package: hydrogen-pfhx
hydrogen-pfhxChemical engineering model of hydrogen plate-fin heat exchanger.Installationpip install hydrogen-pfhxUsagehydrogen-pfhx is used to model the cryogenic plate-fin heat exchanger used within hydrogen liquefaction plants.
Two examples are given below:Run with a python IDE (e.g. visual studio)see thetest fileA jupyter notebook using google colabopen the test notebook in colabClick "Copy to drive" (just below filebar) then run the notebook.Note: saving data will require approval for google drive usage.
Package: hydrogibs
hydrogibsSmall hydrology package created for the sake of a class projects withChristophe Anceyand Giovanni De Cesare.The only module that's currently usable is the GR4 model containing:A Catchment object:Catchment(X1, X2, X3, X4, surface=1, initial_volume=0)withX1 within [0,1]X2 [mm]X3 within [0,1]X4 [h]surface [km^2]initial_volume [mm]Preset catchments:Defined asLaval(X1=57.6/100, X2=7.8, X3=2.4/100, X4=0.38, *args, **kwargs), the available presets (listed in thepresetsdictionary) are:LavalErlenbachRimbaudLatteSapineRietholzbachLumpenenbachVogelbachBrusquetA rain objectRain(time: numpy.ndarray, rainfall: numpy.ndarray)A block rain (rainfall = intensity if t < duration else 0):BlockRain(intensity: float, duration: float)An app to goof around with all parametersApp(catchment, rain)Hydraulic profileshydrogibs.fluvial.canal.Section(x_array, z_array).plot()Example fileexample.ipynbmight help you get the hang of this package
Package: hydrogpower
HydroGPowerHydroGPower is a Python package that utilizes Gaussian Process (GP) models for predicting time-series hydro-resources.InstallationTo use the HydroGPower tool, install the hydrogpower package:pipinstallhydrogpowerExample of usageWe created adataset_example.xlsxfile containing the time-series data at the script's path.fromhydrogpowerimportmainhydrogpower=main.HydroGPower(filename="dataset_example",horizont=5,M=2,seed=1234)hydrogpower.train_model()hydrogpower.predict()
Package: hydrogr
HydroGRHydrogr is a python language software package for hydrological modelling, that implement several conceptual rainfall-runoff models (GR4H, GR4J, GR5J, GR6J, GR2M, GR1A).
It is inspired from Irstea R language package:airGR.Getting StartedInstallationThe package can be installed with pip :python-mpipinstallhydrogrTest the installation by importing the package in Python :importhydrogrprint(hydrogr.__version__)ExamplesExamples based on the examples in the airGR package are available in theexample folderfor the different models.An example for calibrating models usingspotpyis also available.LicenseThis project is licensed under the GLP-2.0 License - see theLICENSE.mdfile for details.
Package: hydrogym
About this PackageHydroGym is an open-source library of challenge problems in data-driven modeling and control of fluid dynamics.FeaturesHierarchical:Designed for analysis and controller designfrom a high-level black-box interface to low-level operator accessHigh-level:hydrogym.env.FlowEnvclasses implement the OpenAIgym.EnvinterfaceIntermediate: Typical CFD interface withhydrogym.FlowConfigandhydrogym.TransientSolverclassesLow-level: Access to linearized operators and sparse scipy or PETSc CSR matricesModeling and anlysis tools:Global stability analysis (via SLEPc) and modal decompositions (via modred)Scalable:Individual environments parallelized with MPI with ahighly scalableRaybackend reinforcement learning training.InstallationTo begin using Hydrogym we can install its latest release viaPyPIwith pippipinstallhydrogymwhich provides the core functionality, and is able to launch reinforcement learning training on a Ray-cluster without an underlying Firedrake install. If you want to play around with Hydrogym locally on e.g. your laptop, we recommend a local Firedrake install. The instructions for which can be found in theInstallation Docs.Quickstart GuideHaving installed Hydrogym into our virtual environment experimenting with Hydrogym is as easy as starting the Python interpreterpythonand then setting up a Hydrogym environment instanceimporthydrogymashgymenv=hgym.env.CylEnv(Re=100)# Cylinder wake flow configurationforiinrange(num_steps):action=0.0# Put your control law here(lift,drag),reward,done,info=env.step(action)To test that you can run individual environment instances in a multithreaded fashion, run the steady-state Newton solver on the cylinder wake with 4 processors:cd/path/to/hydrogym/examples/cylinder
mpiexec-np4pythonpd-control.pyFor more detail, check out:A quick tour of features innotebooks/overview.ipynbExample codes for various simulation, modeling, and control tasks inexamplesTheReadTheDocsFlow configurationsThere are currently a number of main flow configurations, the most prominent of which are:Periodic cyclinder wake at Re=100Chaotic pinball at Re=130Open cavity at Re=7500with visualizations of the flow configurations available in thedocs.
Package: hydroinform
hydroinformThis package contains a steady-state stream model and some tools to access .dfs-files from DHIUsageConvert .dfs, res1d and res11-files to netCDF:#Import NetCDF and DFS from hydroinformfromhydroinformimportNetCDF,DFS#Saves "omr4_jag_3DSZ.dfs3 as "omr4_jag_3DSZ.nc"NetCDF.save_as_NetCDF('omr4_jag_3DSZ.dfs3')#Saves "omr4_jag_3DSZ.dfs3 as "newname.nc"NetCDF.save_as_NetCDF('omr4_jag_3DSZ.dfs3','newname.nc')#Saves only the first item and the second and fourth time step from "omr4_jag_3DSZ.dfs3""d=DFS.DFSBase.open_file('omr4_jag_3DSZ.dfs3')NetCDF.save_dfs_as_NetCDF(d,[0],[1,3],'omr4_jag_3DSZ_one_time.nc')#Saves the discharge data from "Storaa_HD_quasiStationary_20090701.res1d" as 'Storaa_HD_quasiStationary_20090701.nc'NetCDF.save_as_NetCDF('Storaa_HD_quasiStationary_20090701.res1d')Write a pump extraction file to be used with MikeZero:#Import DFS from HydroInformfromhydroinformimportDFS
importdatetime#The number of Items (In this case number of pumping wells)numberofitems=5;#Now create the file._tso=DFS.DFS0.new_file(r'c:\temp\extraction.dfs0',numberofitems);#Loop the items and set the units etc.foritemCountinrange(0,numberofitems):_tso.items[itemCount].value_type=DFS.DataValueType.MeanStepBackward_tso.items[itemCount].eum_item=DFS.EumItem.eumIPumpingRate_tso.items[itemCount].eum_unit=DFS.EumUnit.eumUm3PerYear_tso.items[itemCount].name="Item number: "+str(itemCount)#Loop the years where you have pumping datatscount=0;foryearinrange(2010,2016):#For every year append a new timestep_tso.append_time_step(datetime.datetime(year,12,31,12))#Loop the items and set a value for this timestepforitemCountinrange(0,numberofitems):#Sets the data. Note that timesteps count from 0 and Items count from 1_tso.set_data(tscount,itemCount+1,year*itemCount)tscount+=1#Call dispose which will save and close the file._tso.dispose()
Package: hydro-integrations
hydro-serving-integrationsThis repository contains implementations of integrations with AWS Sagemaker.Installation$pipinstallhydro-integrationsBefore you startTo create shadowing resources we utilize CloudFormation templates. To proceed with the stack creation, make sure that you have the following rights on your AWS IAM user/role.{"Version":"2012-10-17","Statement":[{"Sid":"VisualEditor0","Effect":"Allow","Action":["lambda:CreateFunction","iam:GetRole","lambda:InvokeFunction","lambda:ListVersionsByFunction","iam:CreateRole","iam:DeleteRole","lambda:GetFunctionConfiguration","iam:PutRolePolicy","cloudformation:DescribeStacks","lambda:PutFunctionConcurrency","iam:PassRole","cloudformation:DescribeStackEvents","lambda:AddPermission","cloudformation:CreateStack","cloudformation:UpdateStack","iam:DeleteRolePolicy","cloudformation:DeleteStack","lambda:DeleteFunction","lambda:PublishVersion","lambda:RemovePermission","iam:GetRolePolicy"],"Resource":["arn:aws:cloudformation:*:*:stack/*/*","arn:aws:lambda:*:*:function:*","arn:aws:iam::*:role/*"]},{"Sid":"VisualEditor1","Effect":"Allow","Action":["s3:PutBucketNotification","s3:CreateBucket","s3:GetBucketNotification","s3:GetBucketLocation","s3:DeleteBucket","s3:GetObject"],"Resource":"*"}]}Usagefromhydro_integrations.aws.sagemakerimportTrafficShadowingfromsagemaker.modelimportModelfromsagemaker.model_monitor.data_capture_configimportDataCaptureConfig# Create Sagemaker Modelmodel=Model(...)# Define data capture configdata_capture_config=DataCaptureConfig(enable_capture=True,sampling_percentage=100,destination_s3_uri="s3://bucket/data/captured")# Deploy Sagemaker model with the specified# data capture configpredictor=model.deploy(initial_instance_count=1,instance_type='ml.m4.xlarge',endpoint_name='model-shadowing-example',data_capture_config=data_capture_config)# Deploy TrafficShadowing CloudFormation stack.shadowing=TrafficShadowing(hydrosphere_endpoint="https://<hydrosphere>",s3_data_training_uri="s3://bucket/data/training",data_capture_config=data_capture_config,)shadowing.deploy()How it worksOnce you've enabled data capturing on your AWS Sagemaker Endpoint, you can deploy TrafficShadowing CloudFormation stack, which contains AWS Lambda function responsible for shadowing traffic from configured S3 bucket to Hydrosphere for analysis.Note, by defaultdestination_s3_uriparameter, specified in theDataCaptureConfig, represents a prefix where your requests will be stored. In the example above, we've deployed a model with the endpoint namemodel-shadowing-example. This means that all requests collected from that model endpoint will be placed unders3://bucket/data/captured/model-shadowing-examplepath. The Lambda function, deployed as part of theTrafficShadowingstack, expects that training data is organized in the same way, i.e., data used for training themodel-shadowing-examplemodel is placed unders3://bucket/data/training/model-shadowing-examplepath. Lambda function then finds the biggest.csvfile under that directory and uploads it to the Hydrosphere platform for building profiles for your model.
Package: hydrointerp
The hydrointerp package includes several interpolation functions specifically designed for hydrologic data. These are mainly derived fromScipyinterpolation functions likegriddata.DocumentationThe primary documentation for the package can be foundhere.Installationhydrointerp can be installed via pip or conda:pip install hydrointerpor:conda install -c mullenkamp hydrointerpThe core dependencies arePandas,Scipy,xarray, andpyproj.
Package: hydrolib-cmt
Case Management Tools (hydrolib-cmt)Open Source Case Management Tools forD3DFM/D-HYDROCMT includes:Generation of one or multiple cases for D-HYDRO using an uniform directory structureGeneration of cases as part of a StochasticTool (HydroConsult) workflowGeneration of rainfal events from STOWA parametersRun D-HYDRO scenarios in single or parallel modeOn-the-fly post-processing of results on desired location.Documentation:https://d2hydro.github.io/HYDROLIB-CMT/Source Code:https://github.com/d2hydro/hydrolib-cmtInstallationWe recommend to build your environment usingAnaconda. You can build an environment ánd install CMT by conda in one go using thisenvironment.ymlfrom the command-line:conda env create -f environment.ymlAfter creating your environment you can activate it with:conda activate hydrolibIn that activated environment you can add cmt with pip in the setup.py directory:pip install .Get startedThe repository contains a self-explanatoryJupyter Notebook(in Dutch). You can open it in an activated environment in the notebooks directory by:jupyter notebook stochasten_workflow.ipynbAboutCase Management Tools is developed and maintained byD2Hydroand freely available under an Open SourceMIT license.
Package: hydrolib-core
HYDROLIB-coreHYDROLIB-core is the core library of Python wrappers around the D-HYDRO model files (input and output) and model engines (kernel libraries).
It can serve as the basis for various pre- and postprocessing tools for a modelling workflow of hydrodynamic simulations.More informationMuch more information is available from the dedicated package website.Some quickstarts:First users:InstallationandTutorials.Developers:List of supported functionalities,API reference, andHow to contribute.Releases:hydrolib-core on PyPI,ChangeLog.Known issues and requested features: viaGitHub issues.
Package: hydrology-api-uk-client
Hydrology APIThis package was build for internal use, please feel free to use it but it may have bugsThis package is designed to read data from the UK governmentHydrology API.
The API provides:River Level, Flow and Water Quality DataRainfall DataGroundwater Level DataThis package currently only provides access to the River Level, Flow, and Rainfall.Examplefromhydrology_apiimportHydrologyAPI,Measure,process_hydrology_dataapi=HydrologyApi(max_threads=5)stations=api.get_stations_on_river('River Wear',Measure.LEVEL)print(f"Loading data for{len(stations)}stations:{stations['label'].values}")level_df=api.load(Measure.LEVEL,stations)level_df=process_hydrology_data(level_df)level_df.info()>>>Loadingdatafor5stations:['Chester Le Street''Witton Park''Sunderland Bridge''Stanhope''Durham New Elvet Bridge']>>>Loadingfromcache:https://environment.data.gov.uk/hydrology/data/batch-readings/batch/?measure=e7d8bbb6-5bba-4057-9f49-a299482c3348-level-i-900-m-qualified&mineq-date=2007-01-01>>>Loadingfromcache:https://environment.data.gov.uk/hydrology/data/batch-readings/batch/?measure=05784319-693a-4d75-b29e-32f01a99ee4f-level-i-900-m-qualified&mineq-date=2007-01-01>>>Loadingfromcache:https://environment.data.gov.uk/hydrology/data/batch-readings/batch/?measure=ddedb4d9-b2be-47c1-998d-acbc0ffb124b-level-i-900-m-qualified&mineq-date=2007-01-01>>>Loadingfromcache:https://environment.data.gov.uk/hydrology/data/batch-readings/batch/?measure=b29c481a-5012-40f5-bb0c-f9370be34975-level-i-900-m-qualified&mineq-date=2007-01-01>>>Loadingfromcache:https://environment.data.gov.uk/hydrology/data/batch-readings/batch/?measure=ba3f8598-e654-430d-9bb8-e1652e6ff93d-level-i-900-m-qualified&mineq-date=2007-01-01>>><class'pandas.core.frame.DataFrame'>>>>DatetimeIndex:590967entries,2007-01-0100:00:00to2023-11-0821:30:00>>>Freq:15T>>>Datacolumns(total5columns):>>>#   Column                   Non-Null Count   Dtype>>>---------------------------->>>0ChesterLeStreet590967non-nullfloat16>>>1DurhamNewElvetBridge563826non-nullfloat16>>>2Stanhope501615non-nullfloat16>>>3SunderlandBridge589418non-nullfloat16>>>4WittonPark585167non-nullfloat16>>>dtypes:float16(5)>>>memoryusage:10.1MB
Package: hydro-model-builder
Hydro Model BuilderPython package for the generation of water-related modelsFree software: MIT licenseDocumentation:https://hydro-model-builder.readthedocs.io.FeaturesTODOCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.1.0 (2018-06-07)First release on PyPI.
Package: hydromt-delft3dfm
What is the HydroMT-Delft3D FM pluginHydroMT(Hydro Model Tools) is an open-source Python package that facilitates the process of
building and analyzing spatial geoscientific models with a focus on water system models.
It does so by automating the workflow to go from raw data to a complete model instance which
is ready to run and to analyze model results once the simulation has finished.
This plugin provides an implementation of the model API for the Delft3DFMmodel.Why HydroMT-Delft3D FM?Setting up distributed hydrological models typically requires many (manual) steps
to process input data and might therefore be time consuming and hard to reproduce.
Especially improving models based on global-local geospatial datasets, which are
rapidly becoming available at increasingly high resolutions, might be challenging.
HydroMT-Delft3D FM aims to make the Delft3D FM model building and updating processesfast,modularandreproducibleand to facilitate the analysis of the model results.How to use HydroMT-Delft3D FM?The HydroMT-Delft3D FM plugin can be used as acommand lineapplication, which provides commands tobuild,
andupdatea Delft3D FM model with a single line, orfrom pythonto exploit its rich interface.
You can learn more about how to use HydroMT-Delft3D FM in itsonline documentation.For a smooth installing experience we recommend installing HydroMT-Delft3D FM and its dependencies
from conda-forge in a clean environment, seeinstallation guide.How to cite?For publications, please cite our work using the DOI provided in the Zenodo badge that points to the latest release.How to contribute?If you find any issues in the code or documentation feel free to leave an issue on thegithub issue tracker.You can find information about how to contribute to the HydroMT project at ourcontributing page.HydroMT seeks active contribution from the (hydro) geoscientific community.
So far, it has been developed and tested with a range ofDeltaresmodels, but
we believe it is applicable to a much wider set of geoscientific models and are
happy to discuss how it can be implemented for your model.
Package: hydromt-delwaq
What is HydroMT-delwaq?HydroMT-delwaq is a plugin of theHydroMT core, a python package, developed by Deltares, to build
and analyse environmental models. This plugin provides an implementation for theDELWAQwater quality engine.
It details the different steps and explains how to use HydroMT to easily get started and work on your own DELWAQ model. WIth this plugin
you can interact with both classicD-Water Qualitymodels as well asD-Emissionmodels.With theHydroMT-delwaq plugin, users can easily benefit from the rich set of tools of theHydroMT packageto build and update
DELWAQ models from available global and local data.This plugin assists the modeller in:Quickly setting up a model and default parameter valuesMaking maximum use of the best available global or local dataAdjusting and updating components of a DELWAQ model and their associated parameters in a consistent wayWater quality and emission, fate and transport of pollutants through the landscape, rivers and oceans is very much linked to the water movements.
For this reason, HydroMT strongly links DELWAQ modelbuilding to an underlying hydrology / hydraulic or hydrodynamic model. As of now, only the link
betweenWflow and DELWAQis supported.This plugin supports both:emission models,D-Emission(also referred to as EM in hydroMT), that predicts the quantity (fluxes) of substances being released from sources of pollutants to the surface waters (mass/time).fate and transport models,D-Water Quality(also referred to as WQ in hydroMT), that predicts the fate and transport of substances in the surface waters (concentrations in mass / volume).Why HydroMT-delwaq?Setting up spatial geoscientific models typically requires many (manual) steps
to process input data and might therefore be time consuming and hard to reproduce.
Like the other HydroMT model plugins, this package aims to make the model building processfast,modularandreproducibleby configuring the model building process from a singleiniconfiguration file
andmodel- and data-agnosticthrough a common model and data interface.How to use HydroMT-delwaq?HydroMT-delwaq can be used as acommand lineapplication, which provides commands tobuild,
andupdateDELWAQ model with a single line, in combination with the HydroMT core’s rich data processing capabilities.How to cite?For publications, please cite our work using the DOI provided in the Zenodo badgethat points to the latest release.How to contribute?If you find any issues in the code or documentation feel free to leave an issue on thegithub issue tracker.You can find information about contributing to HydroMT at ourContributing page.