Coder Social home page Coder Social logo

spark-brc / swatmf Goto Github PK

View Code? Open in Web Editor NEW
6.0 1.0 1.0 132.7 MB

python modules for SWAT-MODFLOW model parameter estimation and uncertainty analysis

Home Page: https://pypi.org/project/swatmf

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

Python 100.00%
python swat-modflow pest

swatmf's Introduction

swatmf

PyPI Version

PyPI - License

image

swatmf is a set of python modules for SWAT-MODFLOW model (Bailey et al., 2016) parameter estimation and uncertainty analysis with the open-source suite PEST (Doherty 2010a and 2010b, and Doherty and other, 2010).

Uncertainty Analysis for SWAT-MODFLOW model

Get data and jupyter notebooks

You essentially have 2 options:

Easy way

Hard way (Dev mode)

  • You will need to install Git if you don't have it installed already. Downloads are available at [the link](https://git-scm.com/download). On windows, be sure to select the option that installs command-line tools
  • For Git, you will need to set up SSH keys to work with Github. To do so:
    • Go to GitHub.com and set up an account
    • On Windows, open Git Bash (on Mac/Linux, just open a terminal) and set up ssh keys if you haven't already. To do this, simply type ssh-keygen in git bash/terminal and accept all defaults (important note - when prompted for an optional passphrase, just hit return.)
  • Follow the instructions to set up the SSH keys with your GitHub account.
  • Clone the materials from GitHub.
    • Open a git bash shell from the start menu (or, on a Mac/Linux, open a terminal)
    • Navigate to the folder you made to put the course materials
    • Clone the materials by executing the following in the git bash or terminal window:
git clone https://github.com/spark-brc/swatmf.git

Installation

To execute jupyter notebook, we need the Miniconda environment.

1. Miniconda Python:

  • If you don't already have conda installed, please download Miniconda for your operating system from https://conda.io/en/latest/miniconda.html (choose the latest version for your operating system, 64-bit). You should not need elevated rights to install this.
  • Run the installer and select "only my user" when prompted. This will allow you to work with your python installation directly.

2. Set Environment and install libraries:

  • After installation, go to the START menu and select "Miniconda Prompt" to open a DOS box.
  • Type the following command:
conda install -c conda-forge mamba
  • Using the cd command in the Miniconda DOS box, navigate to the location where you have environment.yml the file and type:
mamba env create -f environment_swatmf.yml

and hit ENTER.

After your virtual environment setup is complete, change the environment to `swatmf`:

conda activate swatmf
  • Launch jupyter notebook
jupyter notebook

A browser window with a Jupyter notebook instance should open. Yay!

Brief overview of the API

from swatmf import swatmf_pst_utils

>>> wd = "User-SWAT-MODFLOW working directory"
>>> swat_wd = "User-SWAT working directory"
>>> swatmf_pst_utils.init_setup(wd, swat_wd)

Creating 'backup' folder ... passed
Creating 'echo' folder ... passed
Creating 'sufi2.in' folder ... passed
'Absolute_SWAT_Values.txt' file copied ... passed
'pestpp-glm' file copied ... passed
'pestpp-ies.exe' file copied ... passed
'pestpp-ies.exe' file copied ... passed
'forward_run.py' file copied ... passed

swatmf's People

Contributors

spark-brc avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

brc-hml

swatmf's Issues

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.