@@ -31,21 +31,44 @@ def chlorophyll_quantiles():
3131 concentration in open waters, which could be artifacts of
3232 undetected clouds.
3333 """
34+ trn = Period (2016 , 2019 ).slice (cube .chl )
35+ val = Period (2020 , 2020 ).slice (cube .chl )
36+
3437 ScenePlot ().plot (
35- chl_q_lo ,
36- title = "Observations 2016 - 2020 " ,
37- fn = "fig01 " ,
38- cbar_label = r"quantile $0.01 $ of chlorophyll concentration (mg m$^{-3}$)" ,
38+ trn . quantile ( 0.025 , dim = DID_TIM ) ,
39+ title = "Observations 2016 - 2019 " ,
40+ fn = "fig01a " ,
41+ cbar_label = r"percentile $2.5 $ of chlorophyll concentration (mg m$^{-3}$)" ,
3942 norm = plc .LogNorm (),
4043 xlocs = (1.0 , 2.5 , 4.0 , 5.5 , 7.0 , 8.5 , 10.0 ),
4144 vmin = 0.1 ,
4245 vmax = 100.0 ,
4346 ).clear ()
4447 ScenePlot ().plot (
45- chl_q_hi ,
46- title = "Observations 2016 - 2020" ,
47- fn = "fig02" ,
48- cbar_label = r"quantile $0.99$ of chlorophyll concentration (mg m$^{-3}$)" ,
48+ val .quantile (0.025 , dim = DID_TIM ),
49+ title = "Observations 2020" ,
50+ fn = "fig01b" ,
51+ cbar_label = r"percentile $2.5$ of chlorophyll concentration (mg m$^{-3}$)" ,
52+ norm = plc .LogNorm (),
53+ xlocs = (1.0 , 2.5 , 4.0 , 5.5 , 7.0 , 8.5 , 10.0 ),
54+ vmin = 0.1 ,
55+ vmax = 100.0 ,
56+ ).clear ()
57+ ScenePlot ().plot (
58+ trn .quantile (0.975 , dim = DID_TIM ),
59+ title = "Observations 2016 - 2019" ,
60+ fn = "fig02a" ,
61+ cbar_label = r"percentile $97.5$ of chlorophyll concentration (mg m$^{-3}$)" ,
62+ norm = plc .LogNorm (),
63+ xlocs = (1.0 , 2.5 , 4.0 , 5.5 , 7.0 , 8.5 , 10.0 ),
64+ vmin = 0.1 ,
65+ vmax = 100.0 ,
66+ ).clear ()
67+ ScenePlot ().plot (
68+ val .quantile (0.975 , dim = DID_TIM ),
69+ title = "Observations 2020" ,
70+ fn = "fig02b" ,
71+ cbar_label = r"percentile $97.5$ of chlorophyll concentration (mg m$^{-3}$)" ,
4972 norm = plc .LogNorm (),
5073 xlocs = (1.0 , 2.5 , 4.0 , 5.5 , 7.0 , 8.5 , 10.0 ),
5174 vmin = 0.1 ,
@@ -339,8 +362,8 @@ def examples_of_statistical_correlations():
339362 args = parser .parse_args ()
340363 reader = ReaderFactory .create_reader (args .aws )
341364 cube = reader .read (args .cube_id , depth_level = 3.0 , unify = True )
342- chl_q_lo = cube .chl .quantile (0.005 , dim = DID_TIM ).compute ()
343- chl_q_hi = cube .chl .quantile (0.995 , dim = DID_TIM ).compute ()
365+ chl_q_lo = cube .chl .quantile (0.025 , dim = DID_TIM ).compute ()
366+ chl_q_hi = cube .chl .quantile (0.975 , dim = DID_TIM ).compute ()
344367
345368 chlorophyll_quantiles ()
346369
0 commit comments