An improvement is implemented here for the Cython implementation, which goes up to lmax = 51. I used scipy.special.hermite to generate the polynomial coefficients with the following code:
import numpy as np
from scipy.special import hermite
for n in range(1, 51):
print(f"elif l == {n}:")
exp = []
for h, j in zip(list(hermite(n=n))[::2], np.arange(n+1)[::-1][::2]):
exp.append("{:.1f}*tilda_mu(theta, alpha)**{:d}".format(h, j))
print(' return ('+ ' + \n\t\t'.join(exp)+')')
With such large lmax, we can now reproduce even subtle features in GCM temperature maps.
An improvement is implemented here for the Cython implementation, which goes up to
lmax = 51
. I usedscipy.special.hermite
to generate the polynomial coefficients with the following code:With such large
lmax
, we can now reproduce even subtle features in GCM temperature maps.