I'd like to write a NetCDF that will contain 366 days per year for all years, with the Feb 28th value repeated as the Feb 29th value in the case of non-leap years. How would I build the list/array of time values so that the Feb 29th slot contains the same time value as Feb 28th during non-leap years? Is this really what I want to do, or is there another approach typically used for this? I haven't yet found an example of how to create a time coordinate variable with calendar attribute all_leap
or 366_day
.
My concern is that I'll need to do something to account for the "filler" Feb 29th in the non-leap years in order to satisfy software such as Panoply which I use for quick plots when doing data analysis. I'm not referring to the data variable values, I mean the actual time step values such as "5894 days since 1900". For example when I'm stepping through the data timestep by timestep (day by day) I want to make sure that I don't start getting off-by-one errors that end up confusing Panoply, so when I'm looking at a plot for a timestep it's interpreted correctly when it displays the time value in date format.
Maybe the crux of this is whether or not I can have duplicate values in the array of time step values, and if so will Panoply etc. handle these gracefully, i.e. when I'm constructing an array of time values to load into the time coordinate can I duplicate the value for Feb 28th in the array element mapping to Feb 29th when it's not a leap year?