I am having problems with a file of Arctic Sea Ice Seasonal Change and Melt/Freeze Climate Indicators from Satellite Data (https://nsidc.org/data/NSIDC-0747/versions/1). I am trying to extract some variables from a large (290MB) .nc file (file can be downloaded here https://gofile.io/?c=ngLxfa). I thought it would be easy, as I had done this before. This is what I usually do:
First part to prepare the coordinates
coords<-read.xlsx("dat.xlsx") #data
site <- tibble(long=as.numeric(surfsed[[5]]),lat=as.numeric(surfsed[[6]])) #long and lat
pts <- SpatialPoints(site)
crs(pts) <- "+proj=longlat +datum=WGS84"
ptrans <- spTransform(pts, "+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs")
second to extract the data at the coordinates I want (ptrans) from the variable named DOO (Day of opening; last day the sea ice concentration drops below 80%)
f <- "arctic_seaice_climate_indicators_nh_v01r00_1979-2016.nc" (data from 1979 -2016)
var <- brick(f,varid="DOO")#call the variable I want
days_open <- raster::extract(var[["X2015"]], ptrans)#the data for the year 2015
but when I run the brick command, I get this message:
[1] "vobjtovarid4: **** WARNING ****
I was asked to get a varid for dimension named xgrid BUT this dimension HAS NO DIMVAR! Code will probably fail at this point" [1] "vobjtovarid4: **** WARNING **** I was asked to get a varid for dimension named ygrid BUT this dimension HAS NO DIMVAR! Code will probably fail at this point"
I do not understand, because the variable 'DOO' exists. It happens the same with any of the other variables.
f<-ncdf4::nc_open("arctic_seaice_climate_indicators_nh_v01r00_1979-2016.nc")
variables = names(f[['var']])
variables
[1] "latitude""longitude""projection""AHRA""EMO""CMO""EFO""CFO""DOO""DOR"
[11] "DOA""DOC""IIFP""OIFP""SLIP""SGIP""SIZ"Any suggestion?