Mercurial > repos > climate > c3s
diff c3s.xml @ 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.xml Tue Apr 13 18:32:45 2021 +0000 @@ -0,0 +1,114 @@ +<tool id="c3s" name="Copernicus Climate Data Store" version="0.1.0"> + <description>for retrieveing climate data</description> + <requirements> + <requirement type="package" version="3">python</requirement> + <requirement type="package" version="0.5.1">cdsapi</requirement> + <requirement type="package" version="1.9.9">cdo</requirement> + <requirement type="package" version="1.34">tar</requirement> + <requirement type="package" version="6.0">unzip</requirement> + </requirements> + <command detect_errors="exit_code"><![CDATA[ + export HOME=`pwd` && + #set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "") + #if $c3s_cds_apikey == "" + echo "Error. Set your credentials via: User -> Preferences -> Manage Information" && + #else + cp '$cds_key_file' .cdsapirc && + #end if + #if str($is_file.has_req).strip() == 'yes' + python3 '$__tool_directory__/c3s_retrieve.py' + --request '$is_file.api_req_file' --output request.txt && + #else + python3 '$__tool_directory__/c3s_retrieve.py' + --request $req_from_paste --output request.txt && + #end if + bash $__tool_directory__/c3s.sh && + echo "C3S data retrieval is done" + ]]></command> + <configfiles> + <configfile name="cds_key_file"><![CDATA[ +#set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "") + url: https://cds.climate.copernicus.eu/api/v2 + key: $c3s_cds_apikey + ]]></configfile> + <configfile name="req_from_paste"><![CDATA[ + #if str($is_file.has_req).strip() == 'no' +$is_file.api_req_text + #end if + ]]></configfile> + </configfiles> + <inputs> + <conditional name="is_file"> + <param name="has_req" type="select" label="C3S request is a given as a filename"> + <option value="yes" selected="true">yes</option> + <option value="no">no</option> + </param> + <when value="yes"> + <param name="api_req_file" type="data" label="API Request filename" format="txt"/> + </when> + <when value="no"> + <param name="api_req_text" type="text" label="Paste API Request" area="true" /> + </when> + </conditional> + </inputs> + <outputs> + <data name="request" format="txt" from_work_dir="request.txt"/> + <data name="ofilename" format="netcdf" from_work_dir="tmp.nc"/> + </outputs> + <tests> + <test> + <param name="api_req_file" value="input.txt" /> + <output name="request" ftype="txt"> + <assert_contents> + <has_text text="dataset to retrieve: reanalysis-era5-single-levels-monthly-means" /> + <has_text text="'format': 'netcdf'" /> + <has_text text="'product_type': 'monthly_averaged_reanalysis'" /> + <has_text text="'variable': '2m_temperature'" /> + <has_text text="'year': '2020'" /> + <has_text text="'month': '12'" /> + <has_text text="'time': '00:00'" /> + <has_text text="'area': [" /> + <has_text text="60," /> + <has_text text="10," /> + <has_text text="59.5," /> + <has_text text="10.5," /> + <has_text text="]" /> + <has_text text="output filename: download.nc" /> + </assert_contents> + </output> + </test> + </tests> + <help><![CDATA[ + +**Copernicus Climate Data Store (C3S)** +======================================================================================================= + +This tool is a wrapper to retrieve data from the Copernicus Climate Data Store. + +- It allows to retrieve data from the Copernicus climate Data Store. +- Any user willing to use this tool needs to `create a new account <https://cds.climate.copernicus.eu/user/register?destination=%2F%23!%2Fhome>`_. +- Set your CDS API Key via: User -> Preferences -> Manage Information" +- Documentation on where to get the CDS API key can be found `here <https://cds.climate.copernicus.eu/api-how-to>`_. +- Compose your request directly on C3S and copy/paste it in the input field "Request" or save it in a file. +- Be aware that for being able to download dataset from C3S, users also need to agree to their term of use (Licence to use Copernicus Products) on the C3S website. + +License: +~~~~~~~~ + +Generated using Copernicus Climate Change Service information [2021] +Neither the European Commission nor ECMWF is responsible for any use +that may be made of the Copernicus information or data it contains. + ]]></help> + <citations> + + </citations> + <edam_topics> + <edam_topic>topic_3855</edam_topic> + <edam_topic>topic_3318</edam_topic> + </edam_topics> + <edam_operations> + <edam_operation>operation_2422</edam_operation> + <edam_operation>operation_3357</edam_operation> + <edam_operation>operation_0335</edam_operation> + </edam_operations> +</tool>