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

Issue with opening URL in function micro_ncep #20

Closed
zhengxy79 opened this issue Sep 14, 2022 · 0 comments
Closed

Issue with opening URL in function micro_ncep #20

zhengxy79 opened this issue Sep 14, 2022 · 0 comments

Comments

@zhengxy79
Copy link

Hello,

I try to learn this package but when I run the example about function micro_ncep. It shows that can not open the URL of dataset website.

library(NicheMapR)
dstart <- "02/01/2017"
dfinish <- "30/12/2017"
loc <- c(-91.415669, -0.287145) # Isla Fernandina Galapagos
micro<-micro_ncep(loc = loc, dstart = dstart, dfinish = dfinish)

If program is crashing, try run.gads = 2.

downloading DEM via package elevatr 
 Accessing raster elevation [=========================] 100%
Mosaicing & Projecting
Note: Elevation units are in meters.
downloading weather data with package RNCEP via package microclima 
trying URL 'http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.das'
downloaded 2626 bytes

trying URL 'http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]'
trying URL 'http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]'
trying URL 'http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]'
trying URL 'http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]'
trying URL 'http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]'
Error in NCEP.gather.gaussian(variable = variable, months.minmax = months.minmax,  : 
  
There is a problem connecting to the NCEP database with the information provided.
	
Try entering http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144] into a web browser to obtain an error message.
In addition: Warning messages:
1: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  downloaded length 0 != reported length 2257
2: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  cannot open URL 'https://psl.noaa.gov/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]': HTTP status was '400 Bad Request'
3: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  downloaded length 0 != reported length 2257
4: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  cannot open URL 'https://psl.noaa.gov/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]': HTTP status was '400 Bad Request'
5: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  downloaded length 0 != reported length 2257
6: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  cannot open URL 'https://psl.noaa.gov/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]': HTTP status was '400 Bad Request'
7: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  downloaded length 0 != reported length 2257
8: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  cannot open URL 'https://psl.noaa.gov/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]': HTTP status was '400 Bad Request'
9: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  downloaded length 0 != reported length 2257
10: In download.file(paste("http://www.esrl.noaa.gov/psd/thredds/dodsC/Datasets/ncep.reanalysis",  :
  cannot open URL 'https://psl.noaa.gov/thredds/dodsC/Datasets/ncep.reanalysis2/gaussian_grid/air.2m.gauss.2017.nc.ascii?air[0:1459][0][46:47][143:144]': HTTP status was '400 Bad Request'

I have followed the information of run.gads = 2, but still doesn't work.

micro<-micro_ncep(loc = loc, dstart = dstart, dfinish = dfinish,run.gads = 2)

Any help on what I should do would be greatly appreciated!
Thanks

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

No branches or pull requests

1 participant