cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
21 stars 2 forks source link

Adds weighted annual averaging function to replace cmip_annual #297

Closed vicford closed 1 year ago

vicford commented 1 year ago

Previously, we were using an unweighted annual average of monthly data to calculate the annual average in CMIP6 models in the model_uncertainty notebook. This can ultimately cause some subtle errors in values (see: https://ncar.github.io/esds/posts/2021/yearly-averages-xarray/). This PR replaces this function in the climakitae codebase, and companion PR will update the model_uncertainty notebook --> https://github.com/cal-adapt/cae-notebooks/pull/79


To test: Please run the model_uncertainty notebook in the model_update branch with this climakitae branch

claalmve commented 1 year ago

LGTM! Runs perfectly well in model_uncertainty notebook.