splitr icon indicating copy to clipboard operation
splitr copied to clipboard

hysplit_trajectory for February 2015

Open noraini0210 opened this issue 5 years ago • 2 comments

Hi

I am having difficulty with the hysplit trajectory and create_traj_model for February 2015.

library(SplitR) library(lubridate)

trajectory <-
hysplit_trajectory( traj_name = "traj", lat = 6.0086, lon = 102.4259, height = 30, duration = 120, run_period = c("2015-02-01","2015-02-28"), daily_hours = c(0, 6, 12, 18), direction = "backward",
met_dir = "C:/GDAS/", met_type = "gdas1", exec_dir= "c:/hysplit4/working.559", return_traj_df = TRUE)

Error in download.file(url, ...) : cannot open URL 'ftp://arlftp.arlhq.noaa.gov/archives/gdas1/gdas1.feb15.w5' In addition: Warning message: In download.file(url, ...) : InternetOpenUrl failed: ''

I also try to use create_traj_model as suggested previously in August 2019 as followed: traj_model <- create_traj_model() %>% add_grid(lat = 6.0086,lon = 102.4259,range = c(0.8, 0.8),division = c(0.2, 0.2)) %>% add_params( height = 30, duration = 120, run_period = c("2015-02-01","2015-02-28"), daily_hours = c(0, 6, 12, 18), direction = "backward", met_type = "gdas1", met_dir = "C:/GDAS/", exec_dir = "c:/hysplit4/working.559" ) %>% run_model()

However, I am still encountered the same error: Error in download.file(url, ...) : cannot open URL 'ftp://arlftp.arlhq.noaa.gov/archives/gdas1/gdas1.feb15.w5' In addition: Warning message: In download.file(url, ...) : InternetOpenUrl failed: ''

noraini0210 avatar Oct 14 '19 01:10 noraini0210

I have the same problem:

library(splitr) library(magrittr)

trajectory <-

  • hysplit_trajectory(
  • lat = 40,
    
  • lon = 13,
    
  • height = 500,
    
  • duration = 48,
    
  • days = "2012-07-15",
    
  • daily_hours = c(0,6,12,18),
    
  • direction = "backward",
    
  • met_type = "gdas1",
    
  • extended_met = TRUE,
    
  • traj_name = "prova",
    
  • met_dir = "C:/gdas/", 
    
  • clean_up = FALSE
    
  • ) trying URL 'ftp://arlftp.arlhq.noaa.gov/archives/gdas1/gdas1.lug12.w1' Error in download.file(url, ...) : cannot open URL 'ftp://arlftp.arlhq.noaa.gov/archives/gdas1/gdas1.lug12.w1' In addition: Warning message: In download.file(url, ...) : InternetOpenUrl failed: ''

maia2004 avatar Oct 15 '19 13:10 maia2004

I've been unable to replicate the issue mentioned by @noraini0210 - code seems to run for the most recent code. (Is this code still unable to run for you @noraini0210?)

As for the example @maia2004 posted - this seems to be an issue with the locale argument of lubridate::month within the get_month_* functions? Since arlftp server has data months are all English, I suggest setting locale in lubridate::month to US as a fix.

rfiorella avatar Apr 18 '20 06:04 rfiorella