willaguiar / ASC_and_heat_transport

Github repository for Analysis of ASC speed and cross slope heat transport on Panan simulation
0 stars 0 forks source link

Identifying ASC Regimes and variability #20

Open taimoorsohail opened 9 months ago

taimoorsohail commented 9 months ago

I've been working on a) replicating the analysis from Huneke et al., 2022 to identify ASC regimes using an unsupervised clustering algorithm (Gaussian Mixture Modelling) and b) seeing if we can track changes to the GMM-based clusters on seasonal and inter annual time scales.

I fed the time-mean top-300m velocity profile minus time-mean bottom-700m velocity profile along the 1000-m isobath into the GMM, plus the sign of the along-slope velocity (to identify the reverse-ASC regime) at the surface. This ends up being OK at objectively identifying the regimes, aligning well with the Huneke et al., 2022 work:

GMM_ASC_trained

Now, I will work on seeing if this analysis is replicable over seasonal time scales, and what information this can give us.

wghuneke commented 9 months ago

Very cool that this worked out, I'm curious to see the results for different time scales!

taimoorsohail commented 9 months ago

I have now extended the analysis to seasonal, annual and monthly time scales. In each case, I train the GMM using the time-mean along-1000m isobath velocity field, and then find cluster locations on the time-varying velocities in the same way as described above. Note that the analysis is entirely to do with spatial extent, not magnitude of velocity field (that will need to be a future step). Still, the results are pretty interesting!

SEASONAL:

Generally speaking, depth-intensified ASC is covers a larger area in winter months (JJA), and the 'reverse' ASC (probably ACC) also covers a larger area. Surface intensified flows are more common in summer months. The spatial extent of the surface ASC changes a lot more than the reverse or deep. GMM_ASC_trained_season_labels labels_dist_seasonal

ANNUAL:

The annual-mean extent is pretty stable. However, it is interesting to see the trade-off between reverse and surface ASC from 1965 to 1975, between the surface and deep in the early 90s and a persistent trade-off between reverse and surface in the 21st century. Are these processes we know about? 1992 aligns with Pinatubo, but that could just be a coincidence? GMM_ASC_trained_annual_labels labels_dist_annual

MONTHLY:

The monthly signal is dominated by the seasonal changes (described above). However, performing a spectral analysis shows which time-scales are driving spatial extent for these classes. Interestingly, sub-seasonal variability is higher in surface and reverse ASC, compared to deep. This makes sense, as depth-intensified ASC may be less sensitive to short-term surface changes. At periods of 2 yrs or greater, all three clusters have the same power, so deep ASC has just as much variance as its surface counterparts. GMM_ASC_trained_monthly_labels labels_dist_monthly monthly_power_spectra

Next steps would be to calculate mean trends within each cluster (e.g., mean velocity, across-slope heat transport etc.) This will need to be discussed at the next Hackathon.

wghuneke commented 9 months ago

Great analysis!

The surface intensified ASC is the most common regime, it makes sense that it is the one which shows largest variability in the seasonality. Both other states will 'eat' from the surface-intensified regime. There isn't really a location where the depth-intensified and reverse are next to each other, I guess the sharp transition on both sides of the Antarctic Peninsula doesn't count. Interesting to see the different seasonality of the different regions in the depth-intensified ASC - could be interesting to plot the time series of the no bins relative to time-mean for each sector to see how it adds up to the total. Christina has shown the different seasonality in SWMT/AABW export per region - I expect the depth-intensified ASC to match that.

Re the trade-off between the surface reversed ASC: this shows that the area (~Amundsen Sea) is currently most sensitive to changes (how close is the ACC to the coastline? How much melting is there? Where exactly is the onset of the 'real' ASC...)

The monthly time series are quite noisy, which shows how much variability there is on small time scales. This matches with the findings of the analysis I did in the 2022 paper.

taimoorsohail commented 9 months ago

Thanks @wghuneke! Your explanations make sense, it's nice to see the clustering is able to objectively identify some of the variability in the coastal processes :) Do you have a definition of 'sectors' that can be used across the analysis? Also, I'm not sure how to produce a single vector field of along-slope cross-slope heat transport (I see there is a link to a set of files for CSHT but those files also include zonal convergence...).

