-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
OSX: zip warning: name not matched leads to error #3
Comments
@jdossgollin Sorry I didn't answer this but this shouldn't be a problem anymore. Got away from archiving end points files with zip. |
@rich-iannone thanks! However, I'm getting a funny error when I try to run the example from
(where
|
FWIW this is after purging |
Also, this is the same if I change the |
James, set a working directory with
I've tried to simplify the function by not requiring any paths. This makes everything a bit more R-like. Because you're using OS X, the function will use the necessary HYSPLIT binaries available in the package itself. If you already have the met files, move them to your chosen R working directory. |
I think that's a great change -- does that mean I can delete the Hysplit folder I downloaded from NOAA, or do the binaries call it? Anyways, running the example you gave me, I get a whole bunch of messages like this
and then (I think this is R)
Something's definitely going on there, though, because
the contents of these files looks like
there's also a bunch of system files (ie |
That's strange because
|
That's working (although I switched to Here's what my
Thx again for developing this software, very glad I don't have to mess around with FORTRAN |
@jdossgollin Great! And you're welcome! I'll try to make things run better/faster by modernizing some of the components (e.g., using the |
I had good luck plotting using |
@jdossgollin Great! A plan of mine is to create a function to plot trajectories with the |
By the way, I think I've fixed the issue with the |
I've heard good things about hysplit_ensemble <- function(lats, lons, s_dates, s_levels, opts){
# lats: all latitudes from which to initialize points
# lons: all longitudes from which to initialize points
# s_dates: vector (date format) of all dates from which to center trajectories
# s_levels: vector (numeric) of all levels (m) to seed from
# make sure required packages are installed
require(SplitR) # needs to be most recent version! devtools::install_github
require(data.table) # blazing fast for large data sets
require(magrittr) # for the pipe operator %>%
require(foreach) # combine data efficiently, can be run in parallel w/ minor tweaks
require(doParallel) # required complement to foreach package
s_points <- expand.grid(lats = lats, lons = lons, s_dates = s_dates, s_levels = s_levels) %>% data.table()
multi_runs <- foreach(i = 1:nrow(s_points), .combine = 'rbind') %do% {
s_lat <- s_points[i, lats]
s_lon <- s_points[i, lons]
s_date <- s_points[i, s_dates]
s_level <- s_points[i, s_levels]
# get the run for a single particle at a given unique combination of lat, lon, and date
single_run <- hysplit_trajectory(
traj_name = paste0(s_date, '-', s_lat, '-', s_lon),
return_traj_df = TRUE,
start_lat_deg = s_lat,
start_long_deg = s_lon,
start_height_m_AGL = s_level,
simulation_duration_h = opts$simulation_duration_h,
backtrajectory = opts$backtrajectory,
met_type = opts$met_type,
vertical_motion_option = opts$vertical_motion_option,
top_of_model_domain_m = opts$top_of_model_domain_m,
run_type = opts$run_type,
run_range = c(s_date - opts$days_back, s_date + opts$days_fwd),
daily_hours_to_start = opts$daily_hours_to_start
) %>% data.table()
# add identifying information
single_run[, ':='(s_lat = s_lat, s_lon = s_lon, s_date = s_date)]
return(single_run)
}
return(multi_runs)
} |
Also, sorry to drag this convo out, but did the ability to track specific humidity ( |
@jdossgollin sorry for the delay but could you elaborate? Do you mean outputting meteorological params at every step? I updated the Hysplit binaries a little after your last comment (now current as of mid-2015, 2013 binaries previously). Not sure if that has anything to do with the issue. |
If I run the example but with reanalysis data trajectory_df <-
hysplit_trajectory(
traj_name = "t2",
return_traj_df = TRUE,
start_lat_deg = 42.83752,
start_long_deg = -80.30364,
start_height_m_AGL = 5,
simulation_duration_h = 24,
backtrajectory = FALSE,
met_type = "reanalysis",
vertical_motion_option = 0,
top_of_model_domain_m = 20000,
run_type = "day",
run_day = "2012-03-12",
daily_hours_to_start = c("00", "06", "12", "18")) I get receptor year month day hour hour.inc lat lon height pressure date2 date
1 1 12 3 12 0 0 42.838 -80.304 5.0 989.8 2012-03-12 00:00:00 2012-03-12
2 1 12 3 12 1 1 42.983 -80.120 4.8 989.7 2012-03-12 01:00:00 2012-03-12
3 1 12 3 12 2 2 43.125 -79.957 4.7 989.6 2012-03-12 02:00:00 2012-03-12
4 1 12 3 12 3 3 43.262 -79.819 4.5 989.7 2012-03-12 03:00:00 2012-03-12
5 1 12 3 12 4 4 43.396 -79.705 4.3 989.9 2012-03-12 04:00:00 2012-03-12
6 1 12 3 12 5 5 43.525 -79.614 4.1 990.2 2012-03-12 05:00:00 2012-03-12 Previously there were other columns |
Also the |
I'm fairly certain that the way around this problem is by setting some of the |
@jdossgollin worked on this a bit and now it's a default behaviour to include all of the extra met along the trajectories (in the output files and in the returned data frame) |
That's awesome. At the moment my &SETUP
tratio = 0.75,
delt = 0.0,
mgmin = 10,
khmax = 9999,
kmixd = 0,
kmsl = 0,
kagl = 1,
k10m = 1,
nstr = 0,
mhrs = 9999,
nver = 0,
tout = 60,
tm_pres = 1,
tm_tpot = 1,
tm_tamb = 1,
tm_rain = 1,
tm_mixd = 1,
tm_relh = 1,
tm_sphu = 0,
tm_mixr = 0,
tm_dswf = 1,
tm_terr = 1,
dxf = 1.00,
dyf = 1.00,
dzf = 0.01,
messg = 'MESSAGE',
/ where the only guy that's missing is the specific humidity |
@jdossgollin it's now fixed and all the met params are provided. |
@rich-iannone it seems to have reverted -- i tried deleting all the files in the directory and it's back to how it was before with none of the params. |
@jdossgollin sorry should have mentioned this but use |
got it, works like a charm thanks |
Great! Check out the |
I like the interactive visualization -- that's definitely where graphics are headed. |
Am running SplitR on OSX 10.10.5 using the most recent version of Hysplit4 for trajectory analysis. If I run the example code from the readme document, SplitR runs but gives the following error:
zip warning: name not matched
.All appropriate meteorological files are downloaded and files are produced which look a lot like the .txt files that I obtain using the online version of Hysplit.
Attached: slightly modified version of example code (I get the same error for different types of meteorological data, for using just
'day'
runs, etc).My code:
Sample console output:
...
The text was updated successfully, but these errors were encountered: