python-aos-lesson
python-aos-lesson copied to clipboard
Expand the vectorisation lesson to "xarray thinking"
At the moment the vectorisation lesson is very short and simply introduces the idea of not looping over arrays in Python.
It would be good to extend that lesson to talk more broadly about how to think about array operations using xarray. The following tutorial from @dcherian talks about working in index versus label space, and how to use methods like reduce and map to apply functions to arrays: https://github.com/ProjectPythiaTutorials/thinking-with-xarray_2022_03_09
In terms of the data analysis example in these PyAOS lessons, the concepts introduced in an extended xarray thinking lesson could be used to plot the seasonal climatology (i.e. four panels in one plot), custom seasons (e.g. 'NDJFMA', 'MJJASO'), apply spatial smoothing, etc.
Here's the lesson recording: https://www.youtube.com/watch?v=TSw3GF_d2y8