From 140a075c1ecf4b5c7a7ff7e2e451cb0894d11de2 Mon Sep 17 00:00:00 2001 From: sharkinsspatial Date: Tue, 9 Jul 2024 10:56:10 -0600 Subject: [PATCH] Include VI manifest for LPDAAC notification. --- Dockerfile | 2 +- scripts/sentinel.sh | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3014b22..f0a01f0 100644 --- a/Dockerfile +++ b/Dockerfile @@ -112,7 +112,7 @@ RUN pip3 install click==7.1.2 RUN pip3 install rio-cogeo==1.1.10 --no-binary rasterio --user RUN pip3 install git+https://github.com/NASA-IMPACT/hls-thumbnails@v1.3 RUN pip3 install git+https://github.com/NASA-IMPACT/hls-metadata@v2.5 -RUN pip3 install git+https://github.com/NASA-IMPACT/hls-manifest@v2.0 +RUN pip3 install git+https://github.com/NASA-IMPACT/hls-manifest@v2.1 RUN pip3 install wheel RUN pip3 install git+https://github.com/NASA-IMPACT/hls-browse_imagery@v1.7 RUN pip3 install libxml2-python3 diff --git a/scripts/sentinel.sh b/scripts/sentinel.sh index 269dc91..aabe50d 100755 --- a/scripts/sentinel.sh +++ b/scripts/sentinel.sh @@ -47,6 +47,7 @@ set_output_names () { hlsversion="v2.0" day_of_year=$(get_doy "${year}" "${month}" "${day}") outputname="HLS.S30.${granulecomponents[5]}.${year}${day_of_year}${hms}.${hlsversion}" + vi_outputname="HLS-VI.S30.${granulecomponents[5]}.${year}${day_of_year}${hms}.${hlsversion}" output_hdf="${workingdir}/${outputname}.hdf" nbar_name="HLS.S30.${granulecomponents[5]}.${year}${day_of_year}.${hms}.${hlsversion}" nbar_input="${workingdir}/${nbar_name}.hdf" @@ -260,13 +261,19 @@ echo "Generating VI files" vi_generate_indices -i "$workingdir" -o "$vidir" -s "$outputname" vi_generate_metadata -i "$workingdir" -o "$vidir" +echo "Generating VI manifest" +vi_manifest_name="${vi_outputname}.json" +vi_manifest="${vidir}/${vi_manifest_name}" +create_manifest "$vidir" "$vi_manifest" "$vi_bucket_key" "HLSS30_VI" \ + "$vi_outputname" "$jobid" false + if [ -z "$debug_bucket" ]; then aws s3 cp "$vidir" "$vi_bucket_key" --exclude "*" --include "*.tif" \ --include "*.xml" --include "*.jpg" --include "*_stac.json" \ --profile gccprofile --recursive - # Copy manifest to S3 to signal completion. - # aws s3 cp "$manifest" "${bucket_key}/${manifest_name}" --profile gccprofile + # Copy vi manifest to S3 to signal completion. + aws s3 cp "$vi_manifest" "${vi_bucket_key}/${vi_manifest_name}" --profile gccprofile else # Copy all vi files to debug bucket. echo "Copy files to debug bucket"