rich-iannone / splitr

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

Unable to run trajectories #80

Open Picornell opened 1 year ago

Picornell commented 1 year ago

I am not able to run the trajectories, even when using the examples provided in the documentation:

library(splitr) library(here)

trajectory <- hysplit_trajectory( lat = 42.83752, lon = -80.30364, height = 50, duration = 24, days = "2012-03-12", daily_hours = c(0, 6, 12, 18), direction = "forward", met_type = "gdas1", extended_met = TRUE, met_dir = here::here("met"), exec_dir = here::here("out") )

This returns me warnings saying: Warning messages: 1: In shell(syscmd) : '(cd "F:/[mypath]/out" && "C:_[mypath]/R/win-library/4.2/splitr/win/hyts_std.exe" > NUL 2>&1)' execution failed with error code 900 _Please, note that I have replaced the real directory by "[mypath]" to avoid publishing unnecessary information.

Then it generates the "trajectory" object but it is empty. ¿How can I solve that?

SGMStalin commented 6 months ago

When you add

met_dir = here::here("met")
exec_dir = here::here("out")

... you need to create those directories in your working directory, previously. However, by the second warning, it looks like it could be a problem with HYSPLIT (not R package) installation on your machine.