Florian Mintgen Posted July 26, 2022 Posted July 26, 2022 Hi WAsP team, First of all thank you for providing these tools. I think the windkit conversion from RSF files contains a bug: When it tries to infer the number of sectors in the source file (in _infer_resource_file_nsec), the lines are split and counted: return (len(line.split()) - 9) // 3 However, this doesn't seem to account for occasions where some of the columns in the RSF file adhere to the column width specs, but don't have a space in between, like here: Point 726452.0 5781855.8 130.5149.0 9.54 2.244 633.900 12 78 116 235 24 77 207 35 72 246 99 83 278 92 80 260 36 77 244 51 77 232 93 82 238 124 87 240 140 101 247 110 115 263 118 122 272 Point 726452.0 5781880.8 130.8149.0 9.54 2.244 633.700 12 78 116 235 24 77 207 35 72 246 99 83 278 92 80 260 36 77 244 51 77 232 93 82 238 124 87 240 140 101 247 110 115 263 118 122 272 It can also be problematic when the text string in the first ten columns is an empty string. Is there a reason not to read the number of sectors from columns 70-72? Cheers, Florian
Neil Davis Posted July 27, 2022 Posted July 27, 2022 Thanks for the bug report. I have forwarded it to our team, and hopefully we will have a fix out before too long.
Florian Mintgen Posted July 27, 2022 Author Posted July 27, 2022 (edited) Thanks Neil. Another thing I came across is that when I change the second line in the RSF such that _infer_resource_file_nsec results in 12 sectors, the site object ends up having 13 sectors now, containing both 0.0 and 360.0 deg. Is that the way it's supposed to be, and handled later down the line, or could that be another bug? xarray.Dataset Dimensions: (h: 1, wd: 13, ws: 23, x: 1071, y: 886) Coordinates: Name (x, y, h) object ... wd (wd) float64 0.0 30.0 60.0 ... 300.0 330.0 360.0 Edited July 27, 2022 by Florian Mintgen Small typo
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now