Skip to content

Commit

Permalink
fix(run-ncl): use correct python exec in shell script (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
engeir authored May 21, 2024
1 parent be41a92 commit dcc3687
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/volcano_cooking/create_cesm_frc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit dcc3687

Please sign in to comment.