diff --git a/algorithm_config.yaml b/algorithm_config.yaml new file mode 100644 index 0000000000000000000000000000000000000000..9030d55dd8ed0ae5a3e96264f605e376b29f7c6b --- /dev/null +++ b/algorithm_config.yaml @@ -0,0 +1,17 @@ +algorithm_description: Run AOS Tracking paper plots on DPS +algorithm_name: aos_maap_dps +algorithm_version: main +build_command: '' +disk_space: 20GB +docker_container_url: mas.maap-project.org/david.m.giles/aos_test/aos_dps:develop +inputs: + config: [] + file: [] + positional: + - default: '' + description: '' + name: analysis_date + required: false +queue: maap-dps-sandbox +repository_url: https://repo.maap-project.org/sshah/aos_maap_dps.git +run_command: aos_maap_dps/run.sh \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100644 index 0000000000000000000000000000000000000000..55e24c5e048263f6290c27920e25fd02fa1ea148 --- /dev/null +++ b/build.sh @@ -0,0 +1,8 @@ +#!/bin/bash +set -euo pipefail + +# Install maap-py so we can use MAAP Secrets in run.sh +conda run --no-capture-output --name mytobac python -m pip install maap-py + +mkdir -p "${HOME}/local/bin/" +wget https://www.hdfeos.org/software/h4cflib/bin/linux/v1.4/CentOS7/h4tonccf_nc4 -O "${HOME}/local/bin/h4tonccr_nc4" diff --git a/run.sh b/run.sh new file mode 100644 index 0000000000000000000000000000000000000000..2740ed73365d06719d92155c008d5b0d993c8811 --- /dev/null +++ b/run.sh @@ -0,0 +1,28 @@ +#!/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}"