-
Notifications
You must be signed in to change notification settings - Fork 59
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
Memory issue and additional day from make_hourly_temperature #1938
Comments
Hi @baptistehamon , Will investigate the bug now, in theory the function adds a new timestamp to do the hourly resampling but then removes the last time step again. |
@baptistehamon could you send me the dataset you are using. I can reproduce the issue with my test dataset but I suspect it has maybe to do with the hour of your daily data. I have been testing it with data that's set to midnight. |
Yes. Ok I can see it now if I move the hour to 12pm. I guess the easiest for me would be to ignore the hour of day and just set it to midnight? |
I think ignoring the time is correct! In many cases, having daily data at noon means that the data is an aggregation over the day (in opposition to an instant measurement). But in the context of As for the memory issue, @baptistehamon, the idea was indeed that the user should expect the data to inflate by a factor of 24, and so choose an appropriate chunking. |
Sorry for the late news! Thanks a lot for your help. I still have to loop over the year even with a chunk 365*24 but it's easily manageable so it's ok! |
Setup Information
Description
From this comment
Hi, I've been using the Utah chill unit model for my research but my code is a mess and time-consuming so I'm happy to see it implemented in xclim (thanks @saschahofmann for that)! I did some tests with my data today and wanted to inform you about two things I've noticed.
Memory issue
First, it's more a warning than an issue. Because chill_unit uses hourly data, some memory errors can occur using an important dataset while the computation of other indices or indicators with the same dataset (but daily resolution) is fine. This can be handled easily by iterating over the years and it's what I've done. However, I think it could be relevant to add a warning message when using make_hourly_temperature. What do you think about this?
Output bug
The second is make_hourly_temperature adds one more day to compute the hourly temperature but does not remove it after the computation, thus returning an array with a shape different to the inputs. See below for data corresponding to a complete year with a shape (time: 365, lat: 56, lon: 54) as input:
This is particularly annoying if the input data ends on the last day of the year and a resampling YS is done, creating a year at the end considering only one day.
I hope my explanations are clear enough! Thanks !
Steps To Reproduce
No response
Additional context
No response
Contribution
Code of Conduct
The text was updated successfully, but these errors were encountered: