geodesymiami / Precip

GNU General Public License v3.0
4 stars 0 forks source link

Precip

Python code to display precipitation globally using GPM dataset.

Information on volcanoes is retrieved from Global Volcanism Program webservice.

Installation

To create one, follow the steps below:

Otherwise you can use a mockup account, just copy paste the following code in your terminal (Mac/Linux, Windows):

Mac/Linux

Create .netrc file

cd $HOME
touch .netrc
echo "machine urs.earthdata.nasa.gov login emrehavazli password 4302749" >> .netrc
chmod 0600 .netrc

Create .urs_cookies file

touch $HOME/.urs_cookies

Create .dodsrc file

touch $HOME/.dodsrc

echo "HTTP.NETRC=$HOME/.netrc" >> $HOME/.dodsrc
echo "HTTP.COOKIEJAR=$HOME/.urs_cookies" >> $HOME/.dodsrc

Windows

Create .netrc file

machine urs.earthdata.nasa.gov login emrehavazli password 4302749

Save as C:.netrc

Create .urs_cookies file

From terminal (Win + R, type cmd )

cd %USERPROFILE%
NUL > .urs_cookies

Create .dodsrc file

cd %USERPROFILE%
NUL > .dodsrc
echo "HTTP.NETRC=%USERPROFILE%/.netrc" >> %USERPROFILE%\.dodsrc
echo "HTTP.COOKIEJAR=%USERPROFILE%/.urs_cookies" >> %USERPROFILE%\.dodsrc

Examples

You can run the code through command line by simply runnig the following command:

plot_precipitation.py Merapi --style bar --period=20060101:20070101

This line will show the precipitation over Merapi volcano from 01 January 2006 to 2007 as a bar plot, with vertical lines representing the eruptions.

For more examples run:

plot_precipitation.py --h

If You want to show (almost) all the available types of plot in one single command, run:

plot_precipitation_all.py Merapi --period=20060101:20070101

You can add some of the arguments from get_precipitation_lalo.py, like:

For visual examples, refer to the following Jupyter Notebook.

JetStream

If you have special access to 149.165.154.65, you can try to connect to JetStream and use the data uploaded there instead of downloading them locally with --use-ssh argument.