My general aim is to create a graph, where temperature is plotted against time. I downloaded gridded climate data (NetCDF file) for my research area, containing Long, Lat, Temperature Value and Time, for each grid cell. I imported the file in R using RNetCDF. That's to code I used for that:
Grid_Temp <- "FULL_TMP_cru_ts3.23.1901.2014.tmp.dat_65-80E_35-45N.nc"
fid_T <- open.nc (Grid_Temp)
print.nc(fid_T)
Temp <- read.nc(fid_T)
close.nc(fid_T)
As a result, I get a list with 4 elements: time (1d), lon (1D), lat (1D), and tmp (3D:Long,Lat,Time).
I don't know how I can use this output to produce my plot. First of all, I want to limit the time element. At the moment time is going from 1901-2014. However, I need to start with 1930. Time is in months, meaning the time element contains numbers from 0:1368, as months are numbered consecutively. I need to start at number 360. Could anyone help me, how I can restrict my time?
And for the plot: I need the time (1930-2014) on the x-axis and on the y-axis should be the mean temperature of the research area. I don't know at the moment how to deal with this kind of list and therefore, don't know how I can create this plot.
Thanks a lot for every answer! I am doing this for my Master thesis and I am a beginner in R, so I appreciate every kind of help and tips! Thank you