WorldDev.2026.1073278 / code /lib /optional /runP_GrabData_EE.sh
cjerzak's picture
Upload 24 files
748dd7d verified
#!/usr/bin/env bash
set -ex
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)"
cd "${ROOT_DIR}"
mkdir -p ./logs
# make sure your Python scripts are executable
chmod u+r+x ./code/lib/optional/get_images/GetImageRun_3y.py ./code/lib/optional/get_images/GetImageRun_annual.py
# show your resources
ulimit -a
parallel --number-of-cpus
parallel --number-of-cores
parallel --number-of-threads
parallel --number-of-sockets
# decide how many parallel jobs to run
export nParallelJobs=1
# —————————————————————————————————————————
# 1) run 3-year image export
# script: Analysis/GetImages/GetImageRun_3y.py
# —————————————————————————————————————————
if false; then
nohup parallel --jobs ${nParallelJobs} \
--joblog ./logs/GetImageRun_3y_log.log \
'python3 ./code/lib/optional/get_images/GetImageRun_3y.py {}' ::: 1 \
> ./logs/GetImagesRun_3y_out.out \
2> ./logs/GetImagesRun_3y_err.err &
fi
# —————————————————————————————————————————
# 2) run annual image export
# script: Analysis/GetImages/GetImageRun_annual.py
# —————————————————————————————————————————
if true; then
nohup parallel --jobs ${nParallelJobs} \
--joblog ./logs/GetImageRun_annual_log.log \
'python3 ./code/lib/optional/get_images/GetImageRun_annual.py {}' ::: 1 \
> ./logs/GetImagesRun_annual_out.out \
2> ./logs/GetImagesRun_annual_err.err &
fi