Tags: NOAA-GFDL/xwmt
Tags
Enforce fillna(0.) in xgcm.transform for consistency
It seems like with upgrading xgcm to v0.9.0, the default
behavior when a bin is missing is to assign it a NaN value,
as opposed to the old behavior of filling it with a 0.
To preserve the old answers (and to match user expectations),
we now enforce a .fillna(0.) after xgcm.transform. This bug was
only discovered by mapping the transformations in notebook
`4_benchmarking_transformation_methods.ipynb`, where the
time-mean of the `xgcm.transform` method was giving erroneous
results because the default behavior of .mean("time") is to
skip NaN transformations (which should actually be zeros),
resulting in a large overestimation of the mapped transformation
rates.
Also re-ran all notebooks.