GithubHelp home page GithubHelp logo

afjal1991 / gridtools Goto Github PK

View Code? Open in Web Editor NEW

This project forked from esmg/gridtools

1.0 0.0 0.0 28.97 MB

A collection of grid generation tools.

License: Other

Shell 0.25% Python 98.19% TeX 1.30% Makefile 0.12% Batchfile 0.15%

gridtools's Introduction

gridtools

A generic set of grid manipulation tools for computer models. These tools are adapted from the ROMS ocean model and for specific use in the MOM6 ocean model. One could hope it can be kept generic enough to support any model. The focus is on supporting the MOM6 ocean model.

For in depth details about the MOM6 ocean model, please visit provided wiki pages. Technical details about this repository can be found below. For usage of the GridUtils library, please visit the user manual.

Various examples are available to demonstrate manipulation of new and existing grids in an iterative or interactive (application) form.

Python notebooks:

Python scripts:

Operational Modes

Command Line

Using the command line or writing your own python scripts is also possible utilizing this library. Please see the python scripts in the examples folder.

Command Line Widget Mode

  • ipython --pylab

The interpreter, ipython, can run python scripts and notebook scripts. To run a notebook script, you can use ipython -c "%run your_script.ipynb". Or start ipython, and then %run your_script.ipynb.

The example python scripts can also be run with ipython.

Jupyter notebook

  • jupyter notebook

These prefer notebook files (ipynb). Please see the mkGridIterative.ipynb notebook for a hands on way to access the grid generation library.

A simple graphical user interface (GUI) was built and is available using the mkGridInteractive.ipynb notebook.

Jupyter lab

  • jupyter lab

These prefer notebook files (ipynb). Please see the mkGridIterative.ipynb notebook for a hands on way to access the grid generation library. Jupyter lab also provides a command console for running python scripts.

Application

The grid generation application, mkGridInteractive.ipynb, can be run using jupyter on a cloud hosting system.

mybinder.org

  • Main: Binder
  • Dev: Binder

NOTE: This is provided as a point of demonstration. These cloud system instances do not persist for a long period of time and should not be used in production. Any information created on these systems should be backed up as soon as possible.

The form at mybinder.org can be manually filled out instead of useing the links above:

  • GitHub=https://github.com/ESMG/gridtools
  • Git ref=main
  • Launch
  • Once the server loads, navigate to gridTools/mkMapInteractive.ipynb
  • Re-run all the cells
  • Have fun with the grid editor.

Installation

If you plan to use the grid generation software on your system, you need to peform the following steps or follow the local installation tutorial.

Step 1

Install conda or manually install the python libraries and software dependencies that would allow you to run the python scripts or notebooks.

We have pulled together some pre-defined environments. You may also install an environment yourself. Please review the conda page for more information about conda.

We currently recommend the gridTools environment for use with this library.

NOTE: If conda cannot be used, a list of required software is provided. Once software and libraries are installed, the remaining software should be installable via pip and/or python's virtual environment (venv).

WARNING: If a new enviroment is to be prepared with conda/gridTools.yml, be prepared to wait a VERY LONG TIME for conda to resolve the environment. It is highly recommened to load a new environment with conda/gridTools_export.yml or conda/gridTools_explicit-linux-64.txt.

Step 2

Download or clone the ESMG/gridtools repository.

The python setup.py install method is now considered a legacy installation method. Please use the python -m pip install . method.

pip

$ cd gridtools
$ python -m pip install .

If using conda, only minimal changes will be noted.

Workarounds

These are the current workarounds that are required for the grid toolset package. You may need to perform these steps once if you plan to install a copy of the grid generation software.

NOTE: These workarounds should be automatically installed with an installation of gridtools in step 2 using pip.

nodejs

OPTIONAL: This package is optional. If not using conda, this package is needed to avoid a warning when starting up jupyter.

Could not determine jupyterlab build status without nodejs.

numpypi

Portable intrinsics for numpy (REPO). For bitwise-the-same reproducable results, a numpy subset of computational functions are provided. These routines are slower than the numpy native routines. A repackaged installable REPO of the library.

xesmf

A slight modification to xesmf is required to fix a periodic boundary problem when regridding. Note that conda loads an older version of xesmf and then pip replaces it with a fixed copy.

Users using venv, a working compiled copy of ESMF and ESMPy need to be installed prior to installing gridutils via pip.

More

Until we can activate Sphinx to create our body of documentation we will have to resort to upkeep of a manual index.

Documentation:

Development

This project is soliciting help in development. Please contribute ideas or bug requests using the issues tab. Code contributions can be sent via github's pull request process. Code adoption will follow the contribution process. Development can be discussed in the MOM6 forum.

gridtools's People

Contributors

jr3cermak avatar jsimkins2 avatar angus-g avatar kshedstrom avatar

Stargazers

 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.