Skip to content

Commit

Permalink
Include VI manifest for LPDAAC notification.
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkinsspatial committed Jul 9, 2024
1 parent b410d15 commit 140a075
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]
RUN pip3 install git+https://github.com/NASA-IMPACT/[email protected]
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/[email protected]
RUN pip3 install libxml2-python3
Expand Down
11 changes: 9 additions & 2 deletions scripts/sentinel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 140a075

Please sign in to comment.