Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MESMER-M minor issue with harmonic model #589

Open
sarasita opened this issue Jan 10, 2025 · 0 comments
Open

MESMER-M minor issue with harmonic model #589

sarasita opened this issue Jan 10, 2025 · 0 comments

Comments

@sarasita
Copy link

Function fit_harmonic_model does not throw an error when calling it with predictor and target data that does not have the same spatial structure (e.g. calling it with tas_globmean as predictor). I'd suggest to add

def fit_harmonic_model(..., gridcell_dim = 'gridcell')
and

if not len(monthly_target[gridcell_dim]) == len(yearly_predictor[gridcell_dim]):
raise ValueError("Yearly predictor values and monthly target data must have the same number of gridcells")

And there is also v minor error in the function description, I think it should be:

monthly_target : xr.DataArray of shape (n_months*n_years, n_gridcells)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant