Giter VIP home page Giter VIP logo

stratification's Introduction

Vertical stratification generator (with GUI)

Create an initial vertical profile of constituents (e.g., temperature, salinity, pollutants and tracers) to use as data input for Delft3d numerical model

In the current stage, this program has been tested only to create a temperature stratification profile; further tests must be conducted to check if it works for other constituents too.

The algorithm requires as input data the following information:

  1. the number of grid points in m- and n- direction (same pair of integer name specified in mdf file)
  2. a text file indicating the profile of each activated constituent (profile must be specified from bottom to surface)

The program generates an output file, stratification.ini, that can be used in the Delft3D model. The input file must be specified in the Delf3D: Flow > Flow input > Initial conditions. In the dropdown list, you must select Initial conditions file and specify the file generated by the program.

PS 1: Make sure that the activated constituent has been activated in Delft3D. For example, if you wish to create an initial temperature profile, make sure that Temperature is selected in Flow > Flow input > Processes > Constituents.

PS 2: Make sure that the pair of integers specified in the program correspond with the values displayed in the .mdf file

To run the code, the user must have installed the following packages in a Python interpreter:

  1. Numpy
  2. Tkinter (for the GUI)

----- How to install Python and run the script above ------

The steps below describes the installation instruction to install Anaconda, which is the simplest way to run the codes in a Python interpreter.

  1. Go to Anaconda website (https://www.anaconda.com/) and find the option for Anaconda distribution;
  2. Choose the Python 3.x graphical installer version (note that there are three options for operating system: Windows, macOS, and Linux);
  3. Install the Anaconda interpreter;
  • Nitime (0.7 or compatible): conda install -c conda-forge nitime
  • Reportlab (3.5 or compatible): conda install -c anaconda reportlab

Attention: If you already have anaconda installed in your computer, make sure that the above packages are installed and the anaconda version has Python 3.X. If you use another interpreter, make sure that the following packages are installed in the your python interpreter: Numpy 1.16.3 and tk (tkinter) 8.6.8, or compatibles versions.

  1. After the installation of a python interpreter, download both scripts (stratification.py and stratification-gui.py) from this repository;
  2. Put everything in the same folder and run the script called stratification-gui.py;
  3. A graphical user interface (GUI) should be launched in seconds;

stratification's People

Contributors

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