Skip to content

Fix waterRegimeCode group_9 check comparing against ' z' (leading space)#11

Open
mklarmann wants to merge 1 commit into
agroscope-ch:mainfrom
mklarmann:fix/waterregime-z-leading-space
Open

Fix waterRegimeCode group_9 check comparing against ' z' (leading space)#11
mklarmann wants to merge 1 commit into
agroscope-ch:mainfrom
mklarmann:fix/waterregime-z-leading-space

Conversation

@mklarmann

Copy link
Copy Markdown

group_9 maps to ['z'], so watRegSel[0] == 'z', but the special-case compared against ' z' (leading space) and was never true. As a result group_9 soils fell through to the bound-interval branch, where bound.get('z') is None and searchintervals(None, ...) raises. This removes the leading space so group_9 is handled.

Fixes #6

group_9 maps to ['z'], so watRegSel[0] == 'z', but the special-case compared
against ' z' (leading space) and was never true. As a result group_9 soils fell
through to the bound-interval branch, where bound.get('z') is None and
searchintervals(None, ...) raises. Remove the leading space so group_9 is handled.

Fixes agroscope-ch#6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

waterRegimeCode special case for code 'z' compares against ' z' (leading space) — dead branch, ValueError for group_9 soils (SALCAphosphor.py:105)

1 participant