-
Notifications
You must be signed in to change notification settings - Fork 4
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
add new infiltration methods #130
base: master
Are you sure you want to change the base?
Conversation
…f from rainfall record assignment.
…iltration_tacr pull refactoring of output rasters which is still in progress
…nfiltration_tacr merge of parital ready output write refactoring
…iltration_tacr Conflicts: tests/test.ini It looks like you may be committing a merge. If this is not correct, please remove the file .git/MERGE_HEAD and try again.
There are other than infitlration-related changes. Several exceptions were added to the code which are not related to infiltration. |
def __str__(self): | ||
return repr(self.msg) | ||
|
||
|
||
class RainfallFileMissing(SmoderpError): | ||
|
||
"""Exception raised if file with rainfall record is missing | ||
|
||
Attributes: | ||
name of file which is missing | ||
""" | ||
|
||
def __init__(self, filen): | ||
self.msg = 'Missing file: ' + str(filen) + '.' | ||
|
||
def __str__(self): | ||
return repr(self.msg) | ||
|
||
|
||
class NegativeWaterLevel(SmoderpError): | ||
|
||
"""Exception raised if the water level goes to negative values. | ||
|
||
""" | ||
|
||
def __init__(self): | ||
self.msg = 'Water level reached negative value' | ||
|
||
def __str__(self): | ||
return repr(self.msg) | ||
|
||
|
||
class IncorrectInfiltrationType(SmoderpError): | ||
|
||
"""Exception raised if the water level goes to negative values. | ||
|
||
""" | ||
|
||
def __init__(self, infiltration_type): | ||
self.msg = 'Incorrect infiltration type: the infiltraion id should be in the range 1 - 4. {} was assign in the config'.format(infiltration_type) | ||
|
||
def __str__(self): | ||
return repr(self.msg) | ||
|
||
|
||
class InflowsError(SmoderpError): | ||
|
||
"""Exception raised if the inflow to cell cannot be calculated. | ||
|
||
""" | ||
|
||
def __init__(self): | ||
self.msg = 'Error in inflows definition' | ||
|
||
def __str__(self): | ||
return repr(self.msg) | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Errors related to infiltration and to water balance calculations.
smoderp2d/io_functions/post_proc.py this is now in the base provider. this model is not called anywhere and may be therefore delated. |
self.infiltration = ( | ||
0.5 * self._s / math.sqrt(totalT + deltaT) + self._ks) * deltaT | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful. This was changed in newer pull request #125.
Will be solved by @jerabekjak in June 2024 (or not). |
Related to issues:
#27
#13