changeset 1:bd153c794da1 draft

planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit de74da48cc04c0cb261d07c451d00598beb834d9
author climate
date Thu, 08 Feb 2024 17:58:54 +0000
parents 250554670f72
children 21e8386cf36f
files c3s.sh c3s.xml
diffstat 2 files changed, 10 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/c3s.sh	Tue Apr 13 18:32:45 2021 +0000
+++ b/c3s.sh	Thu Feb 08 17:58:54 2024 +0000
@@ -7,9 +7,14 @@
    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
+   files=(*.nc)
+   if [ -e "${files[0]}" ]; then
+     mv ${files[0]} tmp.nc
+   else
+     cat *.grib > tmp.grib
+     cdo setgridtype,regular tmp.grib tmpg.grib
+     cdo -f nc -t ecmwf copy tmpg.grib tmp.nc
+   fi
 elif [ -f download.grib ]; then
    cdo -f nc -t ecmwf copy download.grib tmp.nc
 elif [ -f download.nc ]; then
--- a/c3s.xml	Tue Apr 13 18:32:45 2021 +0000
+++ b/c3s.xml	Thu Feb 08 17:58:54 2024 +0000
@@ -1,5 +1,5 @@
-<tool id="c3s" name="Copernicus Climate Data Store" version="0.1.0">
-    <description>for retrieveing climate data</description>
+<tool id="c3s" name="Copernicus Climate Data Store" version="0.2.0">
+    <description>for retrieving climate data</description>
     <requirements>
         <requirement type="package" version="3">python</requirement>
         <requirement type="package" version="0.5.1">cdsapi</requirement>