MESMER-group / mesmer

spatially-resolved ESM-specific multi-scenario initial-condition ensemble emulator
https://mesmer-emulator.readthedocs.io/en/latest/
GNU General Public License v3.0
22 stars 17 forks source link

dedicated functions to remove and add annual mean? #500

Open mathause opened 3 weeks ago

mathause commented 3 weeks ago

Going through the MESMER-M example notebook (#491) I found it non-obvious mesmer.stats.fit_harmonic_model also removes the annual mean from the monthly data. Now that this is no longer estimated - should we add dedicated functions to add/ remove the annual mean?

veni-vidi-vici-dormivi commented 3 weeks ago

I thought about this too but in the paper the term harmonic model refers to the combination of the linear regression with yearly temperature and the fourier series for the seasonal cycle. So I did not want to divide it up in the main code. We could make fit_harmonic_model call the linear regression and the fourier series separately but as we don't actually do the linear regression this doesn't make much sense.

Of course going forward we could drop the name harmonic model and just have a Fourier series around the yearly temperature but what I wrote above is the reason why its not already like that.