Comments (10)
Hi Fabio
Doesn't np.arange skips the last instance of the count? perhaps the second argument of the np.arange should be something like u_along_da_seasons_masked.lon[-1]+(lon_bin/2)
from asc_and_heat_transport.
Hi! Even tho the midpoints are 0.25deg apart, the first binning process have a bin width of 3 degs. so -278.5 mid_point covers [-280 -277]. So the westernmost corner should be covered.....
on another note..... Im not sure tho why the last bin ends on 78.25 instead of 78.5 tho, ... let me check and return the answer
from asc_and_heat_transport.
from asc_and_heat_transport.
I see - I'm happy to add the halos, or with the idea of changing the weight on the edges!
Although I'm not really sure I understand the issue... if the 20deg lon_bins are defined as in:
for a lon_mid -270, the bin would cover [-280 to -260], wouldn't they have the same amount of points since the edge of the bins are set to the edge of the grid? or am I missing something?
from asc_and_heat_transport.
from asc_and_heat_transport.
The 20deg bins weighting assumes a constant number of points per bins (80 in this case). I just checked the counting and it seems this is true for all the bins. Here is the the counting of number of gridpoints per bin (row) per regime (columns):
array([[80., 0., 0.],
[80., 0., 0.],
[39., 0., 41.],
[39., 0., 41.],
[30., 8., 42.],
[68., 0., 12.],
[80., 0., 0.],
[80., 0., 0.],
[28., 52., 0.],
[ 3., 77., 0.],
[ 0., 80., 0.],
[ 0., 4., 76.],
[55., 0., 25.],
[80., 0., 0.],
[80., 0., 0.],
[80., 0., 0.],
[60., 0., 20.]])
However, for 20deg bins we only have 17 bins (I would expect one more, as 360/20 = 18), so I think I missed something there. It seems to me we're ignoring the last eastern bin between 61.5-80° (I'm runnning these again to double-check)...
from asc_and_heat_transport.
from asc_and_heat_transport.
Hmm... I'm not sure tbh. This is how I do the binning:
lon_bin=20 #deg
bin_edges = np.arange(u_along_da_seasons_masked.lon[0], u_along_da_seasons_masked.lon[-1], lon_bin)
print(bin_edges)
array([-278.5, -258.5, -238.5, -218.5, -198.5, -178.5, -158.5, -138.5,
-118.5, -98.5, -78.5, -58.5, -38.5, -18.5, 1.5, 21.5,
41.5, 61.5])
so there's 18 edges but only 17 bins. Then I just do
ds = u_along_da_mean_masked
u_along_da_mean_binned = ds.groupby_bins('lon', bins=bin_edges).mean()
from asc_and_heat_transport.
Ok, I think we can fix that by re-defining the bin_edges and don't limit the max longitude to lon[-1] (which is 78.25°, so it doesn't fit another 20° bin).
If we do that, the counting (for the weighting) shows that the last bin has a total 68 points ([25., 0., 43.], sfc/rev/deep regimes).
Should I proceed to generated the new statistics?
from asc_and_heat_transport.
I finally got to test two different ways to including the last bin missing on previous analyses (with 20deg bins):
-
Test 1 defines bin edges between -280 and 80. In this case, the first and last bins have less points (n=74) than the other bins (n=80), so the weights are applied accordingly (i.e., taking in account the max number of points for each bin).
-
Test 2: define bin edges between -278.5 and 81.5. Originally the last bin have less gridpoints (n=68) than all the others, but here we applied a halo in the eastern side, repeating the first 12 points on the western side.
(longitudes are updates so the groupby gets these points on the correct bin; changing from
lon =[278.5 , -278.25, -278. , -277.75, -277.5 , -277.25, -277. , -276.75, -276.5 , -276.25, -276. , -275.75]
to:
lon = [78.5 , 78.75, 79. , 79.25, 79.5 , 79.75, 80. , 80.25, 80.5 , 80.75, 81. , 81.25]).
This makes the last bin in test 2 (with edges between 61.5-81.5) to have also n=80.
Bottomline is that both tests 1 and 2 have similar results. But they decrease the high r^2 in the deep regime/monthly climatology (from ~0.8 to ~0.6).
I'm posting below the statistics for the 3 tests, where test 3 is the original one (which is missing the last bin, and is what we used in this comparison).
I've generated the new netcdf files with these statistics here:
/g/data/hh5/tmp/access-om/fbd581/ASC_project/statisctic_lonbin/
from asc_and_heat_transport.
Related Issues (20)
- Fix zonal convergence of heat transport around peninsula [ Task 5] HOT 3
- Cross-slope heat transport calculation method HOT 6
- Cross-slope heat transport using different methods to extract an isobath HOT 6
- Poster for IUGG
- Identifying ASC Regimes and variability HOT 45
- Zonal convergence bias in vertical profiles of CSHT HOT 6
- Analysis of individual sub-regimes HOT 6
- Alternative plots visualizations HOT 6
- Figure discussion for paper HOT 4
- Recreate figures with time-mean regime masks HOT 3
- Statistics using longitude bins before averaging over distinct ASC regimes HOT 29
- Depth normalisation HOT 21
- Reduce bin size when longitude-binning CSHT and U_along HOT 4
- Presenting these results at conferences HOT 11
- Choice of vertical coordinate / depth range of importance HOT 6
- New visualisation of cross-slope properties in Antarctic margins? HOT 7
- Bining of ASC speed into sigma increase maximums HOT 4
- Defining sigma levels according to water mass properties HOT 18
- Explaining spatial variation of correlations in density space HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from asc_and_heat_transport.