Giter VIP home page Giter VIP logo

Comments (21)

taimoorsohail avatar taimoorsohail commented on September 16, 2024 1

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024 1

Thanks @willaguiar! I just plotted the first month in the monthly binned data for CSHT and U_along. Shouldn't they have the same isobath definition regardless of if it is time-averaged or if it is instantaneous? Here's the code snippet that pulls the CSHT, does the monthly averaging, and plots the first month:

CSHT_along = xr.open_mfdataset(\
    '/g/data/v45/wf4500/ASC_project_files/Cross_slope_heat_transport/OM2_IAF/daily_z/*')
CSHT_along_monthly = CSHT_along.resample(time='1M').mean()
CSHT_months = ((CSHT_along_monthly.binned_cross_slope_heat_trans+CSHT_along_monthly.zonal_convergence)*0.08).rename({'st_ocean':'depth', 'lon_bin_midpoints':'lon'})

fig, axs = plt.subplots(nrows=1, ncols=2, figsize=(10,5))
axs = axs.ravel()
plt.subplots_adjust(hspace = 1.2, wspace=0.2)

CSHT_months.where(CSHT_months!=0).isel(time=0).plot(ax=axs[0], cmap = plt.cm.Greens)
axs[0].invert_yaxis()
axs[0].set_ylim(2000,0)
axs[0].set_title('CSHT')
u_along_da_monthly.isel(time=0).plot(ax=axs[1], cmap = plt.cm.Blues)
axs[1].invert_yaxis()
axs[1].set_ylim(2000,0)
axs[1].set_title('U_along')
plt.show()

It could have to do with the fact that I add the zonal convergence, which could go deeper, to get the total CSHT?

from asc_and_heat_transport.

willaguiar avatar willaguiar commented on September 16, 2024 1

Ok, seems to me that those deep values come from the Zonal Convergence..... not sure why tho.... ( checking it)

Screenshot 2024-04-11 at 4 41 00 PM

from asc_and_heat_transport.

adele-morrison avatar adele-morrison commented on September 16, 2024 1

Hmm I'm not sure I understand, maybe we should zoom?

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

For reference - this is what the monthly CSHT and U_along look like in terms of their max depth:

Screenshot 2024-04-11 at 12 28 44 PM

This data is pulled from

