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

regrid_time does not have promised functionality #2176

Closed
rebeccaherman1 opened this issue Aug 22, 2023 · 1 comment · Fixed by #2311
Closed

regrid_time does not have promised functionality #2176

rebeccaherman1 opened this issue Aug 22, 2023 · 1 comment · Fixed by #2311

Comments

@rebeccaherman1
Copy link
Contributor

The stated goal of regrid_time is 'Align time axis for cubes so they can be subtracted', but it does not accomplish this goal. It takes two inputs: a cube, and a frequency. Since it does not accept two cubes, I imagine it's meant to simply remove evidence of time information that could conflict between cubes, specified by frequency.

I would like to subtract the value at one month from another. To accomplish this, I call extract_month using two different months. Then, I understand I should apply regrid_time to each cube, and I imagine the correct choice of frequency is yr, though it's not perfectly clear from the documentation. When I follow this procedure, I am still unable to subtract one from the other, getting the error Coordinate 'month_number' has different points for the LHS cube 'surface_temperature' and RHS cube 'surface_temperature'.

Examining one cube at a time, I see that using extract_month creates an Auxiliary coordinate called month_number. No matter what frequency I use, regrid_time adds additional coordinates day_of_month and day_of_year rather than removing auxiliary coordinate month_number.

@valeriupredoi? 🙃

@bouweandela
Copy link
Member

Indeed there are opportunities for improving this preprocessor, so if you have time to work on this your contributions would be most welcome. See #2106 and #744 for related ideas.

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