Filters
This module contains the functions associated with filters needed for numerical stability.
- SWAMPE.filters.diffusion(Ximn, sigma)
Applies the diffusion filter described in Gelb and Gleeson (eq. 12).
- Parameters:
Ximn (list) – the spectral coefficient data to be filtered
sigma (float) – the hyperviscosity coefficient
- Return newXimn:
filtered spectral coefficient
- Return type:
array of float
- SWAMPE.filters.modal_splitting(Xidataslice, alpha)
Applies the modal splitting filter from Hack and Jacob (1992).
- Parameters:
Xidata (list) – data array to be filtered
alpha (float) – filter coefficient
- Return newxi:
filtered data slice
- Return type:
array of float
- SWAMPE.filters.sigma(M, N, K4, a, dt)
Computes the coefficient for the fourth degree diffusion filter described in Gelb and Gleeson (eq. 12) for vorticity and divergence.
Parameters
- param M:
spectral dimension
- type M:
int
- param N:
highest degree of associated Legendre polynomials
- type N:
int
- param K4:
hyperviscosity coefficient
- type K4:
float
- param a:
planetary radius, m
- type a:
float
- param dt:
time step,s
- type dt:
float
Returns
- return sigma:
coefficient for the diffusion filter for geopotential
- rtype:
array of float
- SWAMPE.filters.sigma6(M, N, K4, a, dt)
Computes the coefficient for the sixth degree diffusion filter for vorticity and divergence.
- Parameters:
M (int) – spectral dimension
N (int) – highest degree of associated Legendre polynomials
K4 (float64) – hyperviscosity coefficient
a (float64) – planetary radius, m
dt (float64) – time step,s
- Return sigma:
coefficient for the diffusion filter for geopotential
- Return type:
array of float64
- SWAMPE.filters.sigma6Phi(M, N, K4, a, dt)
Computes the coefficient for the fourth degree diffusion Filter described in Gelb and Gleeson (eq. 12) for geopotential.
- Parameters:
M (int) – spectral dimension
N (int) – highest degree of associated Legendre polynomials
K4 (float) – hyperviscosity coefficient
a (float) – planetary radius, m
dt (float) – time step,s
- Return sigma:
coefficient for the diffusion filter for geopotential
- Return type:
array of float
- SWAMPE.filters.sigmaPhi(M, N, K4, a, dt)
Computes the coefficient for the fourth degree diffusion Filter described in Gelb and Gleeson (eq. 12) for geopotential.
- Parameters:
M (int) – spectral dimension
N (int) – highest degree of associated Legendre polynomials
K4 (float) – hyperviscosity coefficient
a (float) – planetary radius, m
dt (float) – time step,s
- Return sigma:
coefficient for the diffusion filter for geopotential
- Return type:
array of float