Skip to content

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

@Ben-Choat

Description

@Ben-Choat

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions