UMEP-dev / SuPy

SUEWS that speaks Python
https://supy.readthedocs.io/
GNU General Public License v3.0
13 stars 7 forks source link

Function to convert UMEP forcing to epw #66

Closed CsillaVG closed 1 year ago

CsillaVG commented 2 years ago

Hi Ting,

It took me a while to figure out what is and how to do a PR. I really hope it goes smoothly from here on.

What I did and what is in the submitted _UMEP2epw.py function. 1) The previous two functions have been merged into one and the code cleaned up.

2) Since loading the UMEPforcing.txt file was not always straightforward, I have given two possible options. The options are not integrated into the code. One is simply commented out.

3) I have also added an extra function (patchup_epw) after supy.util.gen_epw to clean the .epw file a bit up. This second function is called in the last step (7), but can be commented out/removed---in a manner that still leaves the original convert_UMEPf2epw functional. Ideally these proposed adjustments could be introduced already as part of supy.util.gen_epw.

4) There is also a commented out example at the bottom, but a local UMEP forcing file will need to be linked in.

I hope it helps!

Regards, Csilla

PS: I am not familiar with Path, so I did a few "work arounds". The lines with the work-arounds got '# Path FIX' comment at the end.

sunt05 commented 2 years ago

@CsillaVG Good job on getting to this stage! I'll have a look soon and propose/make changes if necessary. Many thanks!

github-actions[bot] commented 1 year ago

Stale pull request message

sunt05 commented 1 year ago

Hi @NKalasa , please have a look at this PR and leave some comments if anything further to implement - just use this as a practice for GH-based collaboration/development. And feel free to let me know if we need a chat - the coming Monday works for me.

sunt05 commented 1 year ago

This is a long-awaited merge - sorry about the delay due to my various commitments from last term - now I can work a bit more on SUEWS and SuPy. And SuPy is now merged into SUEWS for more consistent development.

Thanks @CsillaVG for the contribution!