-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feast(ocean colour): update download script * feat(ocean colour): update data set * feat(soil moisture): update data * feat(biomass): adjust download * feat(soil moisture): remove timestamping * feat(permafrost): adjust download script * fix(remove files): remove unneeded files
- Loading branch information
Showing
16 changed files
with
109 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,20 @@ | ||
#!/usr/bin/env bash | ||
|
||
URL="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/2017/v1.0/netcdf/ESACCI-BIOMASS-L4-AGB-MERGED-100m-2017-fv1.0.nc" | ||
START_DATE=2017-01-01 | ||
DATA_VERSION="v2.0" | ||
YEARS="2010 2017 2018" | ||
OUTPUT_FODLER=./download | ||
|
||
FILENAME=$OUTPUT_FODLER/$(date +%Y%m%d -d "$START_DATE + $i month").nc | ||
echo $FTP_URL | ||
|
||
curl --silent $FTP_URL > $FILENAME | ||
for YEAR in $YEARS | ||
do | ||
FTP_URL="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/biomass/data/agb/maps/$DATA_VERSION/netcdf/$YEAR/ESACCI-BIOMASS-L4-AGB-MERGED-100m-$YEAR-f$DATA_VERSION.nc" | ||
FILENAME="$OUTPUT_FODLER/$YEAR0101".nc | ||
|
||
python ./data/drop-unused-vars.py --file $FILENAME --variable AOD550_mean | ||
python ./data/add-time-coordinate.py --file $FILENAME --timestamp $NEXT_DATE | ||
echo $FTP_URL | ||
|
||
curl --silent $FTP_URL > $FILENAME | ||
|
||
# TODO | ||
# python ./data/drop-unused-vars.py --file $FILENAME --variable AOD550_mean | ||
# python ./data/add-time-coordinate.py --file $FILENAME --timestamp $(date -d "$YEAR-01-01") | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASE_URL="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/ocean_colour/data/v4.2-release/geographic/netcdf/chlor_a/monthly/v4.2/" | ||
VERSION=5.0 | ||
START_DATE=1997-09-01 | ||
OUTPUT_FODLER=./download/oc | ||
END_DATE=2020-12-01 | ||
|
||
mkdir -p $OUTPUT_FODLER | ||
BASE_URL="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/ocean_colour/data/v$VERSION-release/geographic/netcdf/chlor_a/monthly/v$VERSION/" | ||
OUTPUT_FOLDER=./download/oc | ||
|
||
for i in {0..255} | ||
do | ||
NEXT_YEAR=$(date +%Y -d "$START_DATE + $i month") | ||
NEXT_MONTH=$(date +%Y%m -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-OC-L3S-CHLOR_A-MERGED-1M_MONTHLY_4km_GEO_PML_OCx-$NEXT_MONTH-fv4.2.nc | ||
echo $FTP_URL | ||
# timestamped download folder to not overwrite prvious runs | ||
OUTPUT_FOLDER=$OUTPUT_FOLDER-$(env TZ=Europe/Berlin date +%Y%m%d%H%M) | ||
mkdir -p $OUTPUT_FOLDER | ||
|
||
current_date=$START_DATE | ||
while [[ "$current_date" < $(date -I -d "$END_DATE + 1 month") ]]; do | ||
echo $current_date | ||
NEXT_YEAR=$(date +%Y -d "$current_date") | ||
NEXT_MONTH=$(date +%Y%m -d "$current_date") | ||
FILENAME=$OUTPUT_FOLDER/$(date +%Y%m%d -d "$current_date").nc | ||
FTP_URL=$BASE_URL$NEXT_YEAR/ESACCI-OC-L3S-CHLOR_A-MERGED-1M_MONTHLY_4km_GEO_PML_OCx-$NEXT_MONTH-fv$VERSION.nc | ||
|
||
echo $FTP_URL | ||
curl --silent $FTP_URL > $FILENAME | ||
|
||
python ./data/log-values.py --file $FILENAME --variable chlor_a | ||
python ./data/drop-unused-vars.py --file $FILENAME --variable chlor_a | ||
|
||
current_date=$(date -I -d "$current_date + 1 month") | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,43 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASE_URL="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/permafrost/data/permafrost_extent/L4/area4/pp/v01.0/ESACCI-PERMAFROST-L4-MODIS-PFR-AREA4_PP" | ||
START_DATE=2003-01-01 | ||
# ftp://anon-ftp.ceda.ac.uk/neodc/esacci/permafrost/data/permafrost_extent/L4/area4/pp/v03.0/ESACCI-PERMAFROST-L4-PFR-ERA5_MODISLST_BIASCORRECTED-AREA4_PP-1997-fv03.0.nc | ||
BASE_URL_OLD="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/permafrost/data/permafrost_extent/L4/area4/pp/v03.0/ESACCI-PERMAFROST-L4-PFR-ERA5_MODISLST_BIASCORRECTED-AREA4_PP" | ||
# ftp://anon-ftp.ceda.ac.uk/neodc/esacci/permafrost/data/permafrost_extent/L4/area4/pp/v03.0/ESACCI-PERMAFROST-L4-PFR-MODISLST_CRYOGRID-AREA4_PP-2003-fv03.0.nc | ||
BASE_URL_NEW="ftp://anon-ftp.ceda.ac.uk/neodc/esacci/permafrost/data/permafrost_extent/L4/area4/pp/v03.0/ESACCI-PERMAFROST-L4-PFR-MODISLST_CRYOGRID-AREA4_PP" | ||
START_DATE=1997-01-01 | ||
END_DATE=2019-12-01 | ||
OUTPUT_FODLER=./download/permafrost | ||
|
||
mkdir -p $OUTPUT_FODLER | ||
|
||
for i in {0..14} | ||
do | ||
NEXT_YEAR=$(date +%Y -d "$START_DATE + $i year") | ||
NEXT_DATE=$(date +%Y-%m-%d -d "$START_DATE + $i year") | ||
FILENAME=$OUTPUT_FODLER/$(date +%Y%m%d -d "$START_DATE + $i year").nc | ||
FTP_URL=$BASE_URL"-"$NEXT_YEAR"-fv01.0.nc" | ||
current_date=$START_DATE | ||
while [[ "$current_date" < $(date -I -d "$END_DATE + 1 month") ]]; do | ||
echo "$current_date" | ||
NEXT_YEAR=$(date +%Y -d "$current_date") | ||
|
||
FILENAME=$OUTPUT_FODLER/$NEXT_YEAR.nc | ||
|
||
if [[ $current_date -lt "2003-01-01" ]] | ||
then | ||
FTP_URL=$BASE_URL_OLD"-"$NEXT_YEAR"-fv03.0.nc" | ||
else | ||
FTP_URL=$BASE_URL_NEW"-"$NEXT_YEAR"-fv03.0.nc" | ||
fi | ||
|
||
echo $FTP_URL | ||
# echo $FILENAME | ||
# curl --silent $FTP_URL > $FILENAME | ||
|
||
|
||
|
||
# NEXT_YEAR=$(date +%Y -d "$START_DATE + $i year") | ||
# NEXT_DATE=$(date +%Y-%m-%d -d "$START_DATE + $i year") | ||
|
||
# FTP_URL=$BASE_URL"-"$NEXT_YEAR"-fv01.0.nc" | ||
# echo $FTP_URL | ||
|
||
curl --silent $FTP_URL > $FILENAME | ||
# curl --silent $FTP_URL > $FILENAME | ||
|
||
python ./data/add-time-coordinate.py --file $FILENAME --timestamp $NEXT_DATE | ||
python ./data/add-time-coordinate.py --file $FILENAME --timestamp $current_date | ||
current_date=$(date -I -d "$current_date + 1 year") | ||
done |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASE_URL="https://owncloud.tuwien.ac.at/index.php/s/bY8j2kBgZlkqFYC/download?path=%2F&files=ESACCI-SOILMOISTURE-L3S-SSMV-MONTHLY_MEAN-COMBINED-19781101-20191231-fv05.2.nc" | ||
OUTPUT_FOLDER=./download/soil_moisture_anomaly | ||
|
||
mkdir -p $OUTPUT_FOLDER | ||
|
||
FILENAME=$OUTPUT_FOLDER/sma.nc | ||
curl --silent $BASE_URL > $FILENAME | ||
|
||
python ./data/split-time-dim.py --file $FILENAME --folder $OUTPUT_FOLDER --variable Anomaly | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
BASE_URL="https://owncloud.tuwien.ac.at/index.php/s/bY8j2kBgZlkqFYC/download?path=%2F&files=ESACCI-SOILMOISTURE-L3S-SSMV-MONTHLY_MEAN-COMBINED-19781101-20191231-fv05.2.nc" | ||
OUTPUT_FOLDER=./download/soil_moisture | ||
|
||
mkdir -p $OUTPUT_FOLDER | ||
|
||
FILENAME=$OUTPUT_FOLDER/sm.nc | ||
curl --silent $BASE_URL > $FILENAME | ||
|
||
python ./data/split-time-dim.py --file $FILENAME --folder $OUTPUT_FOLDER --variable sm_mean | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.