Hi all, I have a quick question. I have gridded data I am trying to manipulate and for the sake of existing code I have written (that had this type of index with the data embedded in the netcdf file) would like to create an auxillary matrix with the corresponding time
For instance, I have 12,xxx indexes that correspond to each day between Jan 1, 1979 to Dec 31, 2011
I would like to create a 4x12,xxx array that is of the following behavior
(Record, Month, Day, Year) where each one is 12,xxx in length
Record is the raw index value (1-12,xxx)
Month is the coressponding month of the index value (ie 31 consecutive 1's for Janurary, 28 consecutive 2s for Feb, etc and repeats)
Day is the corresponding day (1-28(31)) for the index
Year is the corresponding year (365 consecutive 1979, then 365 1980s, etc)
Is there an easy way to make this type of array? I would need to take into accoun the leap years and what not
Thanks for any tips
For instance, I have 12,xxx indexes that correspond to each day between Jan 1, 1979 to Dec 31, 2011
I would like to create a 4x12,xxx array that is of the following behavior
(Record, Month, Day, Year) where each one is 12,xxx in length
Record is the raw index value (1-12,xxx)
Month is the coressponding month of the index value (ie 31 consecutive 1's for Janurary, 28 consecutive 2s for Feb, etc and repeats)
Day is the corresponding day (1-28(31)) for the index
Year is the corresponding year (365 consecutive 1979, then 365 1980s, etc)
Is there an easy way to make this type of array? I would need to take into accoun the leap years and what not
Thanks for any tips