Giter Club home page Giter Club logo

precip's People

Contributors

disilvestro avatar falkamelung avatar kawanamelung avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

precip's Issues

Instructions for run_plot_precipitation_all.py

There are three elements:

  • plot_precipitaion_all.py (from Giacomo)
  • run_plot_precipitation_all.py the cron job that runs the script based on the volcano*xls entry we discussed
  • All running on a VPN with Apache so that it is a working website

run_plot_precipitation_all.py should read Holocene_Volcanoes_precip_cfg.xlsx which gives the instructions no which volcanoes to process

I suggest to have an environment variable $PRECIP_PRODUCT_DIR for the output directory (If it does not exist use SCRATCHDIR/precip_products).

The plots should end up in one directory for each volcano with the volcano ID in the name. So for MaunaLoa it should be $PRECIP_PRODUCT_DIR/332020,. etc

We will access the data for one volcano using e.g.
https://www.mirovaweb.it/?action=volcanoDetails&volcano_id=332020

Examples:
https://www.mirovaweb.it
http://www.mounts-project.com/home

Some suggestions

  • Readme.md needs to say that GMT needs to be installed prior to pip install pygmt (on Mac I followed instructions using brew from https://docs.generic-mapping-tools.org/latest/install.html and it worked fine)
  • It is unclear where the GPM data are downloaded. We could have a GPM_DIR similar to WEATHER_DIR ?
  • Download may be faster by downloading multiple files simultaneously. ssara*bash uses echo ${urls[@]} | xargs -n 1 -P $parallel timeout $timeout wget --continue --user $user --password $passwd
  • Rename get_all.py to something with precip or precipitation in the name. Maybe to plot_precip_all.py, plot_precipitation_all.py or get_precip_all.py. I think for now I like plot_precipitation_all.py.
  • How about we rename get_precipitation_lalo.py to plot_precipitation.py and the other command is plot_precipitation_all.py ?
  • when you say --save Merapi the folder should be created (I am getting an error if teh folder does not exist)
  • get_all.py produces 4 plots but I see only 3 *png?
  • get_all.py --no-show does not work
  • get_all.py --help needs to be updated.
  • instead of --save folder have the choices --save volcano-id and --save volcano-name and then the images will be created in the corresponding directories
  • rename --nino to --elnino
  • for the file names, to be consistent with MinSAR (long names can become problems) lets use instead of Merapi_2006-01-01_2007-01-01_annual.png Merapi_20060101_20070101_annual.png. If no --end-date is given it would be Merapi_20060101_XXXXXXXX_annual.png and overwritten if it gets updated
  • I see --lalo E:W,S:N. That is good, but how to do a point? Mintpy uses --lalo for that. Maybe use --box-lalo or something else?
  • rename repo from precip to Precip to be consistent with MintPy

Updated (1):

-add link to where to find volcano names (e.g. is it MaunaLoa, Maunloa Mauna Loa?)

Updated (2):

-what is --name option?

Kawan's comments

I’m unfortunately still having some issues with plot_precip.. The errors that I am having now aren’t raising an error but instead the process is being automatically killed due to out of memory issues, this happened quite a few times with the Cotopaxi and I think other volcanoes. I’m not sure if this is unique to jetstream2. There is also still the issue with the name/latlon switch for some map plots.

@giacomo if you end up having time next week to start the refactor, I would suggest that you open a new branch, called refactor and start working on the changes there.

A couple things that we should prioritize for the refactor include:
1. Break up prompt subplots and simplify. (see the last commit for my suggestions)
2. A plot function should take the axes as an input parameter. This would allow greater control of the plot and means we can make one big figure of n subplots and pass each axes to a plotting function. Currently plt... is being used. This is a bigger change and you will need to get familiar with matplotlib to do so. Long term, this change will be really worth it.
https://matplotlib.org/stable/users/explain/axes/index.html
https://stackoverflow.com/questions/43482191/matplotlib-axes-plot-vs-pyplot-plot
3. Less inps arguments (start with positional/volcanoname and all the download options) - at the moment I need to comment out the 'inps.volcano_name == inps.positional' line if I want to use run_all..
4. Read through minty cli sccripts and plot functions for good templates.

Initial comments:

//precipvm/home/exouser/code/rsmas_insar/tools/Precip[2021] grep -r . -e 'KA:'
./src/precip/plotter_functions.py:# KA: Don't use import *
./src/precip/plotter_functions.py:# KA: This function should just handle plotting.
./src/precip/plotter_functions.py:# KA: Ideally it takes data and a single axes as the input and then sends this data to another function depending on style
./src/precip/plotter_functions.py: # KA: this is a useful function but should be moved to the command line script
./src/precip/plotter_functions.py: # KA: this is a useful function but should be moved to the command line script
./src/precip/plotter_functions.py: # KA: There is no else statement here and isn't there always a style if you want to plot something?
./src/precip/plotter_functions.py: # KA: lets keep saving outside of plotting functions for now
./src/precip/plotter_functions.py: # KA: no need to set an extra bool
./src/precip/plotter_functions.py: # KA: instead -> if inps.style in ['daily', 'bar', 'strength':
./src/precip/plotter_functions.py: # KA: This dataframe should be the input parameter to a plotting function so that it doesn't have to be read everytime
./src/precip/plotter_functions.py: # KA: This dataframe should be the input parameter to a plotting function so that it doesn't have to be read everytime
./src/precip/plotter_functions.py: # KA: This dataframe should be the input parameter to a plotting function so that it doesn't have to be read everytime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.