-
Hi! The linear trend function isn't that relevant, but basically I would like to apply the 2D (lat, lon) mask made from the linear trend plot to the air temp anomalies (time, lat, lon). Is that possible in xarray? I first used xarray.where to just isolate any values below 0 (using air temp rasm as reproducible example):
I originally tried using numpy masking arrays by copying the mask and applying it to the air temps anomaly data array, but then there was a disagreement with the dimension sizes since the air temp anomaly contains the time axis.. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Have you tried |
Beta Was this translation helpful? Give feedback.
Have you tried
Tair_anoms.where(linear_trend > 0)
?where
broadcasts so you can apply a mask with a different number of dimensions.