I am relatively new on R. I am trying to get time series of different points ( lat, lon) of temperature data from a netCDF file. My sample data file is here and here is the small file . I have tried netCDF package and the code i have used so far
library(ncdf)
obsdata = open.ncdf("obs.nc")
print.ncdf(obsdata)
obsdatadates = obsdata$dim$time$vals
obsdatadates = as.Date(obsdatadates,origin = '1950-01-01')
obsdatadates
obsoutput = get.var.ncdf(obsdata, varid = 'tasmin', start = c(1,1,1),
count = c(1,1,22280))
dim(obsoutput)
datafinal=merge(obsdatadates,obsoutput)
Can anyone help me to get a dataframe of timeseries ( first column) and value of data in another for a particular points( lat, lon) of that data. In this case I am looking for time series ( 1950-01-01 to 2010-12-31 for which the data is ) for a particular lat lon point ( and repeat for many points of interests) and for given variable(in this case tasmin). Your help would be appreciated. Thank you, aseem