Calculating anomalies from a specific climatology #404
Replies: 4 comments 5 replies
-
@meganf11 – thanks for checking out xCDAT. You're right that xCDAT currently takes departures relative to the full dataset period. There is a Feature Request open to allow the user to select the baseline period (or provide an xarray dataarray/dataset with the climatology). I outlined a possible workaround in that feature request, but I didn't try it (I imagine it doesn't "just work" and you might need to use pandas to do some sort of group subtraction). @chengzhuzhang / @lee1043 – is there an easy workaround to take the seasonal departures with respect to a user-specified base period? @meganf11 – if you do find a work around, can you update this discussion? Or if you're willing to try a PR for that feature request, there is a pretty good xCDAT contributing guide here (and @tomvothecoder could likely weigh in with pointers since he put together the original departures code). |
Beta Was this translation helpful? Give feedback.
-
Hi @meganf11, We are excited to hear your interest in using xCDAT! Getting seasonal average correct is one of many things the xCDAT core team has spent many time on it! As @pochedls discussed above (thanks @pochedls for your comment and for pinging me!), we are yet to have the capability of getting anomaly of full time series from a specific baseline time window that is different than that of the full time series, but we definitely have a plan to add that capability. During the meantime, I have crafted a cookbook for a workaround, which needs some extra steps as follows.
Please feel free to make any suggestions if the cookbook is not clear enough. It is in the beginning stage and any feedback would be appreciated. Let me know if you have any question. |
Beta Was this translation helpful? Give feedback.
-
Thanks for putting together the cookbook @lee1043! And thanks for the codes for simplifying, @pochedls. I was looking into the new feature requested by @pochedls here:. The departure function @tomvothecoder wrote ( Line 474 in 1a0afb4 groupBy before subtracting the reference climatology. It might be worthwhile to add time slice selection function sel in temporal.climatology through a reference_period or more general sel_time_slice argument, so that both temporal.climatology and temporal.departures can have a way to select time (reference time) slice.
Regarding to |
Beta Was this translation helpful? Give feedback.
-
This is a not uncommon problem In the cdat days the fix was to call cdutil.setTimeBounds with an appropriate temporal argument No idea what to do in xcdat Michael Dictated to my iPhone, please excuse Siri's grammatical errorsOn Jan 24, 2023, at 10:29 AM, meganf11 ***@***.***> wrote:
Thanks for all the input! I am trying the code that you suggested a few comments down, but its telling me that no bounds were found for the "T" axis and I am not sure how to interpret this. I tried going to the API for the function but had little luck.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you are subscribed to this thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
I am trying to calculate seasonal anomalies from monthly gridded data spanning from 1870-2100. I was excited to use xCDAT because of how easy it is to specify CORRECT seasons, such as DJF, but I am interested in taking seasonal anomalies from a 30-year baseline climatology (1971-2000). Any help is much appreciated, thank you!
Beta Was this translation helpful? Give feedback.
All reactions