diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/c3s.sh	Tue Apr 13 18:32:45 2021 +0000
@@ -0,0 +1,19 @@
+#!/usr/bin/env bash
+
+if [ -f download.tar.gz ]; then
+   tar zxvf  download.tar.gz
+   cat *.grib > tmp.grib
+   cdo setgridtype,regular tmp.grib tmpg.grib
+   cdo -f nc -t ecmwf copy tmpg.grib tmp.nc
+elif [ -f download.zip ]; then
+   unzip download.zip
+   cat *.grib > tmp.grib
+   cdo setgridtype,regular tmp.grib tmpg.grib
+   cdo -f nc -t ecmwf copy tmpg.grib tmp.nc
+elif [ -f download.grib ]; then
+   cdo -f nc -t ecmwf copy download.grib tmp.nc
+elif [ -f download.nc ]; then
+   mv download.nc tmp.nc
+else
+   echo "No data found! Check your request and/or credentials."
+fi