NCAR / ADF

A unified collection of python scripts used to generate standard plots from CAM outputs.
Creative Commons Attribution 4.0 International
35 stars 29 forks source link

Provide consolidated averaging methods #241

Closed brianpm closed 1 year ago

brianpm commented 1 year ago

I added these functions to plotting_functions.py:

I then modified:

To all use the same averaging (i.e., seasonal_mean()).

I did limited testing to see if this works. My hope is that this helps to reduce any inconsistencies in the final output. For example, this should provide time-weighted means in both the table and the maps.

I moved the checks for the output files to before the averaging. That should allow a speed up when re-running the ADF because the calculations can be skipped once existing plots are detected.

an aside

I'm not sure whether we want to reconsider the option weight_season? I think whenever we have monthly data, we should use a weighted average (even for weird calendars that don't have different lengths of months, I guess). The weighting could be dropped for high-frequency output, but maybe that shouldn't a user-facing option?

brianpm commented 1 year ago

@nusbaume -- I think I addressed all your comments. I also update the polar and vector plots to use seasonal_mean. I also added a .sel(lev=pres) in the maps for the case when we should be selecting a pressure level. I think that I missed that before.

I just pushed the updates to my branch -- they appear automatically here, right?