Closed willaguiar closed 5 months ago
Agreed, that doesn't seem right. I think you want to weight by dz. Which grid is u_along on again?
What about testing the different density binning algorithms in that notebook just for a single daily average? Might help to spot where the bug in the xhistogram method is.
U_along is on the U and V grids. I did a second test using area*dzt
as weight for the averages, and it gives similar results. Lemme try to weight with only dzt, and other methods to see how it'll look like.
I tested xhistogram-binning the monthly data with monthly dzt instead. The issue persists. One problem could be that these binning tests Im doing are using the monthly data, instead of daily.
I couldn't find dzt for IAF_cycle_3.... could we get it by calculating uhrho/(u*rho)
?
I believe I figured out why the maximums and minimums of ASC speed are larger in $\sigma$ than in $z$.
Explanation: Umin(z) has to always be more negative than Umin(sigma), since Usigma is binned and averaged from Uz. That indeed happens monthly( see that delta Umin (z – sigma) is always negative in the hovmoller below, as it should)
The delta is only positive when we average between months in each year ( hovmoller below for annual means, black line 7E, green line 225W)
That is because at the sigma resolution chosen, we end up not having ASC speed in all sigma layers during the whole year, and therefore the minimum(sigma) don’t get properly averaged by the nanmean. While in Z levels, the minimum gets averaged. Check for example the case 7E below, year 2000, where the minimum occurs in May, at surface and around 1027.4… For comparisson, look below at the 225W case , where Umin(z) is always more negative than Umin(sigma) both monthly and annually (e.g., two first plots of this issue). In this case the Umin at ~1027.5 seem to be more reasonably averaged with speeds in July and December Bottomline, the problem is likely because of the high-resolution bin spacing. This should be solved once we have the data separated into 3-6 large sigma bins as discussed in the last meeting.
I think for the next steps we should move on to decide which density bins classification we will use, and afterwards revisit this ASC speed issue to see if the problem went away.
I have been using xhistogram to bin the ASC speed along the 1 km isobath into density levels according to this notebook. However, I noticed that after rebbinning the maximums and minimums (along vertical) of the speed increase.:
Since we want the average for the rebining, I calculated the new ASC speed as
xhist(weight=speed*Area)/xhist(Area)
, as suggested by Xhistogram . I tried using volume instead of Area for weighting, and the same intensification happens...... It seems weird to me, as I think we could have different means in the ASC speed between $\sigma$ and $z$ (for non-weighted averages), but the maximums should be the same... Unless I am missing something......Any ideas @adele-morrison ?