ropensci / rnoaa

R interface to many NOAA data APIs
https://docs.ropensci.org/rnoaa
Other
328 stars 85 forks source link

Issue using rnoaa::gefs #371

Closed JulienGorintin closed 3 years ago

JulienGorintin commented 3 years ago

Hello,

I'm using the rnoaa package to retrieve weather data and in particular ensemble forecast data from the GEFS model.

It worked perfectly until last week, but it seems the data source behind the package to get the corresponding grib files are not working any longer since 23 September 2020.

Here is a reproductible example :

install.packages("rnoaa")

library("rnoaa")

rnoaa::gefs("Temperature_height_above_ground_ens",forecast_time="0000", lat=48,lon=2)

I get the following error :

Error in R_nc4_open: NetCDF: file not found 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_20200928_0000.grib2

According to the support-thredds@unidata.ucar.edu that I contacted, NOAA / NCEP, who are the initial data providers, indeed stopped publishing the corresponding file. (See https://www.weather.gov/source/datamgmt/DM042002.txt)

Did anyone else run into this problem? Is there another data source that could be integrated to replace these missing files?

Thanks

sckott commented 3 years ago

Thanks. If you have the most recent version of rnoaa, you'll see all the gefs functions are defunct/gone. We gave up on those as working with them was a pain, file were often not available, etc.

I don't know of any other source of the files. Does anyone else?

JulienGorintin commented 3 years ago

Thanks, I didn't realise the gefs functions were defunct in the new rnoaa version.

If not GEFS, is there a way to retrieve GFS forecasts (no ensembles, only one scenario)?

Thanks again.

sckott commented 3 years ago

I don't know.

any ideas @potterzot ?

potterzot commented 3 years ago

@JulienGorintin if I recall correctly, the GEFS functionality was okay but there were issues with the netcdf format and/or the data files were posted irregularly. Rather than have users faced with unexpected errors and seemingly random times, the GEFS functionality was removed.

However, you could still access the GEFS code in the previous commits and use it directly if you want. But I would instead download the .grb2 file for either GEFS or GFS that you'd like to access and use the raster package:

For GFS (or manually accessing GEFS Files), you can read GFS .grb2:

# an example file I just downloaded
d <- raster::raster("gfs_4_20200802_0000_000.grb2")
sckott commented 3 years ago

thanks @potterzot !

JulienGorintin commented 3 years ago

Thanks @sckott and @potterzot !