Skip to content

Commit

Permalink
Fix bug in source code download
Browse files Browse the repository at this point in the history
before the fix, the adapted proffast 2.4 preprocessor would not be used of the source code was already downloaded
  • Loading branch information
dostuffthatmatters committed Oct 6, 2024
1 parent d9bf55b commit 162c8dd
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions src/retrieval/dispatching/container_factory.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,20 +273,19 @@ def init_proffast24_code(_print: Callable[[str], None]) -> None:
# DOWNLOAD PROFFAST 2.4 code if it doesn't exist yet
if os.path.exists(os.path.join(ROOT_DIR, "prf")):
_print(f"Proffast 2.4 has already been downloaded")
return

_print(f"Downloading Proffast 2.4 code")
tum_esm_utils.shell.run_shell_command(
command=f"wget --quiet {KIT_BASE_URL}/{ZIPFILE_NAME}",
working_directory=ROOT_DIR,
)
tum_esm_utils.shell.run_shell_command(
command=f"unzip -q {ZIPFILE_NAME}",
working_directory=ROOT_DIR,
)
os.remove(os.path.join(ROOT_DIR, ZIPFILE_NAME))
else:
_print(f"Downloading Proffast 2.4 code")
tum_esm_utils.shell.run_shell_command(
command=f"wget --quiet {KIT_BASE_URL}/{ZIPFILE_NAME}",
working_directory=ROOT_DIR,
)
tum_esm_utils.shell.run_shell_command(
command=f"unzip -q {ZIPFILE_NAME}",
working_directory=ROOT_DIR,
)
os.remove(os.path.join(ROOT_DIR, ZIPFILE_NAME))

# copy adapted Preprocess 6 source code
_print("Copying the adapted preprocess6.F90 source code")
ORIGINAL_SOURCE_FILE = os.path.join(
_RETRIEVAL_CODE_DIR, "proffast-2.4", "main", "prf", "source", "preprocess",
"preprocess6.F90"
Expand Down

0 comments on commit 162c8dd

Please sign in to comment.