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

Failing to run ExpHydro Model Tutorial #4

Closed
olivierbonte opened this issue Dec 12, 2024 · 4 comments
Closed

Failing to run ExpHydro Model Tutorial #4

olivierbonte opened this issue Dec 12, 2024 · 4 comments

Comments

@olivierbonte
Copy link

When running the tutorial as defined in https://github.com/chooron/HydroModels.jl/blob/35ff1bbd24172db898c701da079d8bbbbd9d2bc7/docs/src/tutorials/run_a_exphydro_model.md, I run into a few issues

@chooron
Copy link
Owner

chooron commented Dec 13, 2024

This is quite embarrassing. This issue is also related to the documentation synchronization problem after code updates. In v0.1.1's design, I set the input and output restrictions for components like bucket and model to be AbstractArray type (the convert_to_ntp setting was therefore removed). If you want to use NamedTuple as input like before, you can wrapper this component through NamedTupleIOAdapter.

@olivierbonte
Copy link
Author

No worries, I think these sort of issues are very normal when in early stages of package development! The updates you made to the docs in 7727d7d make things a lot clearer already :) The only mistake I can still spot now is that input is not defined from the dataframe yet for use in

result = exphydro_model(input, pas, config=(solver=solver, timeidx=ts))

This could be solved by adding

input_ntp = (lday=df[ts, "dayl(day)"], temp=df[ts, "tmean(C)"], prcp=df[ts, "prcp(mm/day)"])
input = Matrix(reduce(hcat, collect(input_ntp[[:temp, :lday, :prcp]]))')

somewhere before

@olivierbonte
Copy link
Author

See PR #6

@olivierbonte
Copy link
Author

Closed by PR #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

No branches or pull requests

2 participants