Closed richardsc closed 7 years ago
thanks!
On Dec 24, 2015, at 3:01 AM, Clark Richards notifications@github.com wrote:
This was definitely user error, as I accidentally tried to pass the same value for lon1 and lon2, but the error that was reported was:
getNOAA.bathy(1, 1, 0, 1) Querying NOAA database ... This may take seconds to minutes, depending on grid size Error in getNOAA.bathy(1, 1, 0, 1) : The NOAA server cannot be reached which lead me to believe that the server was down and the issue wasn't with my code. A better check would be to see if the range of lons and lats is actually valid before trying to query the server.
Thanks for a great package by the way!
— Reply to this email directly or view it on GitHub.
Hi There!, I'm still having trouble with the getNOAA.bathy() function. No matter the configuration of lat/long, resolution and/or any other tuning the same error is get: " The NOAA server cannot be reached"... Any Idea for this?, Many Thanks!
Hi,
What version of marmap are you using?
The NOAA servers have been reorganised early January and we had to modify getNOAA.bathy()
in order to take the new architecture into account. I've been using the new marmap version (v0.9.6) regularly since then (including yesterday and earlier today) with no problem whatsoever. You can download it via GitHub or CRAN servers.
Best
Hi besibo, Many thanks for the comment. I have realized that the installation from github at "https://epante.wordpress.com/marmap/" don't adress this last release (v0.9.6) Now it works greats! Thanks!
Since I see this issue is still open, if I get some time I'll try to put together a pull request for the suggestion that I made above (e.g. about improving the error message for invalid lon/lat ranges).
I see no problem with your command. It is working as expected on my system:
system.time(getNOAA.bathy(lon1=0,lon2=10,lat1=0,lat2=10, resolution=30)) Querying NOAA database ... This may take seconds to minutes, depending on grid size Building bathy matrix ... utilisateur système écoulé 0.054 0.005 1.016
I'm really sorry but I can't help you if I can't reproduce your error. Is there anything special about your setup? Have you tried a clean install? What version of R are you running? Did you install marmap from Github or from CRAN servers? Are you behind a firewall? etc...
Oh. And sometimes, NOAA servers are actually down and really can't be reached!
Best Benoit
Le 19 avr. 2017 à 20:26, nadyacaro <notifications@github.com mailto:notifications@github.com> a écrit :
Hello besibo, I am finding some issues still with the getNOAA.bathy() function. I have update the version (in the library package is showing 0.9.6), and running the package example: system.time(getNOAA.bathy(lon1=0,lon2=10,lat1=0,lat2=10, resolution=30)) Error in getNOAA.bathy(lon1 = 0, lon2 = 10, lat1 = 0, lat2 = 10, resolution = 30) : The NOAA server cannot be reached Any help is most welcome Thank you
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ericpante/marmap/issues/3#issuecomment-295378891, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY79ttuuzF3YvbB_YqrAT-vtLfb4Gsvks5rxlHrgaJpZM4G64sx.
@richardsc
Yeah, it's been on our bucket list for quite some time now! In addition to checking the validity of lon/lat coordinates with something like
if ( lon1 == lon2 | lat1 == lat2) stop("Invalid coordinates")
we also need to address a few marginal cases. For instance correct coordinates can be provided but with an inadequate resolution leading to a bathy object of one cell:
dat <- getNOAA.bathy(lon1=0,lon2=1,lat1=0,lat2=1, resolution=60)
summary(dat)
dat
is created with no error, but since a bathy object should contain a matrix (not a vector of length 1) all other marmap functions will produce error messages.
Another example is if correct coordinates are provided but with a resolution so low that no data are returned:
dat <- getNOAA.bathy(lon1=0,lon2=1,lat1=0,lat2=1, resolution=80)
Here, the same misleading error message is displayed. It shouldn't be too hard to prevent. Pull requests are welcome, but I promise it will be fixed in the next update!
Best Benoit
Thank you very much for your answers. I tried several times last night and the debugging code open up. Finally, I rerun it one more time and it worked. So I guess the option of NOAA servers being down was the reason. But... This morning I am trying to rerun and I get the same issue. So, it makes me doubt what is the problem. I am attaching a screen shoot.
I'm really sorry but I can't help you if I can't reproduce your error. Is there anything special about your setup? -Nothing special, I am just re-running some code that was generating maps without any issue at the beginning of the year Have you tried a clean install? -Yes, I tried a clean install. I deleted the old version and installed a new one. What version of R are you running? -Version 0.99.451 Did you install marmap from Github or from CRAN servers? -I used the CRAN servers Are you behind a firewall? etc...
Many thanks for all your help
Best
Nadya
2017-04-19 21:15 GMT+01:00 Benoit Simon-Bouhet notifications@github.com:
@richardsc https://github.com/richardsc
Yeah, it's been on our bucket list for quite some time now! In addition to checking the validity of lon/lat coordinates with something like
if ( lon1 == lon2 | lat1 == lat2) stop("Invalid coordinates")
we also need to address a few marginal cases. For instance correct coordinates can be provided but with an inadequate resolution leading to a bathy object of one cell:
dat <- getNOAA.bathy(lon1=0,lon2=1,lat1=0,lat2=1, resolution=60) summary(dat)
dat is created with no error, but since a bathy object should contain a matrix (not a vector of length 1) all other marmap function will produce error messages.
Another example is if correct coordinates are provided but with a resolution so low that no data are returned:
dat <- getNOAA.bathy(lon1=0,lon2=1,lat1=0,lat2=1, resolution=80)
Here, the same misleading error message is displayed. It shouldn't be too hard to prevent. Pull requests are welcome, but I promise it will be fixed in the next update!
Best Benoit
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ericpante/marmap/issues/3#issuecomment-295421914, or mute the thread https://github.com/notifications/unsubscribe-auth/ACvq--zqhJtod1j2G4nQZwE0tZuEmKauks5rxmt1gaJpZM4G64sx .
-- Nadya C. Ramirez-Martinez M Sc. Eramus Mundus Marine Biodiversity and Conservation PhD Student Sea Mammal Research Unit (SMRU) University of St. Andrews, Scotland
I can't get any data either this morning. When I try to download manually from the custom tool available on the NOAA server, I get the following message upon clicking on the download button :
The requested URL /cgi-bin/public/wcs/etopo1_bedrock.xyz was not found on this server.
So I guess the problem is on their side! I'll keep an eye on it but won;t be much available next week... Best Benoit
Le 20 avr. 2017 à 11:32, nadyacaro notifications@github.com a écrit :
Thank you very much for your answers. I tried several times last night and the debugging code open up. Finally, I rerun it one more time and it worked. So I guess the option of NOAA servers being down was the reason. But... This morning I am trying to rerun and I get the same issue. So, it makes me doubt what is the problem. I am attaching a screen shoot.
I'm really sorry but I can't help you if I can't reproduce your error. Is there anything special about your setup? -Nothing special, I am just re-running some code that was generating maps without any issue at the beginning of the year Have you tried a clean install? -Yes, I tried a clean install. I deleted the old version and installed a new one. What version of R are you running? -Version 0.99.451 Did you install marmap from Github or from CRAN servers? -I used the CRAN servers Are you behind a firewall? etc...
Many thanks for all your help
Best
Nadya
2017-04-19 21:15 GMT+01:00 Benoit Simon-Bouhet notifications@github.com:
@richardsc https://github.com/richardsc
Yeah, it's been on our bucket list for quite some time now! In addition to checking the validity of lon/lat coordinates with something like
if ( lon1 == lon2 | lat1 == lat2) stop("Invalid coordinates")
we also need to address a few marginal cases. For instance correct coordinates can be provided but with an inadequate resolution leading to a bathy object of one cell:
dat <- getNOAA.bathy(lon1=0,lon2=1,lat1=0,lat2=1, resolution=60) summary(dat)
dat is created with no error, but since a bathy object should contain a matrix (not a vector of length 1) all other marmap function will produce error messages.
Another example is if correct coordinates are provided but with a resolution so low that no data are returned:
dat <- getNOAA.bathy(lon1=0,lon2=1,lat1=0,lat2=1, resolution=80)
Here, the same misleading error message is displayed. It shouldn't be too hard to prevent. Pull requests are welcome, but I promise it will be fixed in the next update!
Best Benoit
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ericpante/marmap/issues/3#issuecomment-295421914, or mute the thread https://github.com/notifications/unsubscribe-auth/ACvq--zqhJtod1j2G4nQZwE0tZuEmKauks5rxmt1gaJpZM4G64sx .
-- Nadya C. Ramirez-Martinez M Sc. Eramus Mundus Marine Biodiversity and Conservation PhD Student Sea Mammal Research Unit (SMRU) University of St. Andrews, Scotland — You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/ericpante/marmap/issues/3#issuecomment-295651332, or mute the thread https://github.com/notifications/unsubscribe-auth/AGY79rlYxJ0LxlygneNMc7O5bwm_1MNRks5rxyYygaJpZM4G64sx.
Hi @nadyacaro
It would be helpful if you post more information about your setup such as the results of sessionInfo()
, and a reproducible example that you can get to fail, along with the error messages you get when it does. Also, you didn't answer the following question from @besibo:
Are you behind a firewall? etc...
I wonder if this is the source of your issue ...
FWIW I just tried the example @besibo did, and it worked fine:
library(marmap)
> system.time(getNOAA.bathy(lon1=0,lon2=10,lat1=0,lat2=10, resolution=30))
Querying NOAA database ...
This may take seconds to minutes, depending on grid size
Building bathy matrix ...
user system elapsed
0.13 0.16 1.62
Hi Clack,
Thanks for your comments.
sessionInfo()R version 3.2.1 (2015-06-18) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 8 x64 (build 9200)
locale: [1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252
attached base packages: [1] stats graphics grDevices utils datasets methods base
other attached packages: [1] marmap_0.9.6 mapdata_2.2-5 maps_3.0.0-2 ggplot2_2.0.0
loaded via a namespace (and not attached): [1] Rcpp_0.12.2 lattice_0.20-33 digest_0.6.8 grid_3.2.1 plyr_1.8.3 [6] adehabitatMA_0.3.10 gtable_0.1.2 DBI_0.3.1 magrittr_1.5 RSQLite_1.0.0 [11] scales_0.3.0 ncdf4_1.15 stringi_1.0-1 reshape2_1.4.1 raster_2.5-2 [16] sp_1.2-1 labeling_0.3 rgdal_1.1-3 tools_3.2.1 stringr_1.0.0 [21] munsell_0.4.2 colorspace_1.2-6 shape_1.4.2
Are you behind a firewall? etc...
I don't think that is an issue it is the same system that I have used before without issue. Last night it worked after long trying but this morning was not again.
Example
system.time(getNOAA.bathy(lon1=0,lon2=10,lat1=0,lat2=10, resolution=30))Querying NOAA database ... This may take seconds to minutes, depending on grid sizeError in getNOAA.bathy(lon1 = 0, lon2 = 10, lat1 = 0, lat2 = 10, resolution = 30) : The NOAA server cannot be reachedCalled from: getNOAA.bathy(lon1 = 0, lon2 = 10, lat1 = 0, lat2 = 10, resolution = 30)
Browse[1]> This is the same outcome that is in the screen shoot. It shows and error and it automatically send me to debugging.
I am wondering why it works for you and now not either for @besibo and me.
Thank you
Best Nadya
2017-04-20 10:49 GMT+01:00 Clark Richards notifications@github.com:
Hi @nadyacaro https://github.com/nadyacaro
It would be helpful if you post more information about your setup such as the results of sessionInfo(), and a reproducible example that you can get to fail, along with the error messages you get when it does. Also, you didn't answer the following question from @besibo https://github.com/besibo:
Are you behind a firewall? etc...
I wonder if this is the source of your issue ...
FWIW I just tried the example @besibo https://github.com/besibo did, and it worked fine:
library(marmap)
system.time(getNOAA.bathy(lon1=0,lon2=10,lat1=0,lat2=10, resolution=30)) Querying NOAA database ... This may take seconds to minutes, depending on grid size Building bathy matrix ... user system elapsed 0.13 0.16 1.62
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/ericpante/marmap/issues/3#issuecomment-295657313, or mute the thread https://github.com/notifications/unsubscribe-auth/ACvq-1NSqAygR-GUwV__l-CIXVp5N7dzks5rxyongaJpZM4G64sx .
Some updates about the issue. The last couple of days I was getting an error. The NOAA server cannot be reached All day except from 19:00 GMT +1 (BST) until sometime at night early next morning. Today the server has been working fine, all day. So, I guess it is a problem from NOAA directly.
@richardsc
I've just updated getNOAA.bathy(). It now performs a few sanity checks for lon1
, lon2
, lat1
, lat2
and resolution
parameters before querying NOAA servers. Appropriate (and hopefully less misleading) error messages have also been included.
Best Benoit
Thanks @besibo ! I'll check it out in the develop version, but for now will close the issue.
This was definitely user error, as I accidentally tried to pass the same value for
lon1
andlon2
, but the error that was reported was:which lead me to believe that the server was down and the issue wasn't with my code. A better check would be to see if the range of lons and lats is actually valid before trying to query the server.
Thanks for a great package by the way!