Hi all,
Prompted to post this in response to an earlier email. Apologies if I’ve already done it (couldn’t see it on the list), and I hope it’s useful to some…..
A fairly recent paper in BAMS by Daniel Wilks (
dx.doi.org/10.1175/BAMS-D-15-00267.1) talked about indicating significance on contour plots. Many people (me included!) have indicated
this significance by masking based on p values of a given grid square (e.g. let signif = if pval le 0.05 then 1). But this is not right on a contour plot - since there are lots of grid squares, there are many chances for the null hypothesis to be falsely rejected.
Wilks’s method is to determine a critical p value that can be applied to a grid square, which gives the overall desired global significance (e.g. p < 0.05). To do this, you need an array of p-values (for all grid points), which are then arrange
in increasing size (see the BAMS paper for more information).
The attached ferret scripts calculate a critical p value for X-Y and Y-Z data (other combinations can be based on them). Simply pass the array of p values and the desired overall global p value (default is 0.05), and the script returns the critical
p value. You can then create a mask similarly as before:
let signif = if pval le `pFDR` then 1
! FDR = False Discovery Rate
Two tailed or one tailed significance is determined when you calculate the p-values.
The one snag in all this is that I don’t think ferret can return p values. As with many more detailed things, I use IDL to calculate p values, correct trend errors for autocorrelation etc, and then save to netcdf before plotting
in ferret. I guess there might be a pyferret solution too???
Cheers,
Paul