@@ -32,6 +32,12 @@ def cum_distance_by_track(distance, track):
32
32
c = TrackEddiesObservations .load_file (
33
33
py_eddy_tracker_sample .get_path ("eddies_med_adt_allsat_dt2018/Cyclonic.zarr" )
34
34
)
35
+
36
+ a .median_filter (1 , 'time' , 'lon' ).loess_filter (5 , 'time' , 'lon' )
37
+ a .median_filter (1 , 'time' , 'lat' ).loess_filter (5 , 'time' , 'lat' )
38
+ c .median_filter (1 , 'time' , 'lon' ).loess_filter (5 , 'time' , 'lon' )
39
+ c .median_filter (1 , 'time' , 'lat' ).loess_filter (5 , 'time' , 'lat' )
40
+
35
41
d_a = distance (a .longitude [:- 1 ], a .latitude [:- 1 ], a .longitude [1 :], a .latitude [1 :])
36
42
d_c = distance (c .longitude [:- 1 ], c .latitude [:- 1 ], c .longitude [1 :], c .latitude [1 :])
37
43
d_a = cum_distance_by_track (d_a , a ["track" ]) / 1000.
@@ -45,20 +51,20 @@ def cum_distance_by_track(distance, track):
45
51
ax_ratio_cum_propagation = fig .add_axes ([0.55 , 0.05 , 0.4 , 0.4 ])
46
52
47
53
48
- bins = arange (0 , 1500 , 25 )
54
+ bins = arange (0 , 1500 , 10 )
49
55
cum_a , bins , _ = ax_cum_propagation .hist (
50
- d_a , histtype = "step" , bins = bins , label = "Anticyclonic" , color = "b "
56
+ d_a , histtype = "step" , bins = bins , label = "Anticyclonic" , color = "r "
51
57
)
52
58
cum_c , bins , _ = ax_cum_propagation .hist (
53
- d_c , histtype = "step" , bins = bins , label = "Cyclonic" , color = "r "
59
+ d_c , histtype = "step" , bins = bins , label = "Cyclonic" , color = "b "
54
60
)
55
61
56
62
x = (bins [1 :] + bins [:- 1 ]) / 2.0
57
63
ax_ratio_cum_propagation .plot (x , cum_c / cum_a )
58
64
59
65
nb_a , nb_c = cum_a [:- 1 ] - cum_a [1 :], cum_c [:- 1 ] - cum_c [1 :]
60
- ax_propagation .plot (x [1 :], nb_a , label = "Anticyclonic" , color = "b " )
61
- ax_propagation .plot (x [1 :], nb_c , label = "Cyclonic" , color = "r " )
66
+ ax_propagation .plot (x [1 :], nb_a , label = "Anticyclonic" , color = "r " )
67
+ ax_propagation .plot (x [1 :], nb_c , label = "Cyclonic" , color = "b " )
62
68
63
69
ax_ratio_propagation .plot (x [1 :], nb_c / nb_a )
64
70
0 commit comments