Skip to content

Commit

Permalink
feat(data-layers): update greenhouse xch4 data
Browse files Browse the repository at this point in the history
  • Loading branch information
pwambach committed Sep 29, 2020
1 parent 85e5f4b commit 60cc61c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions data/downloads/storage-greenhouse-xch4.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/usr/bin/env bash

# gsutil -m cp gs://esa-cfs-cate-data/greenhouse.xch4/* ./download
OUTPUT_FODLER=./download/xch4
gsutil -m cp gs://esa-cfs-cate-data/greenhouse.xch4/* $OUTPUT_FOLDER

START_DATE=2003-01-01
OUTPUT_FODLER=./download

pip install rasterio

for i in {0..191}
do
NEXT_MONTH=$(date +%Y-%m -d "$START_DATE + $i month")
NEXT_DATE=$(date +%Y%m%d -d "$START_DATE + $i month")
FILENAME=$OUTPUT_FODLER/xch4_$NEXT_MONTH.tif
NETCDF=$OUTPUT_FODLER/$NEXT_DATE.nc
FILENAME=$OUTPUT_FOLDER/xch4_$NEXT_MONTH.tif
NETCDF=$OUTPUT_FOLDER/$NEXT_DATE.nc
echo $FILENAME

python ./data/tif2netcdf.py --file $FILENAME --output $NETCDF --variable xch4
Expand Down
10 changes: 6 additions & 4 deletions data/downloads/storage-greenhouse-xco2.sh
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
#!/usr/bin/env bash

gsutil -m cp gs://esa-cfs-cate-data/greenhouse.xco2/* ./download
OUTPUT_FODLER=./download/xco2
gsutil -m cp gs://esa-cfs-cate-data/greenhouse.xco2/* $OUTPUT_FOLDER

START_DATE=2003-01-01
OUTPUT_FODLER=./download

pip install rasterio

for i in {0..191}
do
NEXT_MONTH=$(date +%Y-%m -d "$START_DATE + $i month")
NEXT_DATE=$(date +%Y%m%d -d "$START_DATE + $i month")
FILENAME=$OUTPUT_FODLER/xco2_$NEXT_MONTH.tif
NETCDF=$OUTPUT_FODLER/$NEXT_DATE.nc
FILENAME=$OUTPUT_FOLDER/xco2_$NEXT_MONTH.tif
NETCDF=$OUTPUT_FOLDER/$NEXT_DATE.nc
echo $FILENAME

python ./data/tif2netcdf.py --file $FILENAME --output $NETCDF --variable xco2
Expand Down

0 comments on commit 60cc61c

Please sign in to comment.