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

Problem with ncdf4 where on windows machines doesn't work #127

Closed
sckott opened this issue Dec 24, 2015 · 13 comments
Closed

Problem with ncdf4 where on windows machines doesn't work #127

sckott opened this issue Dec 24, 2015 · 13 comments
Labels
Milestone

Comments

@sckott
Copy link
Contributor

sckott commented Dec 24, 2015

at least for gefs fxns I get an error that the file type can not be read, the .grib file type, see if this can be fixed

@potterzot
Copy link
Contributor

I'm a little confused on this, is it specific to windows and to gefs? Can you give me a reproducible example to work from?

@sckott
Copy link
Contributor Author

sckott commented Jan 21, 2016

Sure, I'll try it again on windows and paste in the error I get

@sckott
Copy link
Contributor Author

sckott commented Jan 21, 2016

@potterzot e.g,

lat <- 46.28125
lon <- -116.2188
gefs("Temperature_height_above_ground_ens", lat, lon, date = format(as.Date(Sys.time()) - 1, "%Y%m%d"), forecast_time = "1800", ens_idx=2:4, time_idx=1:8)
Error in R_nc4_open: NetCDF: Unknown file format
Error in ncdf4::nc_open(gefs_url):
    Error in nc_open trying to open file http://thredds.ucar.edu/thredds/dodsc/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/GEFS_Global_1p0deg_Ensemble_20160120_1800.grbi2

@sckott
Copy link
Contributor Author

sckott commented Jan 21, 2016

That grib2 file format is causing problems, never heard of that format, not sure where to look for solution

@potterzot
Copy link
Contributor

some climate data is stored in it. I'll look at it, should be able to fix
quickly. Thanks for bringing it to my attention and thanks for the example!


Nicholas Potter
http://potterzot.com

On Thu, Jan 21, 2016 at 11:15 AM, Scott Chamberlain <
notifications@github.com> wrote:

That grib2 file format is causing problems, never heard of that format,
not sure where to look for solution


Reply to this email directly or view it on GitHub
#127 (comment).

@sckott sckott added this to the v0.5.2 milestone Jan 21, 2016
@sckott
Copy link
Contributor Author

sckott commented Jan 21, 2016

@potterzot let me know when you get a fix for this, hoping to get the next patch version https://github.com/ropensci/rnoaa/milestones/v0.5.2 pushed soon

@potterzot
Copy link
Contributor

@sckott Strange, it works fine on linux. I hope to make it happen this weekend, and push an update in the next couple of days. Will that work?

@sckott
Copy link
Contributor Author

sckott commented Jan 22, 2016

Sounds good

@potterzot
Copy link
Contributor

I think this is an upstream bug. Bypassing rnoaa and using ncdf4 directly, I have no problem on linux but can't access the file on windows.

On Linux:

library(ncdf4)
gefs_url <- "http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/GEFS_Global_1p0deg_Ensemble_20160120_1800.grib2"

con <- nc_open(gefs_url)
vars <- names(con$var)
vars[1:5]
#> [1] "reftime"                          "LatLon_Projection"               
#> [3] "time_bounds"                      "pressure_difference_layer_bounds"
#> [5] "depth_below_surface_layer_bounds"

On Windows:

...
con <- nc_open(gefs_url)
Error in R_nc4_open: NetCDF: Unknown file format
Error in nc_open(t_url) : 
  Error in nc_open trying to open file http://thredds.ucar.edu/thredds/dodsC/grib/NCEP/GEFS/Global_1p0deg_Ensemble/members/GEFS_Global_1p0deg_Ensemble_20160120_1800.grib2

If this makes sense, I'll submit a bug to ncdf4.

What would you like to do with the gefs code in the meantime? I can put a notice in that says it doesn't work for windows, or if you would prefer something else just let me know.

@sckott
Copy link
Contributor Author

sckott commented Jan 25, 2016

thanks for looking in to this 👍

how about we just stop on windows, for all applicable gefs functions, e .,g, put this code in

if (is_windows()) stop("gefs not implemented on windows yet", .call = FALSE)

sckott added a commit that referenced this issue Jan 25, 2016
Add stop if windows until ncdf4 and grib2 issues in bug #127 are resolved.
@sckott
Copy link
Contributor Author

sckott commented Jan 25, 2016

temporary fix in #133 , closing this, will open new issue to remind us to fix this

@mauritzvdworm
Copy link

Any update in getting the gefs data using a windows machine?

@sckott
Copy link
Contributor Author

sckott commented Apr 19, 2017

@mauritzvdworm I don't think so , follow #134 for updates on this issue

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

No branches or pull requests

3 participants