Good morning,
I am able to download DHW and SST data for all my islands of interest in Hawaii across time (1986-2019), except for Kure. All the values I get for Kure are NaN. This is using R, but when I try to download data directly from OW ERRDAP site it works! Wondering why that could be and how I could fix this because I would like to use R to download all my data. (And still having problems getting data anywhere in 1985, I put this question on the Agenda/in my other thread).
Here is the code I am using to get the DHW and SST data, which works and gives me actual values for all other islands:
isl_2 <- isl[ which(isl$ISLAND_CD == names[i]),] # subset to island as specified by names[i]
isl_2=st_coordinates(isl_2) # retrieves coordinates in matrix form for that island that we want data for
poly <- as.data.frame(isl_2[,1:2]) # turn into a data frame
names(poly) <- c("lon","lat") # add column names to coordinates
# convert the longitudes to 0-360º to make it easier to work across the dateline
I=which(poly$lon<0)
poly$lon[I]=poly$lon[I]+360
## extraction begins ##
xcoord <- poly$lon # set boundaries ~ for Kure this is: 181.6495, 181.7218
ycoord <- poly$lat ## for Kure this is: 28.37772 28.40958
tcoord <- c(paste(years[j],"-01-01", sep = ""), paste(years[j],"-12-31", sep = "")) # set the time period we pull data for
# set data info for sst
dataInfo <- rerddap::info('CRW_sst_v1_0', url=ERDDAP_Node) # define what dataset we want
dataInfo$variable$variable_name # choose from these variables: "analysed_sst" "sea_ice_fraction"
parameter=dataInfo$variable$variable_name[1] # select sst as parameter of interest
sst <- rxtractogon(dataInfo, parameter=parameter, xcoord=xcoord, ycoord=ycoord, tcoord=tcoord) # extract sst data
# set data info for dhw
dataInfo_2 <- rerddap::info('CRW_dhw_v1_0', url=ERDDAP_Node)
dataInfo_2$variable$variable_name
parameter_2=dataInfo_2$variable$variable_name[1]
dhw <- rxtractogon(dataInfo_2, parameter=parameter_2, xcoord=xcoord, ycoord=ycoord, tcoord=tcoord) # extract dhw data
Thanks!!!
Morgan