Extracting month values
Is there a convenient way to extract out the months? After the file loads, d$year ends up a fraction of year 2006.042 etc. Could we possibly add a month output (d$month) for the files that have months?
On a similar note I just got a request for a way to extract 'day' from the decimal year. Bumping this up the queue. This is hard since each of the simulations use their own calendars. We may need to see if any of the netcdf functions deals with this better then we do.
For now you can try something like:
year <- floor(time) month <- floor((time - year-1) * 12) day <- (((time - year-1) * 12) - month)*30
thanks kathe.
Rather than writing month/year extraction functions, maybe we should just store the time dimensions as…a date! Seems simpler and easier.