-
Notifications
You must be signed in to change notification settings - Fork 5
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
Question: Calculations on 3hr frequency #45
Comments
Hi @emsonali, here are two points to mention, why there is no explicit treatment for 3-hourly data in the code:
If you want to calculate UTCI from 3-hourly input data just use this:
If you have any questions please don't hesitate to contact me. Cheers, |
Hi @ludwiglierhammer, thank you for the clarification. May I know what xcalc is and the appropriate way to install it? |
Hey @emsonali , i think what ludwig means here is just an abbreviation, e.g., import index_calculator as xcalc |
@larsbuntemeyer @ludwiglierhammer I managed to get index_calculator working for 3h by adding in |
😕 @emsonali: Can you please send me the ncdumps of your input and output data. |
@ludwiglierhammer attaching ncdumps from sample input and output files |
@emsonali: I think I could figure out the problem. The first step of the preprocessor is do convert the input frequency into the requested input frequency. Unfortunately, this converter converts your 3-hourly input data into daily data, since the Here you may add some adjustments to the code. Just fork the Here are some suggestions:
|
Hi @ludwiglierhammer @larsbuntemeyer I've been attempting to modify _preprocessing.py, _processing.py, _postprocessing.py, _consts.py and convert_to_frequency.json so that index_calculator is able to do the computation on 3h frequencies and output the 3h UTCI values as 5 year files. I managed to produce an output now, but the UTCI values show as nan and previously I got a memory error, because the files being written were too big. Essentially I think the issue has to do with pyhomogenize as it only handles daily data. Is there a way to bypass pyhomogenize in the code and hardcode 3h computations, and creation of the time dimensionn of the netCDF files, or do we need to edit pyhomogenize to be able to handle 3h computations? |
Hi @emsonali, the testing suite is not working anymore with your changes. Please make sure that all tests are running succesfully. Afterwards we can fix your code. pyhomogenize does not only handle daily data. I think the problem is here. It returns None for the dataset if time frequency is not 3h. We use pyhomogenize to manage the time axis. pyhomogenize is able to "work" with those frequencies . Can you please make a PR. This makes many things easier. |
Hi @ludwiglierhammer I reverted the changes made to _preprocessing.py and index_calculator is able to run on 3h frequency just with the addition I made to convert_to_frequency.json. 2 remaining issues:
|
I can have a look at your PR #46 next week. |
@ludwiglierhammer could you point me to the script(s) where the time bounds for the index calculations are set? Either in index_calculator or index_calculation. I will modify the time bounds there so I can submit smaller jobs that can run within 8h |
Is that what you are lookin for? You can simply set your left and right time bounds by calling |
Hi Ludwig,
I'd like to check if computations of climate indices on a 3hr frequency are in-built into index_calculator? If so, could you point me to the script where I can see how the 3hr computations are handled, particularly for UTCI? Thank you!
Best Regards,
Sonali
The text was updated successfully, but these errors were encountered: