view cads.sh @ 0:b768e517a7d0 draft default tip

"planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/cads commit 778688ee8d14e22b00b648858ad9bd1c2f46b1e0"
author climate
date Sat, 19 Jun 2021 18:35:50 +0000
parents
children
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