Skip to content
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

Extended met not functioning as expected #9

Closed
CRMcMahon opened this issue Aug 9, 2016 · 8 comments
Closed

Extended met not functioning as expected #9

CRMcMahon opened this issue Aug 9, 2016 · 8 comments

Comments

@CRMcMahon
Copy link

I am attempting to run backward trajectories with the extended_met option turned on. The resulting data frame only includes the 12 initial variables, but also has an extra row inserted after each expected record. I have attempted to run the extended met with both the reanalysis and NARR met types. Is this issue with my code/inputs or a function problem? Thanks for the help!

trajectory <-
hysplit_trajectory(
lat = 45.13767953,
lon = -93.20761498,
height = 500,
duration = 72,
run_period = c(2015),
daily_hours = c(0),
direction = "backward",
met_type = "reanalysis",
extended_met = T)

head(trajectory)
receptor year month day hour hour.inc lat lon height pressure date2 date
1 1 15.0 1 1 0 0 45.138 -93.208 500.0 909.9 2015-01-01 00:00:00 2015-01-01
2 1 0.0 NA NA NA NA NA NA NA NA 2015-01-01
3 1 14.0 12 31 23 -1 45.244 -93.843 496.6 909.8 2014-12-31 23:00:00 2015-01-01
4 1 0.0 NA NA NA NA NA NA NA NA 2015-01-01
5 1 14.0 12 31 22 -2 45.364 -94.490 492.4 909.9 2014-12-31 22:00:00 2015-01-01
6 1 104.1 NA NA NA NA NA NA NA NA 2015-01-01

@rich-iannone
Copy link
Owner

@CRMcMahon just saw this issue now, sorry! Will look into why this is the case.

@rich-iannone rich-iannone self-assigned this Aug 19, 2016
@rich-iannone
Copy link
Owner

@CRMcMahon quick question that would be helpful to diagnose/fix this: which operating system are you using to run the above analysis?

@rich-iannone
Copy link
Owner

@CRMcMahon I was able to run the following code on a Mac with no issue:

library(SplitR)

trajectory <- 
  hysplit_trajectory(
    lat = 45.13767953,
    lon = -93.20761498,
    height = 500,
    duration = 72,
    run_period = 2015,
    daily_hours = 0,
    direction = "backward",
    met_type = "reanalysis",
    extended_met = TRUE)

saveRDS(trajectory, file = "trajectory_2015.rds")

So I wonder if this is a Windows (or Linux?) issue. I'll investigate the code on the other platforms but, in the meantime, I've attached the output here as a zipped RDS file (which can be opened as a data frame in R using the readRDS() function).

trajectory_2015.rds.zip

@CRMcMahon
Copy link
Author

Sorry for my delayed response. Was out on vacation and message was buried. Yes, operating on Windows 64 bit. I also have access to a Mac and will use that as a work around in the interim. Thank you for the response!

From: Richard Iannone [mailto:[email protected]]
Sent: Friday, August 19, 2016 2:26 PM
To: rich-iannone/SplitR [email protected]
Cc: McMahon, Cassie (MPCA) [email protected]; Mention [email protected]
Subject: Re: [rich-iannone/SplitR] Extended met not functioning as expected (#9)

@CRMcMahonhttps://github.com/CRMcMahon I was able to run the following code on a Mac with no issue:

library(SplitR)

trajectory <-

hysplit_trajectory(

lat = 45.13767953,

lon = -93.20761498,

height = 500,

duration = 72,

run_period = 2015,

daily_hours = 0,

direction = "backward",

met_type = "reanalysis",

extended_met = TRUE)

saveRDS(trajectory, file = "trajectory_2015.rds")

So I wonder if this is a Windows (or Linux?) issue. I'll investigate the code on the other platforms but, in the meantime, I've attached the output here as a zipped RDS file (which can be opened as a data frame in R using the readRDS() function).

trajectory_2015.rds.ziphttps://github.com/rich-iannone/SplitR/files/427744/trajectory_2015.rds.zip


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com//issues/9#issuecomment-241112490, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AH0AxITwY5mkD6KT0zxYyd7HKlTCgcFqks5qhgNjgaJpZM4JgYzV.

@madhulika92
Copy link

I have been trying to load the gdas0p5 meteorological file in the met_type. I get the error in matrix(0, nr, nc) : object 'met' not found.

When I try loading gdas1, it works but takes too long to load. What should be the expected output after running this command? It says "trying URL 'ftp://arlftp.arlhq.noaa.gov/archives/gdas1/gdas1.jan17.w1'".

trajectory <- hysplit_trajectory(lat = 28.5040, lon = 77.3018, height = 200, duration = 24, run_period = "2017-01-01", daily_hours = c(0, 6, 12, 18), direction = "forward", met_type = "gdas0p5", extended_met = TRUE)

Is it possible to load the manually downloaded met files into R using the above code?

@IsotopeGuy
Copy link

Please, do You have any idea to solve the above problem? Still no extended_met with Win10 64bit. Thanks! rasto.
 

1 | 18 | 1 | 12 | 0 | 0 | 48.000 | 20.000 | 500.0 | 929.3 | 2018-01-12 00:00:00 | 2018-01-12
2 | 1 | NaN | NA | NA | NA | NA | NA | NA | NA | NA | NA | 2018-01-12
3 | 1 | 18 | 1 | 11 | 23 | -1 | 48.091 | 20.102 | 485.4 | 929.6 | 2018-01-11 23:00:00 | 2018-01-12
4 | 1 | NaN | NA | NA | NA | NA | NA | NA | NA | NA | NA | 2018-01-12

@elhamba
Copy link

elhamba commented Jun 12, 2019

traj_df.zip
Hi, I get extra rows (e.g. look at the year column; the numbers don't make sense) with NaN (attached data) in most columns (except date and year). I'm running the following code:
trajectory_model <-
create_traj_model() %>%
add_grid(
lat = 33.572019,
lon = -116.064,
range = c(0.8, 0.8),
division = c(0.2, 0.2)) %>%
add_params(
height = 50,
duration = 6,
run_period = "2018-02-11",
daily_hours = c(0,6,12,18),
#daily_hours = c(0,12),
direction = "backward",
met_type = "narr") %>%
run_model()
After I filtered the data (deleted the rows with year != 18), tried to plot them but it doesn't give me anything (nor an error). I managed to get a plot with daily_hours = c(0,12) but couldn't get the plot next times I tried to redo this.

Also when trying to make a dispersion_model object I get the following error:
Error in matrix(0, nr, nc) : object 'met' not found

And, YES, I am running my code on windows 66bit OS too.

I'd appreciate any help. Thank you.
-Ellie

@rich-iannone
Copy link
Owner

This should now (finally) be working on Windows 10 with the latest changes in master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants