noaa-onms / cinms

Channel Islands National Marine Sanctuary
https://noaa-onms.github.io/cinms
MIT License
3 stars 1 forks source link

Having trouble with erdMWchlamday dataset #51

Closed superjai closed 3 years ago

superjai commented 3 years ago

One goal we have is to use a different chlorophyll dataset other than nesdisVHNSQchlaMonthly, since the server holding that data tends to go down a lot. An alternative cholorophyll dataset is erdMWchlamday, but I am having trouble with this latter dataset. Specifically, I am having trouble pulling a valid erdMWchlamday raster with griddap. If we try the following command as an example, we get the ensuing (bad) result :

nms4r::ply2erddap("cinms", "erdMWchlamday", "chlorophyll", 2010, 6, c("mean", "sd")) 
$mean
NULL

$sd
NULL

The reason for this is that line 493 of spatial.R is not forming a proper raster object. I have been poking around and I have been having trouble translating the griddap nc object (created in line 467) into a raster object.

I guessed the issue was caused by the longitude translation required by this particular dataset (longitude is defined for erdMWchlamday as positive degrees east, whereas the other datasets we have dealt with as well as the polygons themselves define longitude as negative degrees west). That doesn't seem to be the problem (I think), but I can't figure out what it might be.

Here's the link to the erdMWchlamday dataset on coastwatch by the way.

bbest commented 3 years ago

This was for alternate Chl dataset, so let's skip for now.