Skip to content

Commit c43a90d

Browse files
committed
Initial commit. Release 0.1.
1 parent 37cae2e commit c43a90d

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

81 files changed

+16245
-3
lines changed

.gitignore

-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,6 @@ dist/
1414
downloads/
1515
eggs/
1616
.eggs/
17-
lib/
18-
lib64/
1917
parts/
2018
sdist/
2119
var/

README.md

+186-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,187 @@
11
# 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: [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/ESMG/gridtools/main)
71+
* Dev: [![Binder](https://mybinder.org/badge_logo.svg)](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.

conda/base_export.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: base
2+
channels:
3+
- defaults
4+
dependencies:
5+
- _libgcc_mutex=0.1=main
6+
- brotlipy=0.7.0=py38h27cfd23_1003
7+
- ca-certificates=2020.10.14=0
8+
- certifi=2020.6.20=pyhd3eb1b0_3
9+
- cffi=1.14.3=py38h261ae71_2
10+
- chardet=3.0.4=py38h06a4308_1003
11+
- conda=4.9.2=py38h06a4308_0
12+
- conda-package-handling=1.7.2=py38h03888b9_0
13+
- cryptography=3.2.1=py38h3c74f83_1
14+
- idna=2.10=py_0
15+
- ld_impl_linux-64=2.33.1=h53a641e_7
16+
- libedit=3.1.20191231=h14c3975_1
17+
- libffi=3.3=he6710b0_2
18+
- libgcc-ng=9.1.0=hdf63c60_0
19+
- libstdcxx-ng=9.1.0=hdf63c60_0
20+
- ncurses=6.2=he6710b0_1
21+
- openssl=1.1.1h=h7b6447c_0
22+
- pip=20.2.4=py38h06a4308_0
23+
- pycosat=0.6.3=py38h7b6447c_1
24+
- pycparser=2.20=py_2
25+
- pyopenssl=19.1.0=pyhd3eb1b0_1
26+
- pysocks=1.7.1=py38h06a4308_0
27+
- python=3.8.5=h7579374_1
28+
- readline=8.0=h7b6447c_0
29+
- requests=2.24.0=py_0
30+
- ruamel_yaml=0.15.87=py38h7b6447c_1
31+
- setuptools=50.3.1=py38h06a4308_1
32+
- six=1.15.0=py38h06a4308_0
33+
- sqlite=3.33.0=h62c20be_0
34+
- tk=8.6.10=hbc83047_0
35+
- tqdm=4.51.0=pyhd3eb1b0_0
36+
- urllib3=1.25.11=py_0
37+
- wheel=0.35.1=pyhd3eb1b0_0
38+
- xz=5.2.5=h7b6447c_0
39+
- yaml=0.2.5=h7b6447c_0
40+
- zlib=1.2.11=h7b6447c_3
41+
prefix: /home/cermak/miniconda3

conda/bokeh.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: bokeh
2+
# This is a bokeh/jupyterlab specific environment
3+
channels:
4+
- conda-forge
5+
dependencies:
6+
- bokeh
7+
- jupyter_bokeh
8+
- cartopy
9+
- geopandas
10+
- xlrd
11+
- openpyxl
12+
- jupyterlab
13+
- conda
14+
- pip

0 commit comments

Comments
 (0)