From dcc36872cd229e123f8c7b9ad283b5c782bca502 Mon Sep 17 00:00:00 2001 From: Eirik Rolland Enger Date: Tue, 21 May 2024 21:52:59 +0200 Subject: [PATCH] fix(run-ncl): use correct python exec in shell script (#306) --- src/volcano_cooking/create_cesm_frc.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/volcano_cooking/create_cesm_frc.sh b/src/volcano_cooking/create_cesm_frc.sh index af7fcc7..5b446d6 100644 --- a/src/volcano_cooking/create_cesm_frc.sh +++ b/src/volcano_cooking/create_cesm_frc.sh @@ -51,12 +51,12 @@ if ! [ -e "$NCL_DIR/$NCL_SCRIPT" ]; then fi if ! [ -e "$COORDS1DEG" ] && [ "$RES" = "1deg" ]; then echo "Cannot find 1deg coordinate file." - python -c "from volcano_cooking.__main__ import get_forcing_file;get_forcing_file('$COORDS1DEG_FILE', url='$COORDS_REMOTE$COORDS1DEG_FILE', not_forcing=True)" + "$PYTHON_EXEC" -c "from volcano_cooking.__main__ import get_forcing_file;get_forcing_file('$COORDS1DEG_FILE', url='$COORDS_REMOTE$COORDS1DEG_FILE', not_forcing=True)" [ -e "$COORDS1DEG" ] || exit 1 fi if ! [ -e "$COORDS2DEG" ] && [ "$RES" = "2deg" ]; then echo "Cannot find 2deg coordinate file." - python -c "from volcano_cooking.__main__ import get_forcing_file;get_forcing_file('$COORDS2DEG_FILE', url='$COORDS_REMOTE$COORDS2DEG_FILE', not_forcing=True)" + "$PYTHON_EXEC" -c "from volcano_cooking.__main__ import get_forcing_file;get_forcing_file('$COORDS2DEG_FILE', url='$COORDS_REMOTE$COORDS2DEG_FILE', not_forcing=True)" [ -e "$COORDS2DEG" ] || exit 1 fi if ! type "ncl" >/dev/null; then @@ -102,7 +102,7 @@ echo "Fixing the attributes of the altitude_int coordinate..." XRMSG="\n$BOLD${RED}Cannot import xarray.$NORM Activate the environment where you installed the project and re-run, or run manually with a python interpreter containing xarray as: - $ echo $new_file | python src/volcano_cooking/modules/create/easy_fix.py + $ echo $new_file | $PYTHON_EXEC src/volcano_cooking/modules/create/easy_fix.py Please also make sure that the final step of making it cdf5 compatible is done: