## ncdf4
u <- 'http://test.opendap.org/dap/data/nc/coads_climatology.nc'
library(ncdf4)
dataset <- nc_open(u)
names(dataset$var)
## [1] "SST"  "AIRT" "UWND" "VWND"
names(dataset$dim)
## [1] "TIME"   "COADSX" "COADSY"
X <- ncvar_get(dataset, "COADSX")
Y <- ncvar_get(dataset, "COADSY")
xdx <- 10:14
ydx <- 10:14
tdx <- 1
SST <- ncvar_get(dataset, "SST", 
                 start = c(min(xdx), min(ydx), min(tdx)), 
                 count = c(length(xdx), length(ydx), length(tdx)))
library(raster)
## Loading required package: sp
plot(raster(list(x = X[xdx], y = Y[ydx], z = SST)))

## raster

## raster won't pull the data until we do something else
(r <- raster(u, varname = "SST", band = tdx))
## class       : RasterLayer 
## band        : 1  (of  12  bands)
## dimensions  : 90, 180, 16200  (nrow, ncol, ncell)
## resolution  : 2, 2  (x, y)
## extent      : 20, 380, -90, 90  (xmin, xmax, ymin, ymax)
## coord. ref. : NA 
## data source : http://test.opendap.org/dap/data/nc/coads_climatology.nc 
## names       : SEA.SURFACE.TEMPERATURE 
## z-value     : 366 
## zvar        : SST
r_mem <- crop(r, extent(r, 10, 14, 10, 14))
plot(r_mem)

## tidync
library(tidync)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:raster':
## 
##     intersect, select, union
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
a <- tidync(u) %>% hyper_filter(COADSX = between(index, 10, 14), 
                           COADSY = between(index, 10, 14), 
                           TIME = index == 1) %>% 
  hyper_slice(select_var = "SST")
## not a file: 
## ' http://test.opendap.org/dap/data/nc/coads_climatology.nc '
## 
## ... attempting remote connection
## Connection succeeded.
plot(raster(list(x = X[xdx], y = Y[ydx], z = a[["SST"]])))