-
Notifications
You must be signed in to change notification settings - Fork 8
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
Problem with forcing interpolation when tstep=resolutionfilesin #161
Comments
Thanks @RussellGl ! |
Propose @RussellGl has a go at making this fix and submitted the code back to GitHub - to start to learn about developing code with GitHub |
Sounds good! I'm merging supy code with SUEWS at the moment - some tests to be done. |
@RussellGl preferably, please set up your VScode with GitHub pull request plugin set up: https://marketplace.visualstudio.com/items?itemName=GitHub.vscode-pull-request-github |
Hi @RussellGl , the supy code has been merged into suews as one set of codebase now. When you do the fix, please follow the steps below:
Let me know if anything unclear and help is needed - I'll be available today after 3:30pm and can have a call if needed. |
Hi Ting, Okay I think it would be good to have a call in the afternoon, it is hard for me to follow. Thanks a lot |
Pushed the proposed changes to the issue161 fork. Thanks, |
Please submit a pull request - thanks. |
Hi @RussellGl I seem not to be able to find the fork you mentioned here - can you please give me a link? thanks! |
In SuPy, when the time step of the model is equal to the time resolution of the input data going into making the forcing for the model, the model interpolates the forcing data when no interpolation is required. The pieces of code which are involved in this interpolation step are in '_load.py' and in the 'resample_forcing_met' function. In this function the forcing data is shifted in such a way that when the interpolation step comes, it will interpolate between the current time and 1 timestep ahead. Since tstep and the deltat of the forcing are the same no interpolation is necessary. These interpolation functions seem to assume that 'resolutionfilesin' is larger than 'tstep' and the current method seems to work correctly when this condition is true.
A test tracking the 'Kdown' values was performed to find where incorrect interpolation originates. The line is in 'resample_forcing_met' function:
Only variables which require averaging seem to be affected by this and other instantaneous variables like 'Tair' are not affected and the forcing values are the same as the input file provided by the user.
Recommend to add a condition when tstep=resolutionfilesin to skip this interpolation section and directly make the forcing using the input file provided by the user.
The text was updated successfully, but these errors were encountered: