COSIMA / cosima-recipes

A cookbook of recipes (i.e., examples) for analysing ocean and sea ice model output
https://cosima-recipes.readthedocs.io
Apache License 2.0
44 stars 65 forks source link

Applying filtering/coarse-graining techniques on ACCESS-OM2 output #32

Open AndyHoggANU opened 4 years ago

AndyHoggANU commented 4 years ago

in the spirit of Aluie et al 2017, JPO, doi:10.1175/JPO-D-17-0100.1

josuemtzmo commented 4 years ago

Can I join this one?

aekiss commented 4 years ago

I'm interested in this one too. I did a bit of work a while ago on wavenumber spectra here. It's not the Aluie et al method but might still be useful: https://github.com/COSIMA/ACCESS-OM2-1-025-010deg-report/blob/master/figures/spectra/spectra.ipynb

One slightly awkward thing is that the spatial grid is not uniform (in metres) so I am yet to set this up to properly give spectra in units of 1/m. I think that would require interpolation to a uniformly-spaced grid (in metres, not degrees). Strictly speaking I expect this to only be valid in limited areas, ie a small enough part of the globe that a local Cartesian representation is reasonable.

navidcy commented 4 years ago

To filter output fields properly one has to convolute them using a kernel, e.g., a gaussian kernel, in physical space,

output_filtered(x, y, z) = \int output(x', y', z) * kernel(x, y, x', y') dx' dy'

We have to be careful not to introduce any inhomogeneities from this convolution. To do that, the kernel has to depend only on the geodesic distance of points (x, y) and (x', y') on the sphere.

If (x, y)=(longitude, latitude) on the sphere, then the geodesic distance is Earth_Radius*geodesic_angle, where

cos(geodesic_angle) = sin(y) * sin(y') + cos(y) * cos(y') * cos(x-x')

and kernel(x, x', y, y') = kernel(geodesic_angle).

navidcy commented 3 years ago

This could be a relevant/helpful reference. https://doi.org/10.1175/JPO-D-19-0256.1