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

Configuration file location name is hardcoded instead of being a user input in stand alone mode #39

Open
Ben-Choat opened this issue Sep 22, 2023 · 0 comments · May be fixed by #40
Open
Assignees

Comments

@Ben-Choat
Copy link
Contributor

When in stand alone mode the configuration file is hardcoded in main.c as "./data/topmod.run". If running on several catchments this will cause issues.

Current behavior

When running in stand alone mode the configuration file must be located at ./data/topmod.run. If a configuration file is provided as input it is ignored and "Can't open control file named ./data/topmod.run" is printed out if the configuration file is not in that location.

Expected behavior

When the user compiles and runs topmodel in stand alone mode they should be able to provide a path and file name when running the executable, enabling different configuration files to be provided when more than one catchment is being ran via scipting.

Steps to replicate behavior (include URLs)

  1. Compile and run topmodel in stand alone mode without the configuration file being at ./data/topmod.run
  2. gcc -Wall ./extern/topmodel/topmodel/src/main.c
    ./extern/topmodel/topmodel/src/bmi_topmodel.c
    ./extern/topmodel/topmodel/src/topmodel.c -o
    run_topmodel_bmi -lm

./run_topmodel_bmi ./Topmodel/topmodel_cat-12.run

@Ben-Choat Ben-Choat self-assigned this Sep 22, 2023
@hellkite500 hellkite500 linked a pull request Sep 22, 2023 that will close this issue
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 a pull request may close this issue.

1 participant