Skip to content
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

Draft
wants to merge 99 commits into
base: master
Choose a base branch
from
Draft

add new infiltration methods #130

wants to merge 99 commits into from

Conversation

kavkapet
Copy link
Collaborator

Related to issues:
#27
#13

@jerabekjak
Copy link
Member

There are other than infitlration-related changes. Several exceptions were added to the code which are not related to infiltration.

Comment on lines +30 to +87
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)


Copy link
Member

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.

@jerabekjak
Copy link
Member

smoderp2d/io_functions/post_proc.py this is now in the base provider. this model is not called anywhere and may be therefore delated.

Comment on lines +42 to +44
self.infiltration = (
0.5 * self._s / math.sqrt(totalT + deltaT) + self._ks) * deltaT

Copy link
Member

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.

@jerabekjak jerabekjak marked this pull request as ready for review October 10, 2022 21:47
@jerabekjak jerabekjak marked this pull request as draft October 10, 2022 21:48
@pesekon2 pesekon2 added the enhancement New feature or request label Mar 20, 2024
@pesekon2
Copy link
Collaborator

Will be solved by @jerabekjak in June 2024 (or not).

@pesekon2 pesekon2 changed the title Infiltration tacr add new infiltration methods Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants