-
Notifications
You must be signed in to change notification settings - Fork 5
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
soil profile (Aida's work) and evaluation metrics #199
Conversation
soil profile (Aida's work) and evaluation metrics |
@@ -250,7 +250,7 @@ class RVI(RV): | |||
# come after `:SoilModel` | |||
_post_tmpl = """ | |||
:EvaluationMetrics {evaluation_metrics} | |||
{evaluation_periods} | |||
:EvaluationPeriod {evaluation_periods} |
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.
Unless there is a problem with the original formulation, this should not be changed.
This is the definition of the EvaluationPeriod command:
@dataclass
class EvaluationPeriod(RavenCommand):
""":EvaluationPeriod [period_name] [start yyyy-mm-dd] [end yyyy-mm-dd]"""
name: str
start: dt.date
end: dt.date
template = ":EvaluationPeriod {name} {start} {end}"
def to_rv(self):
return self.template.format(**asdict(self))
In practice, use something like (untested):
model.config.rvt.evaluation_periods = [EvaluationPeriod('wet', dt,date(1990, 1, 1), dt.date(2000, 1, 1))]
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.
@huard @Zeitsperre : Just to be more specific: the original formulation doesn't write the "Evaluation Period" command in the .rvi file, and therefore, the specified evaluation period is not considered in the simulation. The ":EvaluationPeriod {evaluation_periods}" seems to activate this command.
This PR is about the evaluation period and not metrics (sorry for my mistake!)
Thanks
Mohammad
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.
What do you mean by "original formulation" ?
RavenPy/ravenpy/config/commands.py
Line 80 in 427f7ca
template = ":EvaluationPeriod {name} {start} {end}" |
If there's a but with the EvaluationPeriod configuration, let's fix it in another PR.
@Zeitsperre Seems to be a problem with the netcdf build. No objection pulling 3.7 from the suite if that simplifies things. |
I believe it's this issue here: Unidata/netcdf4-python#1179. The wheel is bad on PyPI. I can add the fix for it in here at some point. |
@huard Python3.7 is rapidly approaching end of life, so let's do that and see if the issue stems from there. I'm going to drop it in another PR. |
Addition of two new soil profiles (Aida's work) and activation of evaluation period command.