oscarperpinan / meteoForecast

A package to access outputs from Numerical Weather Prediction models both in raster format and as a time series for a location
GNU General Public License v3.0
51 stars 25 forks source link

NOMADS web services have transitioned to use of HTTPS and HSTS. #19

Closed mondorescue closed 7 years ago

mondorescue commented 7 years ago

When I run

grepVar("", service = 'gfs', complete = TRUE)

I get the following error

Unknown IO errorfailed to load external entity "http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities" Error: 1: Unknown IO error2: failed to load external entity "http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities"

When I try to access:

http://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities

in my web browser (Google Chrome), it redirects me to

https://nomads.ncdc.noaa.gov/thredds/wcs/gfs-004/201702/20170202/gfs_4_20170202_0000_000.grb2?service=WCS&version=1.0.0&request=GetCapabilities

Can the URL that grepVars use be changed from http to https?

Thanks

mondorescue commented 7 years ago

I made a pull request with the update to the URL protocol from http to https. I also made minor changes so that xmlParse can parse the resulting xml from NOMADS https. See pull request for more detail.

oscarperpinan commented 7 years ago

Hello,

Sorry for my delay in giving you an answer. I had a problem with the github notifications settings. I will try to review this problem as soon as possible. Thanks for the info and the code.