Skip to content
Snippets Groups Projects
Forked from David / aos_maap_dps
7 commits ahead of the upstream repository.
run.sh 1012 B
#!/bin/bash

set -euo pipefail

readarray -d " " -t credentials <<<"$(
    conda run --no-capture-output --name mytobac python -c '
from maap.maap import MAAP
maap = MAAP()
username = maap.secrets.get_secret("EARTHDATA_USERNAME")
password = maap.secrets.get_secret("EARTHDATA_PASSWORD")
print(username, password)
'
)"

EARTHDATA_USERNAME=$(echo -e "${credentials[0]}" | tr -d '[:space:]')
EARTHDATA_PASSWORD=$(echo -e "${credentials[1]}" | tr -d '[:space:]')
export EARTHDATA_USERNAME
export EARTHDATA_PASSWORD

# All of the scripts below will use AOS_WORKING_DIR as the root output directory.
AOS_WORKING_DIR="${PWD}/output"
export AOS_WORKING_DIR

analysis_date=$1

conda run --no-capture-output --name mytobac python /root/aos_test/src/acquire_and_convert_calipso.py "${analysis_date}"
conda run --no-capture-output --name mytobac python /root/aos_test/src/acquire_goes.py "${analysis_date}"
conda run --no-capture-output --name mytobac python /root/aos_test/src/process_object_tracking.py "${analysis_date}"