# Load the along-slope velocity field
u_along = xr.open_mfdataset('/g/data/v45/wf4500/ASC_project_files/Binned_ASC_speed/OM2_IAF/Binned_Antarctic_slope_contour_1km_velocities*')
# Load CSHT field
CSHT_along = xr.open_mfdataset(\
    '/g/data/v45/wf4500/ASC_project_files/Cross_slope_heat_transport/OM2_IAF/daily_z/*')
    ```
    

from asc_and_heat_transport.

willaguiar avatar willaguiar commented on September 16, 2024

Ok, there seem to be a big mismatch in the isobath between the CSHT and U ~-80. Im gonna check the code that produced the CSHT to see if the same isobath is used.

PS: Is the plot on the left with the binned or unbinned CSHT? @taimoorsohail

from asc_and_heat_transport.

adele-morrison avatar adele-morrison commented on September 16, 2024

I don't think I was following the discussion on this closely before. Why is the max depth of the CSHT and u_along different at each longitude? I thought we used the same isobath for both?

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

@willaguiar The data isn't binned, it's the raw longitudes I believe EDIT: It's the binned data - sorry for the confusion!

from asc_and_heat_transport.

willaguiar avatar willaguiar commented on September 16, 2024

ok, I checked the isobath used in the ASC code, line 291 and in the CSHT, line 260 and they come from the same file.

I also plotted the vars in the dirs pointed above. Even tho they don't look identical, the binned variables look very similar
Screenshot 2024-04-11 at 3 23 33 PM

@taimoorsohail did you use a specific time slice for that plot? My plots above are averages, so perhaps they are missing some peak deep value happening in one time slice, or missing something else.

edit with unbinned data:

I don't see that deep value in the unbinned data either (Although another problem I see is that the unbinned seem to go shallower than the binned one)
Screenshot 2024-04-11 at 3 58 57 PM

from asc_and_heat_transport.

willaguiar avatar willaguiar commented on September 16, 2024

ok, I was looking at the code for the Zonal Convergence. The ZC is calculated from the difference x-transports not on the 1000m isobath, but at the points adjacent to the edges of each 3deg bin. So I think what is happening here is that the depths at the edge of certain bins can be bigger than the depth of the points inside the bins, creating the deep ZC values. Does that make sense @adele-morrison ?

If so perhaps the best thing to do is to mask out any ZC point that do not have CSHT in it

from asc_and_heat_transport.

willaguiar avatar willaguiar commented on September 16, 2024

I talked to @adele-morrison in person on that issue today. It seems reasonable that the ZC would have deeper values, as they are not taken from the exact same points as the Binned CSHT. The only problem that could arise is in the vertical profile analysis ( where values z>1200m would come from pure ZC), but since we are cutting of our analysis at ~1000m depth then that should not be a problem.

One thing to think about it tho is whether having these deep ZC-driven transports would affect the GMM classification ( probably not much? - @taimoorsohail )

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

from asc_and_heat_transport.

adele-morrison avatar adele-morrison commented on September 16, 2024

Looking at the unbinned plot of CSHT above, it has a much larger range of max depths than the binned. I think it would still be good to test the normalisation, but we definitely want to use the max depths from the unbinned data to do that. The binning process doesn't change the depth of the CSHT values, it just possibly adds in deeper values from the ZC terms. So perhaps we could test throwing out any ZC data deeper than the max depth in the unbinned CSHT and normalising what's left that's shallower than the max depth of the unbinned CSHT?

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

OK - that sounds like a good plan. @willaguiar do you have the path to the unbinned CSHT and U_along (which you plotted above)? I will try to do the normalisation with the unbinned CSHT+ZC data, throwing out the values of ZC that are deeper than the max depth of CSHT at each longitude.

Just confirming - does this mean the daily and monthly analyses should be done with unbinned data rather than the binned data? Shifting from binned to unbinned data (even if we cut off the correlation at 1000m, removing the influence of the deep ZC values) will have an impact on the correlations, right?

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

One thing to think about it tho is whether having these deep ZC-driven transports would affect the GMM classification ( probably not much? - @taimoorsohail )

I classified with GMM using only the binned, monthly U_along values, so CSHT doesn't affect my classification at all.

from asc_and_heat_transport.

willaguiar avatar willaguiar commented on September 16, 2024

I'm not sure I understand completely - is the idea to rerun the normalization + GMM with the unbinned data? the only problem is that the ZC is calculated in the edges of the bins, and therefore only exist in the binned data points. So Im not sure how would be possible to filter the ZC to data points where the unbinned CSHT exists.

In any case, here it goes the dirs for the unbinned data:

unbinned ASC speed: /g/data/v45/wf4500/ASC_project_files/ASC_speed/OM2_IAF/*
CSHT should be the same files, but var: unbinned_heat_transp_across_contour

from asc_and_heat_transport.

adele-morrison avatar adele-morrison commented on September 16, 2024

Hmm, yeah, ok. What about finding the max depth for normalisation from the unbinned data in each bin? But then normalising the binned data. Could either find the mean isobath depth or max isobath depth in each bin?

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

But then we'd have a bunch of Nans at the bottom of the normalised profiles, which correspond to the deeper grid cells in the unbinned data that don't have any data in the binned array? If we are normalising the binned data at the end of the day, I don't see how incorporating the max depths from the unbinned CSHT will affect our result, other than adding a bunch of NaNs at the bottom of every normalised profile... maybe I'm misunderstanding...?

from asc_and_heat_transport.

adele-morrison avatar adele-morrison commented on September 16, 2024

I think we'd have to use the max isobath depth in each bin, then any data beneath that comes from the ZC and we just throw that out when normalising.

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

Yes let's chat over Zoom.

from asc_and_heat_transport.

taimoorsohail avatar taimoorsohail commented on September 16, 2024

OK Adele and I just Zoomed about this. It seems there are two steps we need to accomplish.

  1. The binning process combines a series of adjacent, shallow CSHT profiles (see around -150 in the unbinned data). In the process of this binning, it may combine only one or two data points at the very bottom, adding noise to the solution. We need to try to avoid this by reducing the thickness of the bins in the longitude binning. However, we are concerned this will add noise, so we need to test how much of a difference this will make to the correlations. I will make an issue about this now.

  2. If we do reduce our bin size without major impacts on our correlations, I will then normalise the newly binned CSHT+ZC and U_along profiles, taking care to mask out the depths where CSHT=0.

This will feed into the monthly analysis by @ongqingyee, the coarsening work by @fabiobdias and the daily analysis by @willaguiar [assuming this is all done using the binned data...?].

from asc_and_heat_transport.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.