Skip to content

Commit

Permalink
Adapt PLUGIN_HOME paths
Browse files Browse the repository at this point in the history
  • Loading branch information
trygveasp committed Oct 23, 2024
1 parent 5f5206f commit aa2c649
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion surfexp/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,10 @@ def pysfxexp(argv=None):
]
argv += args
main(argv=argv)
plugin_home = f"{surfexp.__path__[0]}/../"
with open(tmp_output, mode="r", encoding="utf8") as fhandler_in:
with open(output, mode="w", encoding="utf8") as fhandler_out:
for line in fhandler_in.readlines():
line = line.replace("@PLUGIN_HOME@", os.getcwd())
line = line.replace("@PLUGIN_HOME@", plugin_home)
fhandler_out.write(line)
os.remove(tmp_output)
4 changes: 2 additions & 2 deletions surfexp/data/surfexp.toml
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@
extrarch_dir = "@casedir@/archive/extract/"
forcing_dir = "@casedir@/forcing/@YYYY@@MM@@DD@@HH@/"
obs_dir = "@casedir@/archive/observations/@YYYY@/@MM@/@DD@/@HH@/"
namelist_defs = "@PLUGIN_HOME@/data/config/nam/surfex_namelists.yml"
binary_input_files = "@PLUGIN_HOME@/data/config/input/binary_input_data.json"
namelist_defs = "@PLUGIN_HOME@/surfex/data/config/nam/surfex_namelists.yml"
binary_input_files = "@PLUGIN_HOME@/surfex/data/config/input/binary_input_data.json"
bindir = "@casedir@/offline/exe"

#####################################################################################################
Expand Down

0 comments on commit aa2c649

Please sign in to comment.