#!/usr/bin/env bash set -euo pipefail # ----------------------------------------------------------------------------- # Operational parameters: only edit/replace this block from the outer workflow. # ----------------------------------------------------------------------------- Yr_Ope=${1} Mn_Ope=${2} Dy_Ope=${3} Dir_Inp="/home/tanpv/Progs/CLI/Dr/outputs/Ope/${Yr_Ope}/${Mn_Ope}/${Dy_Ope}/" mkdir -p /home/tanpv/Progs/CLI/dro/PDF/${Yr_Ope}${Mn_Ope}${Dy_Ope} Dat_out="/home/tanpv/Progs/CLI/dro/PDF/${Yr_Ope}${Mn_Ope}${Dy_Ope}/" # Set this to the actual location of the Vietnam7 shapefile. Shape_VN7="/home/tanpv/GrADS_SCR/VN_SubRegs1/Vietnam7.shp" # Location of the Python program. If both files are in the same directory, # this resolves automatically. SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" PY_SCRIPT="${SCRIPT_DIR}/pl_pr_t2_grfill.py" #pl_pr_t2.py" Inpfile="${Dir_Inp%/}/Ope_Pr_T2_and_Ano.nc" if [[ -e ${Inpfile} ]]; then python3 "${PY_SCRIPT}" \ --year "${Yr_Ope}" \ --month "$((10#${Mn_Ope}))" \ --day "$((10#${Dy_Ope}))" \ --input "${Inpfile}" \ --output-prefix "${Dat_out}" \ --shape "${Shape_VN7}" \ --nlead 6 \ --pr-ano-scale 1 else echo "${Inpfile} does not exist" fi