taimoorsohail commented 9 months ago

I've also assessed how good a job the GMM does at isolating the expected velocities in a monthly time series. Overall, the time-mean and depth-averaged U_along time series makes sense. U_along_masked_clusters

taimoorsohail commented 9 months ago

Here's the correlation between monthly depth-averaged along-slope velocity and monthly depth-averaged cross-slope heat transport in the different regimes identified by the GMM. The deep regime has a pretty decent correlation - stronger off-shelf heat transport at stronger velocities, and stronger on-shelf heat transport at weaker velocities. This makes dynamical sense (I think) because if the ASC strength is driven by the strength of the ASF, then a weaker ASF/ASC implies a weaker thermodynamic barrier to on-shelf CDW transport, which is exactly what we see here. Surface and Reverse ASC don't really have meaningful correlations though... CSHT_vs_U_corr

wghuneke commented 8 months ago

Maybe we see lower correlations in the surface/reversed as the velocity signals are near the surface and when you do a depth average that signal is lost? I guess this brings us back to the point of having to split up the heat transport into different layers...

taimoorsohail commented 8 months ago

This is a great point @wghuneke. Did you mean something like this? I'm plotting the layer-wise correlation slope between CSHT and along-slope velocity in each regime, as well as the r=squared value in each layer. I think we can see the surface intensification leads to a different CSHT response than deep intensification for both the surface and deep regimes, which would definitely affect the depth-averaged correlations I showed originally.

layer_wise_CSHT_vs_U_corr-2

adele-morrison commented 8 months ago

This is interesting! Maybe applying some time filtering to this (e.g. separate sub-seasonal variability, seasonality, interannual variability) would be helpful for understanding the dynamics of what's driving the different correlations.

taimoorsohail commented 8 months ago

Interesting idea Adele! I've only done the time filtering once or twice. Is the workflow to deseason the monthly data (by subtracting the climatology from the raw time series) then apply a low-pass filter to filter out only certain time periods? If so, what times would correspond to the sub-seasonal, seasonal, interannual etc. time periods? I'm assuming seasonal is just calculated from the climatology, and the time window for the filtering of the deseasoned monthly time series is then <12 months for sub-seasonal and >12 months for the interannual signal?

adele-morrison commented 8 months ago

Yes, it would be useful to try this with:

  1. A monthly climatology.
  2. Annual averages.

I had missed the fact that you’re using monthly data. Probably for the sub seasonal we would want to use daily data to get the high frequency variability.

On Wed, Oct 18, 2023 at 5:18 PM, Taimoor Sohail @.***> wrote:

Interesting idea Adele! I've only done the time filtering once or twice. Is the workflow to deseason the monthly data (by subtracting the climatology from the raw time series) then apply a low-pass filter to filter out only certain time periods? If so, what times would correspond to the sub-seasonal, seasonal, interannual etc. time periods? I'm assuming seasonal is just calculated from the climatology, and the time window for the filtering of the deseasoned monthly time series is then <12 months for sub-seasonal and >12 months for the interannual signal?

— Reply to this email directly, view it on GitHub https://github.com/willaguiar/ASC_and_heat_transport/issues/20#issuecomment-1767739000, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA44U4VPFVFIQKBYYUYO5LX75YEZAVCNFSM6AAAAAA5KG6PN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRXG4ZTSMBQGA . You are receiving this because you commented.Message ID: @.***>

taimoorsohail commented 8 months ago

Thanks Adele, yeah, I'm hitting computational issues creating clusters for daily data. Maybe that's something we can talk about during the Hackathon.

In the meantime, I have analysed the layer-wise correlations of the monthly climatology and the annual-averaged time-series.

The key take away is that the interannual correlations explain the relationship between CSHT and ASC strength below ~600m, while the seasonal correlations explain the relationship between CSHT and ASC strength above ~600m. layer_wise_CSHT_vs_U_corr

