annotate c3s.sh @ 0:250554670f72 draft

"planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
author climate
date Tue, 13 Apr 2021 18:32:45 +0000
parents
children bd153c794da1
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
1 #!/usr/bin/env bash
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
2
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
3 if [ -f download.tar.gz ]; then
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
4 tar zxvf download.tar.gz
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
5 cat *.grib > tmp.grib
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
6 cdo setgridtype,regular tmp.grib tmpg.grib
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
7 cdo -f nc -t ecmwf copy tmpg.grib tmp.nc
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
8 elif [ -f download.zip ]; then
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
9 unzip download.zip
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
10 cat *.grib > tmp.grib
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
11 cdo setgridtype,regular tmp.grib tmpg.grib
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
12 cdo -f nc -t ecmwf copy tmpg.grib tmp.nc
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
13 elif [ -f download.grib ]; then
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
14 cdo -f nc -t ecmwf copy download.grib tmp.nc
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
15 elif [ -f download.nc ]; then
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
16 mv download.nc tmp.nc
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
17 else
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
18 echo "No data found! Check your request and/or credentials."
250554670f72 "planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit 04069ef63198279caf3d97de5a58fb32df12c811"
climate
parents:
diff changeset
19 fi