Skip to content

geodesymiami/Precip

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Precip

Python code to display precipitation globally using GPM dataset.

Information on volcanoes is retrieved from Global Volcanism Program webservice.

Installation

  • Create destination folder from terminal and clone the repo:
cd $HOME
mkdir -p $HOME/code/Precip
git clone [email protected]:geodesymiami/Precip.git $HOME/code/Precip
  • Set environment variables (temp):
export PRECIP_HOME=$HOME/code/Precip
  • Prepend to your $PATH
export PATH=${PRECIP_HOME}/src/Precip/cli:$PATH
export PYTHONPATH=${PRECIP_HOME}/src:$PYTHONPATH

Install requirements

while read requirement; do conda install --yes $requirement; done < requirements.txt

Enable download of GPM data

In order to be able to download GPM data locally, you need to have an active EarthData account.

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

  • Open Notepad
  • Enter (without quotes):

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:

run_plot_precipitation_all.py Merapi --period=20060101:20070101

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

  • --roll
  • --bins
  • --log
  • --save

For visual examples, refer to the following Jupyter Notebook.

JetStream

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

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published