For reference - here is the time-mean profile of CSHT and U_along in each of the regimes. Clearly, the ~600m isosurface is an important partition, as the maximum CSHT in surface regimes, and the point where CSHT moves in the opposite direction for the Deep regimes:

CSHT_vs_Ualong_time_mean

Happy to chat more about how these results can be used to tease out a more dynamical understanding of the ASC transport vs CSHT.

adele-morrison commented 8 months ago

Nice! Definitely the surface correlations are controlled by the seasonality. The deep values seem to have high correlations both on interannual and seasonal timescales (slightly larger on seasonal actually).

Can you remind me what spatial averaging you're doing here? Are you spatially averaging the ASC speed and cross slope heat transport before computing correlations? Or do you compute correlations first on a grid cell basis and then find the average correlation after?

On Thu, 19 Oct 2023 at 13:49, Taimoor Sohail @.***> wrote:

Thanks Adele, yeah, I'm hitting computational issues creating clusters for daily data. Maybe that's something we can talk about during the Hackathon.

In the meantime, I have analysed the layer-wise correlations of the monthly climatology and the annual-averaged time-series.

The key take away is that the interannual correlations explain the relationship between CSHT and ASC strength below ~600m, while the seasonal correlations explain the relationship between CSHT and ASC strength above ~600m. [image: layer_wise_CSHT_vs_U_corr] https://user-images.githubusercontent.com/20695740/276466072-623b767e-86f9-4b43-9288-b7e1d3a3cac8.png

Happy to chat more about how these results can be used to tease out a more dynamical understanding of the ASC transport vs CSHT.

— Reply to this email directly, view it on GitHub https://github.com/willaguiar/ASC_and_heat_transport/issues/20#issuecomment-1769806640, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACA44UY3LCOJWNO6LKMG37LYACIKJAVCNFSM6AAAAAA5KG6PN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTONRZHAYDMNRUGA . You are receiving this because you commented.Message ID: @.***>

taimoorsohail commented 8 months ago

I made a mistake in the annual-averaging, have edited the above post to fix it and the layer-wise correlations have changed. Just a heads up.

In terms of spatial averaging, I average along all longitudes corresponding to the regime (as identified by GMM) and then calculate the correlation in time.

willaguiar commented 8 months ago

Nice analysis!

I was discussing today morning the CSHT calculation with Adele, and one issue came up regarding vertical analysis of CSHT. Basically, the assumptions made for discounting the zonal convergence do not work well if we slice the HT vertically, or if we are analyzing it as a function of depth (check this post). By now we don't really know how much of a bias that creates, or how to/if we can fix it, so we thought it would be important to keep that in mind.

taimoorsohail commented 8 months ago

Okay, so a few different directions we can take this approach, in no particular order:

1) Do the analysis with daily data. 2) Do the analysis in specific regions (e.g., Totten, West Antarctic, etc.) 3) Split into mean and eddy components. 4) Do other isobaths other than 1000m. 5) Figure out if CSHT is accurate when doing layer-wise analysis. 6) It would be best to perform the analysis on density layers, but it's super tricky

Based on the discussion today, I think we should pursue (2) and (3). (1), (4), and (6) are probably not worth pursuing that much. @willaguiar let me know when (5) is resolved :)

adele-morrison commented 8 months ago

Also repeat the correlation calculations using depth average ASC vs cross slope heat transport at each depth.

taimoorsohail commented 8 months ago

Also repeat the correlation calculations using depth average ASC vs cross slope heat transport at each depth.

Here's the plot of depth-averaged ASC correlated with layer-wise CSHT:

layer_wise_CSHT_vs_depth_avg_U_corr

adele-morrison commented 8 months ago

Fast! My interpretation of this:

I wonder if it would be useful repeating this with sub-Ekman layer (e.g. 200-1000m) averaged ASC speed? i.e. Can we provide some useful information on what vertical resolution of obs is needed to infer cross slope heat transport variability from ASC variability?

taimoorsohail commented 8 months ago

I wonder if it would be useful repeating this with sub-Ekman layer (e.g. 200-1000m) averaged ASC speed?

The correlations stay approximately the same when slicing just the 200-1000m region for depth-averaging, basically, the predictability of the "Deep" regime is decreased, especially at depth.

