Git Product home page Git Product logo

vrettasm / hydromodel Goto Github PK

View Code? Open in Web Editor NEW
2.0 1.0 0.0 692 KB

Hydrological Model (Berkeley). This project implements the underground (stochastic) hydrological model (in Python) that was developed during my postdoctoral tenure at the Dept. of Earth & Planetary Science, U. C. Berkeley, (2013 - 2016).

License: BSD 3-Clause "New" or "Revised" License

Python 100.00%
python3 hydrology-statistical stochastic-modeling underground-water

hydromodel's Introduction

HydroModel - Berkeley (version 1.0)


This project implements the underground (stochastic) hydrological model (in Python) that was developed during my postdoctoral tenure at the Dept. of Earth & Planetary Science, U. C. Berkeley, (2013 - 2016).

There might be updates in the future, but this first version is now fully operational. The hydrological data (water table depths, precipitation values, etc.) are not available online and could be accessible only through communication to Prof. Inez Fung (PI of the project).

M. Vrettas, PhD.

Data Format


The hydrological input data must be provided in a csv-file format with the following structure:

ID Date Precipitation Water Table Depth
1 733681 0.00 -10.4001
2 733682 0.01 -10.4151
3 733683 0.24 -10.4151
... ... ... ...

The Date is a 'datenum' MATLAB's object. The Precipitation is given in [L: cm] and the Water Table Depths are in [L: m] units (increasing downwards). The negative sign indicates underground values but in the code this is removed.

Note: We need to convert the dates (from MATLAB to Python). The value 719529 is MATLAB's datenum value of the "Unix epoch" start (1970-01-01), which is the default origin for pandas.to_datetime(). Hence, internally, in the code is performed the following:

timestamps = pd.to_datetime(r_datenum - 719529, unit='D')

Warning: The precipitation column is not allowed to have NaN values. In such case an error will be raised and terminate the program.

Installation


There are two options to install the software.

  1. The easiest way is to visit the GitHub web-page of the project and download the code in zip format. This option does not require a prior installation of git on the computer.

  2. Alternatively one can clone the project directly using git as follows:

    $ git clone https://github.com/vrettasm/HydroModel.git

Required packages

The recommended version is Python 3.6+. Some required packages are:

Numpy, Scipy, Numba, Pandas, h5py, json

To simplify the required packages just use:

$ pip install -r requirements.txt

How to run


To execute the program, first navigate to the main directory of the project (i.e. where the berkeley_hydro_main.py is located), and then run the following command:

$ python3 -O berkeley_hydro_main.py --params ./model_parameters/input_parameters.json

The ‘-O’ option is not necessary, but it could speed up the execution of the simulation.

The models parameters should be given in the 'input_parameters.json' file as follows:

{ ...

  "Hydrological_Model": {
    "Name": "vrettas_fung",
    "Porosity_Profile": "Stratified"
  },

  "Soil_Properties": {
    "n": 2.0,
    "a0": 0.009,
    "psi_sat": -0.0047,
    "epsilon": 1.0e-7
  },

  ...
}

Note: This assumes that the ‘input_parameters.json’ file includes the datafile location in the:

“Data_Filename”: “path/to/datafile.csv”

References


The work is described with details in two (open access) publications:

  1. Michail D. Vrettas and Inez Y. Fung (2015). "Toward a new parameterization of hydraulic conductivity in climate models: Simulation of rapid groundwater fluctuations in Northern California". Journal of Advances in Modeling Earth Systems (JAMES), vol. (7), issue (4), pp:2105-2135.

  2. Michail D. Vrettas and Inez Y. Fung (2017). "Sensitivity of transpiration to subsurface properties: Exploration with a 1-D model". Journal of Advances in Modeling Earth Systems (JAMES), vol. (9), issue (2), pp:1030-1045.

Contact


For any questions / comments please contact me at: [email protected]

hydromodel's People

Contributors

dependabot[bot] avatar vrettasm avatar

Stargazers

 avatar  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.