|
1 | 1 | # gridtools
|
2 |
| -A collection of grid generation tools |
| 2 | + |
| 3 | +A generic set of grid manipulation tools for computer models. These tools are |
| 4 | +adapted from the ROMS ocean model and for specific use in the MOM6 ocean model. |
| 5 | +One could hope it can be kept generic enough to support any model. The focus |
| 6 | +is on supporting the MOM6 ocean model. |
| 7 | + |
| 8 | +For in depth details about the MOM6 ocean model, please visit provided |
| 9 | +[wiki](https://github.com/NOAA-GFDL/MOM6-examples/wiki) pages. Technical |
| 10 | +details about this repository can be found below. For usage of |
| 11 | +the GridUtils library, please visit the [user manual](docs/manual/GridUtils.md). |
| 12 | + |
| 13 | +Required items: |
| 14 | + * spherical.py |
| 15 | + * gridutils.py |
| 16 | + * app.py |
| 17 | + |
| 18 | +Optional items: |
| 19 | + * sysinfo.py |
| 20 | + |
| 21 | +Various tools are available to manipulation of new and existing grids in |
| 22 | +an iterative or interactive form. |
| 23 | + |
| 24 | +Python notebooks: |
| 25 | + * mkGridIterative.ipynb |
| 26 | + * mkGridInteractive.ipynb |
| 27 | + |
| 28 | +With this software, you should be able to operate in any mode you prefer. |
| 29 | + |
| 30 | +# Operational Modes |
| 31 | + |
| 32 | +## Command Line |
| 33 | + |
| 34 | +Using the command line or writing your own python scripts possible utilizing this library. |
| 35 | +To look at a few examples, please look at the mkGridsExample1.py, mkGridsExample2.py and |
| 36 | +mkGridsExample3.py programs. |
| 37 | + |
| 38 | +## Command Line Widget Mode |
| 39 | + |
| 40 | + * ipython --pylab |
| 41 | + |
| 42 | +The interpreter, ipython, can run python scripts and notebook scripts. To run a notebook |
| 43 | +script, you can use `ipython -c "%run your_script.ipynb"`. Or start ipython, and then |
| 44 | +`%run your_script.ipynb`. |
| 45 | + |
| 46 | +Again, the mkGridsExample.py programs can be run with ipython. |
| 47 | + |
| 48 | +## Jupyter notebook |
| 49 | + |
| 50 | + * jupyter notebook |
| 51 | + |
| 52 | +These prefer notebook files (ipynb). Please see the mkGridIterative.ipynb program for a hands |
| 53 | +on way to access the grid generation library. |
| 54 | + |
| 55 | +A simple graphical user interface (GUI) was built and is available when you run the |
| 56 | +mkGridInteractive.ipynb notebook. |
| 57 | + |
| 58 | +## Jupyter lab |
| 59 | + |
| 60 | + * jupyter lab |
| 61 | + |
| 62 | +These prefer notebook files (ipynb). Please see the mkGridIterative.ipynb program for a hands |
| 63 | +on way to access the grid generation library. |
| 64 | + |
| 65 | +A simple graphical user interface (GUI) was built and is available when you run the |
| 66 | +mkGridInteractive.ipynb notebook. |
| 67 | + |
| 68 | +## mybinder |
| 69 | + |
| 70 | + * Main: [](https://mybinder.org/v2/gh/ESMG/gridtools/main) |
| 71 | + * Dev: [](https://mybinder.org/v2/gh/ESMG/gridtools/dev) |
| 72 | + |
| 73 | +Instead of loading software on your computer, the library and application is hosted on a cloud system. You do not |
| 74 | +have to install anything on your system to use the cloud system's copy of the grid generation library. |
| 75 | + |
| 76 | +# Application |
| 77 | + |
| 78 | +The grid generation application, mkGridInteractive.ipynb, can be run on a cloud hosting system. The application has been adapted to work on mybinder.org. |
| 79 | +NOTICE: The mybinder application can take upwards to 30 minutes to build. |
| 80 | + |
| 81 | +Use the following options: |
| 82 | + * GitHub=https://github.com/ESMG/gridtools |
| 83 | + * Git ref=main |
| 84 | + * Launch |
| 85 | + * Once the server loads, navigate to gridTools/mkMapInteractive.ipynb |
| 86 | + * Re-run all the cells |
| 87 | + * Have fun with the grid editor. |
| 88 | + |
| 89 | +# Code contributions |
| 90 | + |
| 91 | +## Lambert Conformal Conic Grid Generation |
| 92 | +Author: Niki Zadeh [REPO](https://github.com/nikizadehgfdl/grid_generation) |
| 93 | + * [regional_grid_spheical.ipynb](https://github.com/nikizadehgfdl/grid_generation/blob/dev/jupynotebooks/regional_grid_spherical.ipynb) |
| 94 | + |
| 95 | +## Numpy bitwise-the-same floating-point values |
| 96 | +Author: Alistair Adcroft [REPO](https://github.com/adcroft/numpypi) |
| 97 | + * To obtain bitwise-the-same floating-point values in certain non-time-critical calculations. |
| 98 | + |
| 99 | +## ROMS to MOM6 Grid Converter |
| 100 | +Authors: Mehmet Ilicak; Alistair Adcroft [REPO](https://github.com/ESMG/pyroms) |
| 101 | + * [convert_ROMS_grid_to_MOM6.py](https://raw.githubusercontent.com/ESMG/pyroms/python3/examples/grid_MOM6/convert_ROMS_grid_to_MOM6.py) |
| 102 | + |
| 103 | +# Installation |
| 104 | + |
| 105 | +If you plan to use the grid generation software on your system, you need to peform the following steps. |
| 106 | + |
| 107 | +## Step 1 |
| 108 | + |
| 109 | +[Download](https://github.com/ESMG/gridtools/archive/refs/heads/main.zip) or [clone](https://github.com/ESMG/gridtools.git) the |
| 110 | +[ESMG/gridtools](https://github.com/ESMG/gridtools) repository. |
| 111 | + |
| 112 | +Discover the full directory path to gridtools/gridTools/lib. Place the full path in the environment variable `LIBROOT` if you are planning to run |
| 113 | +the python notebooks. If you are going to use the library in your scripts, simply append the full path to `PYTHONPATH`. In the future, we will enable |
| 114 | +installation using ptyhon pip. |
| 115 | + |
| 116 | +## Step 2 |
| 117 | + |
| 118 | +Install conda or manually install the python libraries and software dependencies that would allow you to run the python scripts or notebooks. |
| 119 | + |
| 120 | +We have pulled together some pre-defined environments. You may also install an environment yourself. Please look at the [conda](docs/conda/README.md) |
| 121 | +page for more information about conda. |
| 122 | + |
| 123 | +We currently recommend the *xesmfTools* environment for use with this libaray. |
| 124 | + |
| 125 | +## Step 3 |
| 126 | + |
| 127 | +Follow any steps in the "Workarounds" section. |
| 128 | + |
| 129 | +# Workarounds |
| 130 | + |
| 131 | +These are the current workarounds that are required for the grid toolset |
| 132 | +package. You will need to perform these steps once if you plan to install a |
| 133 | +copy of the grid generation software. |
| 134 | + |
| 135 | +## datashader |
| 136 | + |
| 137 | +The lastest version from github is required for proper operation of bokeh, holoviews and panel which |
| 138 | +are used by the interactive portions of the grid generation library. |
| 139 | + |
| 140 | +[REPO](https://github.com/holoviz/datashader) |
| 141 | + |
| 142 | +Installation: |
| 143 | + * Download or clone this repository. |
| 144 | + * Change directory to the datashader directory. |
| 145 | + * Make sure your conda enviroment is active. |
| 146 | + * `pip install -e .` |
| 147 | + |
| 148 | +## numpypi |
| 149 | + |
| 150 | +NOTE: This has not been fully implemented yet. Do not worry about this just yet. |
| 151 | + |
| 152 | +For bitwise-the-same reproducable results, a numpy subset of computational functions are |
| 153 | +provided. These routines are slower than the numpy native routines. |
| 154 | +[REPO](https://github.com/adcroft/numpypi) |
| 155 | + |
| 156 | +# More |
| 157 | + |
| 158 | +Until we can activate Sphinx to create our body of documentation we will have to resort |
| 159 | +to upkeep of a manual index. |
| 160 | + |
| 161 | +[Documentation](docs/Documentation.md) |
| 162 | + * [conda](docs/conda/README.md) |
| 163 | + * [development](docs/development) |
| 164 | + * [CHANGELOG](docs/development/CHANGELOG.md): Development log of changes |
| 165 | + * [CREDITS](docs/development/CREDITS.md) |
| 166 | + * [Design](docs/development/Design.md): Design elements for the grid generation library |
| 167 | + * [Important References](docs/development/ImportantReferences.md): Things that helped this project work |
| 168 | + * [Jupyter](docs/development/Jupyter.md): Notes on embeddeding applications within a notebook |
| 169 | + * [python](docs/development/python) |
| 170 | + * [leaflet](docs/development/python/leaflet.md) |
| 171 | + * [panel](docs/development/python/panel.md) |
| 172 | + * [pyroms](docs/development/python/pyroms.md) |
| 173 | + * [TODO](docs/development/TODO.md): Milestones, tasks, todos and wishes |
| 174 | + * [grids](docs/grids) |
| 175 | + * [Examples](docs/grids/Examples.md): Descriptions of grids used in examples |
| 176 | + * [Grids](docs/grids/Grids.md) |
| 177 | + * [MOM6](docs/grids/MOM6.md): MOM6 grids |
| 178 | + * [MOM6ROMS](docs/grids/MOM6ROMS.md): Important things between MOM6 and ROMS grids |
| 179 | + * [ROMS](docs/grids/ROMS.md): ROMS grids |
| 180 | + * [manual](docs/manual/GridUtils.md): User manual for the GridUtils library |
| 181 | + * [resources](docs/resources) |
| 182 | + * [Bathymetry](docs/resources/Bathymetry) |
| 183 | + |
| 184 | +# Development |
| 185 | + |
| 186 | +This project is soliciting help in development. Please contribute ideas or bug requests using the issues tab. |
| 187 | +Code contributions can be sent via github's pull request process. |
0 commit comments