Skip to content

Commit

Permalink
Merge pull request #1104 from ubilabs/feat/update-sss
Browse files Browse the repository at this point in the history
feat: update sea surface salinity dataset to v3.21
  • Loading branch information
KatvonRivia authored May 20, 2022
2 parents 991638f + 8ddb3fa commit be36166
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions data/downloads/odp-ftp-sea-surface-salinity.sh
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
#!/usr/bin/env bash

BASE_URL="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/sea_surface_salinity/data/v02.31/30days"
START_DATE=2010-01-01
OUTPUT_FODLER=./download/sss
BASE_URL="https://dap.ceda.ac.uk/neodc/esacci/sea_surface_salinity/data/v03.21/30days"

mkdir -p $OUTPUT_FODLER
START_DATE=2010-02-01
OUTPUT_FOLDER=./download/sss

for i in {0..119}
mkdir -p $OUTPUT_FOLDER

for i in {0..127}
do
NEXT_YEAR=$(date +%Y -d "$START_DATE + $i month")
NEXT_DATE=$(date +%Y%m%d -d "$START_DATE + $i month")
FILENAME=$OUTPUT_FODLER/$(date +%Y%m%d -d "$START_DATE + $i month").nc
FTP_URL=$BASE_URL/$NEXT_YEAR/ESACCI-SEASURFACESALINITY-L4-SSS-MERGED_OI_Monthly_CENTRED_15Day_25km-$NEXT_DATE-fv2.31.nc
FILENAME=$OUTPUT_FOLDER/$(date +%Y%m%d -d "$START_DATE + $i month").nc
FTP_URL=$BASE_URL/$NEXT_YEAR/ESACCI-SEASURFACESALINITY-L4-SSS-MERGED_OI_Monthly_CENTRED_15Day_25km-$NEXT_DATE-fv3.21.nc
echo $FTP_URL

curl --silent $FTP_URL > $FILENAME
Expand Down

0 comments on commit be36166

Please sign in to comment.