view 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 source

#!/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