-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Labels
questionGeneral questionGeneral question
Description
I recently discovered the function
field.collapse('T: mean',group=cf.djf())However, I've discovered that rather than grouping by actual winter season, I think what it's doing is grouping by the Jan, Feb and Dec of the same calendar year. Or at least, what it's producing is definitely not right!
Is there a way of doing this so that it actually gets the D,J,F from the same season?
What I've always done in the past is something along the lines of:
field_dec = field.subspace(time = cf.month(12))
field_jan = field.subspace(time = cf.month(1))
field_feb = field.subspace(time = cf.month(2))
field_djf = field_dec.copy()
field_djf.data[:-1] = (field_dec.data[:-1]+field_jan.data[1:]+field_feb.data[1:])/3.But I'm wondering if there is a more efficient way of doing this, without manipulating the data itself?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
questionGeneral questionGeneral question