This is my first attempt working with data in a .nc file. I manually downloaded the dataset (https://downloads.psl.noaa.gov/Datasets/noaa.oisst.v2/sst.ltm.1961-1990.nc) and saved it to my computer. However, I'm having difficulty extracting the data for analysis.
# open data file
sst <- nc_open("./Data_Covariates/Raw/sst.ltm.1961-1990.nc")
# view metadata
print(sstOld)
# extract data
lat = ncvar_get(sst, "lat")
lon = ncvar_get(sst, "lon")
date = ncvar_get(sst, "time")
sstVar = ncvar_get(sst, "short sst")
# from the metadata, I assumed that "short sst" was the name of the variable for sea surface temperature, however, I get the following error:
Error in vobjtovarid4(nc, varid, verbose = verbose, allowdimvar = TRUE) :
Variable not found
Additionally, the metadata states that unit for time is days since 1800-01-01 00:00:0.0. However, the values are all negative numbers and I'm unsure how to convert these to actual dates.