0

I have a netcdf file with the time dimension that goes from 12/2007 until 12/2010 with monthly time steps. I can see the correct dates in both arcgis and panoply. Panoply tells me this file is a NetCDF-3/CDM, and reports

time double time(time=37);
      :units = "hour since 1950-1-1T00:00:00Z";
      :long_name = "forecast time";

But when I open the dataset in R using either brick(), ncdf, or ncdf4 I get these values in the time variable

>  v1<-get.var.ncdf(nc, "time")
> v1

 [1] 508008 508752 509472 510192 510936 511656 512400 513120 513864 514608
[11] 515328 516072 516792 517536 518256 518952 519696 520416 521160 521880
[21] 522624 523368 524088 524832 525552 526296 527016 527712 528456 529176
[31] 529920 530640 531384 532128 532848 533592 534312

and these is the values I get from the brick function

names       : X508008, X508752, X509472, X510192, X510936, X511656, X512400, X513120, X513864, X514608, X515328, X516072, X516792, X517536, X518256, ... 
z-value     : 508008, 534312 (min, max)

Is there some parameter that needs to be changed that deals with time. I can't find any information rather than some sparse posts around the web.

  • 1
    ISOdatetime(1950,1,1,0,0 ,0,tz="GMT")+508008 * 3600 # [1] "2007-12-15 GMT" – mdsumner Feb 15 '14 at 10:14
  • @mdnsumner can you explain your solution? I'm having the same issue – G. Gip Aug 30 '16 at 13:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.