Skip to content

Commit 2d0531e

Browse files
Output HDR.out/HDR.json relative to original working directory. Note that this behavior was already present when running from CLI so the new behavior is only expected to occur and have an effect when running GEOPHIRESv3.py directly from a directory other than src/geophires_x (which is probably rare and should also generally be avoided by users as best practice anyway)
1 parent 78ddb02 commit 2d0531e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/geophires_x/GEOPHIRESv3.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def main(enable_geophires_logging_config=True):
6363
supress_warnings=True)
6464
json_merged = {**json_merged, **json.loads(json_sdacgt)}
6565

66-
json_outputfile = 'HDR.json'
66+
json_outputfile = Path(original_cwd, 'HDR.json')
6767
if len(sys.argv) > 2:
6868
output_arg = str(sys.argv[2])
6969
output_arg_path = Path(output_arg)
@@ -73,7 +73,7 @@ def main(enable_geophires_logging_config=True):
7373

7474
# if the user has asked for it, copy the output file to the screen
7575
if model.outputs.printoutput:
76-
outputfile = 'HDR.out'
76+
outputfile = Path(original_cwd, 'HDR.out')
7777
if len(sys.argv) > 2:
7878
outputfile = sys.argv[2]
7979

0 commit comments

Comments
 (0)