# HG changeset patch # User climate # Date 1727465676 0 # Node ID 21e8386cf36f9e6c979d3cde7dd1876110b780bd # Parent bd153c794da14bb393d71d5bbef45399721cca03 planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit e8074c9f6817bba5ca6cb322434ca5e4412b34cf diff -r bd153c794da1 -r 21e8386cf36f c3s.xml --- a/c3s.xml Thu Feb 08 17:58:54 2024 +0000 +++ b/c3s.xml Fri Sep 27 19:34:36 2024 +0000 @@ -1,9 +1,18 @@ - + for retrieving climate data + + topic_3855 + topic_3318 + + + operation_2422 + operation_3357 + operation_0335 + - python - cdsapi - cdo + python + cdsapi + cdo tar unzip @@ -11,24 +20,24 @@ 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" && + 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 && + --request '$is_file.api_req_file' --output request.txt && #else python3 '$__tool_directory__/c3s_retrieve.py' - --request $req_from_paste --output request.txt && + --request $req_from_paste --output request.txt && #end if - bash $__tool_directory__/c3s.sh && + bash $__tool_directory__/c3s.sh && echo "C3S data retrieval is done" ]]> - - + + @@ -61,7 +70,7 @@ - + @@ -81,34 +90,45 @@ `_. +- Any user willing to use this tool needs to `create a new account `_. - Set your CDS API Key via: User -> Preferences -> Manage Information" -- Documentation on where to get the CDS API key can be found `here `_. -- 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. +- Documentation on where to get the CDS API key can be found `here `_. +- Compose your request directly on C3S and extract the relevant information, which should be put in the input field "Request" or saved in a file. The format should be, for example:: + + + import cdsapi + + c = cdsapi.Client() + c.retrieve( + 'reanalysis-era5-single-levels-monthly-means', + { + 'data_format': 'netcdf', + 'product_type': 'monthly_averaged_reanalysis', + 'variable': '2m_temperature', + 'year': '2020', + 'month': '12', + 'time': '00:00', + 'area': [60, 10, 59.5, 10.5], + }, + 'download.nc') + + +- Be aware that for being able to download dataset from C3S, users also need to agree to licensing terms for each dataset of interest on the C3S website. License: ~~~~~~~~ -Generated using Copernicus Climate Change Service information [2021] +Generated using Copernicus Climate Change Service information [2024] Neither the European Commission nor ECMWF is responsible for any use that may be made of the Copernicus information or data it contains. ]]> - + + @misc{C3S2024,author={Copernicus Climate Change Service},year={2024}} - - topic_3855 - topic_3318 - - - operation_2422 - operation_3357 - operation_0335 - diff -r bd153c794da1 -r 21e8386cf36f test-data/input.txt --- a/test-data/input.txt Thu Feb 08 17:58:54 2024 +0000 +++ b/test-data/input.txt Fri Sep 27 19:34:36 2024 +0000 @@ -5,7 +5,7 @@ c.retrieve( 'reanalysis-era5-single-levels-monthly-means', { - 'format': 'netcdf', + 'data_format': 'netcdf', 'product_type': 'monthly_averaged_reanalysis', 'variable': '2m_temperature', 'year': '2020',