rich-iannone / splitr

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

Error downloading reanalysis data #7

Closed jdossgollin closed 8 years ago

jdossgollin commented 8 years ago

Something strange is happening with downloading reanalysis data.

The following dates worked:

 1: 1955-08-12
 2: 1963-11-08
 3: 1966-09-21
 4: 1968-05-29
 5: 1969-09-04
 6: 1971-08-01
 7: 1971-08-28
 8: 1971-09-14
 9: 1972-10-07
10: 1972-11-08
11: 1975-09-24
12: 1976-08-09
13: 1977-11-08
14: 1978-05-16
15: 1983-04-10
16: 1984-04-05
17: 1984-05-30
18: 1989-08-12
19: 1990-08-10
20: 1996-10-19
21: 1997-07-25
22: 1999-09-16
23: 2000-07-27
24: 2002-10-12
25: 2004-09-29
26: 2005-10-08
27: 2005-10-12
28: 2006-06-03
29: 2007-04-15
30: 2010-03-15
31: 2010-03-30
32: 2011-08-14
33: 2011-08-28
34: 2011-09-07
35: 2013-06-08
36: 2014-04-30

However, if I try hysplit_trajectory(run_period = '1950-07-07', met_type = "reanalysis") I get the following message:

trying URL 'ftp://arlftp.arlhq.noaa.gov/archives/reanalysis/RP205006.gbl'
Error in download.file(url, ...) : 
  cannot open URL 'ftp://arlftp.arlhq.noaa.gov/archives/reanalysis/RP205006.gbl'

I can't tell if it's in the hysplit_trajectory function or the get_met_reanalysis function, although I'd guess the former.

Just from playing around, it seems like it works for all the dates I give it after 1950, and nothing before (the reanalysis data goes back to 1948). Here's the weird part: if I try hysplit_trajectory(run_period = '1951-01-01', met_type = "reanalysis") it's able to download the data from 1950:

trying URL 'ftp://arlftp.arlhq.noaa.gov/archives/reanalysis/RP195012.gbl'
ftp data connection made, file length 123110672 bytes
==================================================
downloaded 117.4 MB

It's not urgent because I don't mind restricting what I'm doing to 1951--present but thought I'd flag the bug

rich-iannone commented 8 years ago

@jdossgollin apologies for this bug, but, it's now fixed. Dates can now go back to 1940!