layer_wise_CSHT_vs_depth_avg_U_corr-2

adele-morrison commented 8 months ago

Ok, so is the story here that overall depth-average ASC doesn't have a strong relationship with heat transport at depth? Except if you want to know about seasonality of the deep heat transport in the surface regime.

The strong relationship is really only with the ASC speed at the same depth as the heat transport. Maybe that tells us something about the dynamics?

willaguiar commented 8 months ago

For eddy CSHT ( treated as CSHT - seasonal cycle): CSHT for these are smaller, as well as the r2 and slope for regression. The only exception is maybe for the Annual average deep regimes. (Monthly seasonal is just with the regular data, not eddy, for comparisson)

CSHT_vs_Ualong_time_mea Eddy_layer_wise_CSHT_vs_U_corr

figures were updated in this link

adele-morrison commented 8 months ago

Can you clarify for me exactly how the eddy heat transport is calculated? What's the seasonal cycle in "(CSHT - seasonal cycle)"? We want this to be the climatological seasonal mean computed as (e.g. for meridional heat transport component only in January): T_bar_Jan v_bar_Jan where T_bar_Jan is the average temperature over all Januaries in the IAF, and v_bar_Jan is the average v over all Januaries in the IAF. Then the eddy component for January is the total heat transport minus T_bar_Jan v_bar_Jan.

So there could still be a monthly climatology of this eddy transport that's distinct from the total transport seasonal climatology.

There's a more detailed explanation of how to do this in Dufour et al. 2015 (page 3065).

willaguiar commented 8 months ago

For the plots before I did (eg for 1958/01) CHST1958/01eddy= CHST1958/01 - CSHTJanmean, where CSHTJanmean is the average of all Januaries from 1958 and 2018. So I guess is the same thing. For some reason I assumed there would be no monthly climatology, which now I see there is. Anyhow, I updated the plot above with the monthly climatology too

taimoorsohail commented 8 months ago

Ok, so is the story here that overall depth-average ASC doesn't have a strong relationship with heat transport at depth? Except if you want to know about seasonality of the deep heat transport in the surface regime.

The strong relationship is really only with the ASC speed at the same depth as the heat transport. Maybe that tells us something about the dynamics?

If we assume depth layers are approximately aligned with isopycnal surfaces at the 1000m isobath, I think it tells us that the heat transport and ASC strength in the "deep" regime are both set by the strength of the stratification. The on- and off-shelf heat transport is approximately along-isopycnal, and ASC strength is a consequence of thermal wind, so it makes sense that they are correlated in specific depth (read: isopycnal) layers but not overall. The surface regime, however, is well represented even with depth-averaged U_along because in this regime different (non-thermal wind related) dynamics are at play, clearly more of a seasonal dynamical signal.

These are my 2 cents - sorry if they are already obvious/in the literature.

taimoorsohail commented 7 months ago

I'm not sure if I have done this right (I think I have), but the p-value from scipy.stats.linregress shows that large parts of the correlation (namely, where the slope is not close to 0) are statistically significant. In this plot, if the blue lines are smaller than 0.95, it is not a statistically significant result.

layer_wise_CSHT_vs_U_corr_w_zonalconv-2

If we look at scatter plots of the bottom 500-1000m layer in the different regimes and time periods, you can see that at each depth level there is a clear correlation (see, more example, the seasonal; deep regime) other than the bottom and around 500m.

Scatter_plots_regimes-3

willaguiar commented 7 months ago

Interesting that the high p-values are always big deep along the water column!

PS: I thought the interpretation of the p-value should be the other way around, i.e., , scipy.stats.linregress test the null hypothesis that the variables are not correlated. So the higher the p, more likely is that the variables are not correlated. So ideally we want p-value <0.05? or is it reversed to 1-p in the plot?

taimoorsohail commented 7 months ago

Sorry, that wasn't clear in my explanation. As you can see from its label (top right corner subplot), I have plotted 1 - p-value. This is mostly for ease of visualisation so the r-squared and p-value lines don't overlap. Hope this makes sense, we will probably change the visualisation in the paper anyway :D

