Open PanfengZhang opened 6 months ago
This file contains climatology data which is why the year seems to be off (in fact it is off, it should be year 0 according to the COARDS convention which this file claims to follow). It is also off by 2 days, which appears to be an issue with POSIXt for these far away years. This is thus not an error in stars
but more like an unexpected outcome.
I do not know how to resolve this in stars
, but a q-n-d patch is Time <- st_get_dimension_values(fin, which = "time") + days(2)
.
The data for the climatology is for the period 1991/01/01 - 2020/12/31
(attribute climo_period
of dimension time
), or the current climatological normal period. It's a bit of a mystery why NCEP would continue to use the obsolete COARDS conventions instead of the current CF Metadata Conventions to produce current data.
The inverse situation also happens...
Thank you very much for your reply!
An error occurred while using the st_get_dimension_values function to obtain the time.
The example of .nc data is from NCEP (https://psl.noaa.gov/thredds/fileServer/Datasets/ncep.reanalysis/Monthlies/surface/slp.mon.ltm.1991-2020.nc)
According to the metadata information of the data, it is known that the actual time range is "0001/01/01 00:00:00 - 0001/12/01 00:00:00".