This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def area_grid(lat, lon): | |
| """ | |
| Calculate the area of each grid cell | |
| Area is in square meters | |
| Input | |
| ----------- | |
| lat: vector of latitude in degrees | |
| lon: vector of longitude in degrees | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # A function to rasterize components of a matplotlib figure while keeping | |
| # axes, labels, etc as vector components | |
| # https://brushingupscience.wordpress.com/2017/05/09/vector-and-raster-in-one-with-matplotlib/ | |
| from inspect import getmembers, isclass | |
| import matplotlib | |
| import matplotlib.pyplot as plt | |
| import numpy as np | |
| def rasterize_and_save(fname, rasterize_list=None, fig=None, dpi=None, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## Setup java | |
| if [ `uname -m` == 'x86_64' ]; then | |
| PATH="/usr/lib64/jvm/java-7-oracle/jre/bin/" | |
| JAVA_HOME="/usr/lib64/jvm/java-7-oracle/" | |
| else | |
| PATH="/usr/lib/jvm/java-7-oracle/jre/bin/" | |
| JAVA_HOME="/usr/lib/jvm/java-7-oracle/" | |
| fi |