willaguiar commented 7 months ago

Cool. Awesome that the regions with big slope have higher significance (makes more sense anyways).

willaguiar commented 7 months ago

Here is some results for the Eddy Transport (calculated as CHST1958/01eddy= CSHT1958/01mean, online -CHSTjanoffline , with CHSTjanoffline=cp * rho * Vmean1958:2018/01 * Area * T mean1958:2018/01 ):

It seems that most of the poleward eddy heat transport occurs on the regions where ASC is bottom intensified

CSHT_vs_Ualong_time_mean-2

R2 is the biggest in deep and surface climatology. The slopes of the layer wise correlation in the monthly climatology of the bottom-intensified regime reverses direction too (Suggesting stronger ASC driving stronger poleward heat transport in the monthly climatology). Surface intensified r2 is the biggest ~500m on the monthly climatology, but the heat transport and slope are actually small at that level (fig on top) Eddy_layer_wise_CSHT_vs_U_corr-2

for reference the code used to calculate the climatology is here

taimoorsohail commented 7 months ago

It occurs to me that many of these correlations (and in #22 ) are statistically significant (r-sq > 0.5) for only a single depth layer (around 900m). So, should we really be looking at this as a meaningful relationship? Ideally we would have multiple adjacent z-levels showing a statistically significant correlation to make a judgement, right? In that case, I would think only the surface regime and monthly climatology correlations are significant. What do you all think? Unfortunately the deep ocean vertical resolution is quite coarse so it's hard to know whether we can trust a single layer with a good correlation.

ongqingyee commented 7 months ago

Motivated by Will's eddy CHST and ASC correlations: There we saw that the eddy CSHT and ASC have less of a correlation than expected, especially at depth in the Surface regime. In contrast the Deep regime has a higher correlation in the monthly climatology time series. The analysis below was to check if a lagged correlation between eddy CSHT and ASC would improve this relation.

Below is a Hovmoller plot of R2 at depth for different time lags between eddy CSHT and along-slope ASC. This used monthly data only so far. It looks like the highest correlations are still present when there is zero time lag. image

The regression slope plots also support this, with the regions of greatest regression slope at depth at zero time lag. We might want to discuss the Deep regime more. image

willaguiar commented 7 months ago

Interesting that at Z<400m, in surface and deep regime we have high $r^2$ along 3-months and 9 or 10 months lag! Any suggestion of what it could be?

taimoorsohail commented 7 months ago

Thanks @ongqingyee this analysis looks great! Just wondering what the result would look like if you had negative time lag? Are the correlations symmetric about 0 time lag or asymmetric? That might be good to see :)

wghuneke commented 7 months ago

Interesting that at Z<400m, in surface and deep regime we have high r2 along 3-months and 9 or 10 months lag! Any suggestion of what it could be?

How does the seasonality of the eddy-time series look like, maybe there's a weird re-emergence that produces these?

ongqingyee commented 7 months ago

@taimoorsohail Negative lags here, I think it looks pretty symmetric? image image

taimoorsohail commented 7 months ago

Nice, thanks! Yeah, it looks good. Thanks for checking.

ongqingyee commented 5 months ago

Interesting that at Z<400m, in surface and deep regime we have high r2 along 3-months and 9 or 10 months lag! Any suggestion of what it could be?

How does the seasonality of the eddy-time series look like, maybe there's a weird re-emergence that produces these?

I've looked at the Monthly Climatology of the CSHT and ASC at depth. At first glance, there doesn't seem to be any other cycle in the climatologies of either quantity.

Pasted image 20240112152714 Pasted image 20240112152947

However, zooming into the z<400m depth range and rescaling the colormap, there appear to be regions of high northward CSHT in month 10 (Surface regime) and month 3 (Deep regime). These are also depths where ASC speed is high, which might produce the unexpectedly high correlation. As the CSHT at shallower depths is small, it is likely that the shallower high correlations here are not relevant to the problem we are trying to tackle. Pasted image 20240109165125

willaguiar commented 5 months ago

