convert a netcdf time variable to an R date object
问题 I have a netcdf file with a timeseries and the time variable has the following typical metadata: double time(time) ; time:standard_name = "time" ; time:bounds = "time_bnds" ; time:units = "days since 1979-1-1 00:00:00" ; time:calendar = "standard" ; time:axis = "T" ; Inside R I want to convert the time into an R date object. I achieve this at the moment in a hardwired way by reading the units attribute and splitting the string and using the third entry as my origin (thus assuming the spacing