Thanks @CallumJShakespeare for sharing your scripts. @minghangli-uni has converted topo_variance_calculation_for_sharing.m to python in ACCESS-NRI/om3-scripts#105 and in the process we've spotted a few issues you may wish to fix in your code.
In order of increasing triviality:
-
normalisation is incorrect here and here if depth is masked (ie land) anywhere in the polar patch. This will underestimate the mean depth of the unmasked cells, producing incorrect variance as discussed here.
-
use r=linspace(-d,d,2*nmodes); here which will correctly include the data from the centremost grid disc as discussed here
-
sidereal day should be used here (not that it makes much difference)
Thanks @CallumJShakespeare for sharing your scripts. @minghangli-uni has converted
topo_variance_calculation_for_sharing.mto python in ACCESS-NRI/om3-scripts#105 and in the process we've spotted a few issues you may wish to fix in your code.In order of increasing triviality:
normalisation is incorrect here and here if depth is masked (ie land) anywhere in the polar patch. This will underestimate the mean depth of the unmasked cells, producing incorrect variance as discussed here.
use
r=linspace(-d,d,2*nmodes);here which will correctly include the data from the centremost grid disc as discussed heresidereal day should be used here (not that it makes much difference)