rich-iannone / splitr

Use the HYSPLIT model from inside R and do more with it
Other
141 stars 60 forks source link

Bug fix for selecting met files for longer back trajectories, and some code to provide basic ERA5 functionality. #47

Closed rfiorella closed 4 years ago

rfiorella commented 4 years ago

Code changes in this pull request address two issues:

1) Fixed a bug in the get_daily_filenames/get_monthly_filenames functions where the wrong met files were being selected for longer trajectory runs (e.g., a 10 day back-trajectory starting 1/1/19 would select 12/21/18-12/23/18, not 12/21/19-1/1/19 as expected).

2) Add the bare minimum amount of code to get splitr to ingest ERA5 met data. This data is not available from the ARL FTP server, so there is no functionality to retrieve this met data source. Instead, it is assumed that the user has downloaded and converted ERA5 data to ARL format using the fortran executables bundled with HYSPLIT.

Thanks for all your awesome work on this package - I've used HYSPLIT for a while and this package has dramatically improved my workflows. Please let me know if you have any questions about these contributions, or need me to clarify/fix anything.

Best, Rich

raffscallion commented 4 years ago

Just weighing in to say this is a critical fix. I started my own PR before realizing this was already here. It's not just longer trajectories, but any trajectory that would cross month boundaries will currently fail. This also addresses #44 and #43.

rich-iannone commented 4 years ago

@rfiorella @raffscallion I apologize for taking so long in just merging this PR. I general, I’ve had my attention elsewhere even though this package requires some serious fixes (and a CRAN release). This is an open offer (plea, really) for more help on this package. I will definitely be more responsive to future PRs if either of you were to submit them.

rfiorella commented 4 years ago

I'd be happy to contribute where possible as I can - especially since your work has already helped me automate some of my hysplit work! Let me know how I might be able to help.

rich-iannone commented 4 years ago

@rfiorella first of all thank you very much for offering! The biggest bug right now is the leap year bug (downloading GDAS data at the end of February). A fix for that would make so many people happy. https://github.com/rich-iannone/splitr/issues/42 Is but one example of this.