So I have this dataset that runs on a strict 365-day calendar year, apparently meaning that data for December 31st isn't recorded on leap years. This leaves my "day" variable in netCDF files stuck at 365 instead of 366. For the type of analysis I'm doing in R, I need to add in December 31st on those leap years. Is there a way, either with netCDF or raster tools in R, to add in a "null" 366th day with the same attributes as the other days, but all points having no data/only the established fill value (e.g., "NA", "-9999")?
If so, as kind of a bonus, I have another dataset that's a little trickier. It's missing days at random points in the year, but originally came in GRIB/GRIB2 format. If the dates run from January 1st to June 1st, and then June 2nd is completely missing, but June 3rd through December 31st is intact, how should I move forward converting them all into one netCDF file with a "blank" data day for June 2nd? What I was initially thinking was concatenating those GRIB/GRIB2 files from January 1st to June 1st and writing a netCDF file for it, create a blank netCDF file with some fill value for June 2nd, and then concatenating those GRIB/GRIB2 files from June 3rd to December 31st and writing a netCDF file for it, and then combining all of those netCDF files somehow in R. If anyone has any ideas how I might create that blank file that matches all the attributes of the other dates, or how I might combine them all in R, please let me know!