I ran the GMM code using the average mask and daily data. Interestingly the results seem to converge here, with high significant correlations ($r^2$ >0.5) between 800m-900m in all regimes. The slope of regression in all 3 regimes with daily data is also similar, notice the regimes overlap on the scatter plot. Profiles_scatters

here is scatter plot without filtering $r^2$ and significance

willaguiar commented 3 months ago

below is the same figure, but now all regime masking is done with the mean mask, instead of the monthly one. (reminder of the one exception: daily plots are already using mean mask in both figs).

It seems to me that using the mean mask increases the $r^2$ between 800m-900m (e.g., check reverse monthly). I am not sure what to make out of that tho. (Perhaps the mean mask sometimes scatter deep regimes into other classifications, raising the $r^2$ between 800m-900m?)

should we aim to rerun the GMM classification using daily data? Or just stick to the monthly one?

output

taimoorsohail commented 3 months ago

To be honest, if we stick to using the mean masks then it doesn't necessarily even need to be derived from GMM. We could simplify the paper by just using Wilma's definitions and referring readers there. Though it's ture that it's always better to be objective, GMM isn't truly objective anyway as it's based on the input data we use. I'm happy either way.

On Fri, 15 Mar 2024, 2:26 pm Wilton Aguiar, @.***> wrote:

below is the same figure, but now all regime masking is done with the mean mask, instead of the monthly one. (reminder of the one exception: daily plots are already using mean mask in both figs).

It seems to me that using the mean mask increases the $r^2$ between 800m-900m (e.g., check reverse monthly). I am not sure what to make out of that tho. (Perhaps the mean mask sometimes scatter deep regimes into other classifications, raising the $r^2$ between 800m-900m?)

should we aim to rerun the GMM classification using daily data? Or just stick to the monthly one?

output.png (view on web) https://github.com/willaguiar/ASC_and_heat_transport/assets/70033934/33a6254d-9ed5-4db6-8803-52da87670866

— Reply to this email directly, view it on GitHub https://github.com/willaguiar/ASC_and_heat_transport/issues/20#issuecomment-1998872056, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE54VPGJHOTPO2BACO5F4DDYYJS4RAVCNFSM6AAAAAA5KG6PN6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYHA3TEMBVGY . You are receiving this because you were mentioned.Message ID: @.***>

taimoorsohail commented 3 months ago

Hey folks, I need some advice about turning the scatter plots above into PDFs. At the moment, the scatter plots above convey (a) Regime and (b) depth at once. If I express each scatter plot as a PDF, then we add a new variable, (c) density of points. In 2D, I can only express 2 out of those 3 things in a single plot. So, I could plot three PDFs for each regime on top of each other at a single depth level (as the colorbar would express the density of points), but then we would need the same number of plots as there are depth levels. In the current set up, we obscure (c) in favour of (a) and (b). In my view, (c) is only relevant in the Daily plots, so perhaps we shouldn't express things as a PDF. What do you think?

Below is an example of what two regimes' PDFs might look like:

Screenshot 2024-03-18 at 12 39 21 PM

adele-morrison commented 3 months ago

I think what we care about most is the deep correlations, because that's where the heat transport of interest is. So what about only showing points for >800m (or similar threshold) and losing the depth information?

taimoorsohail commented 2 months ago

OK, I have produced an example of what the correlation plots might look like with a transparent colour bar, and averaging over the 400-1000m layers. The below is an example for monthly, depth-averaged data for all 20-deg lon bins.

ASC_KDE_example_contourplot

I will upload the example plotting code so @ongqingyee and @willaguiar can incorporate into their codes!

The code is located in ASC_and_heat_transport/Jupyter/PDF_production_scatter.ipynb in my branch (taimoor)

willaguiar commented 2 months ago

Below is it a plot with deseasoned daily data with different bins. It seems that the correlations ~1000m decrease after deseasoning the daily data, especially in the reversed regime (compare it with the lighter pinks, that has smaller bin size). But after rebinding to 20deg, the correlations increase again.

(PDF missing as still calculating it for the daily data... sorry)

Screenshot 2024-04-22 at 4 16 50 PM