Mercurial > repos > climate > c3s
comparison c3s.xml @ 2:21e8386cf36f draft default tip
planemo upload for repository https://github.com/NordicESMhub/galaxy-tools/tree/master/tools/c3s commit e8074c9f6817bba5ca6cb322434ca5e4412b34cf
author | climate |
---|---|
date | Fri, 27 Sep 2024 19:34:36 +0000 |
parents | bd153c794da1 |
children |
comparison
equal
deleted
inserted
replaced
1:bd153c794da1 | 2:21e8386cf36f |
---|---|
1 <tool id="c3s" name="Copernicus Climate Data Store" version="0.2.0"> | 1 <tool id="c3s" name="Copernicus Climate Data Store" version="0.3.0" profile="23.0"> |
2 <description>for retrieving climate data</description> | 2 <description>for retrieving climate data</description> |
3 <edam_topics> | |
4 <edam_topic>topic_3855</edam_topic> | |
5 <edam_topic>topic_3318</edam_topic> | |
6 </edam_topics> | |
7 <edam_operations> | |
8 <edam_operation>operation_2422</edam_operation> | |
9 <edam_operation>operation_3357</edam_operation> | |
10 <edam_operation>operation_0335</edam_operation> | |
11 </edam_operations> | |
3 <requirements> | 12 <requirements> |
4 <requirement type="package" version="3">python</requirement> | 13 <requirement type="package" version="3.8">python</requirement> |
5 <requirement type="package" version="0.5.1">cdsapi</requirement> | 14 <requirement type="package" version="0.7.3">cdsapi</requirement> |
6 <requirement type="package" version="1.9.9">cdo</requirement> | 15 <requirement type="package" version="2.4.4">cdo</requirement> |
7 <requirement type="package" version="1.34">tar</requirement> | 16 <requirement type="package" version="1.34">tar</requirement> |
8 <requirement type="package" version="6.0">unzip</requirement> | 17 <requirement type="package" version="6.0">unzip</requirement> |
9 </requirements> | 18 </requirements> |
10 <command detect_errors="exit_code"><![CDATA[ | 19 <command detect_errors="exit_code"><![CDATA[ |
11 export HOME=`pwd` && | 20 export HOME=`pwd` && |
12 #set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "") | 21 #set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "") |
13 #if $c3s_cds_apikey == "" | 22 #if $c3s_cds_apikey == "" |
14 echo "Error. Set your credentials via: User -> Preferences -> Manage Information" && | 23 echo "Error. Set your credentials via: User -> Preferences -> Manage Information" && |
15 #else | 24 #else |
16 cp '$cds_key_file' .cdsapirc && | 25 cp '$cds_key_file' .cdsapirc && |
17 #end if | 26 #end if |
18 #if str($is_file.has_req).strip() == 'yes' | 27 #if str($is_file.has_req).strip() == 'yes' |
19 python3 '$__tool_directory__/c3s_retrieve.py' | 28 python3 '$__tool_directory__/c3s_retrieve.py' |
20 --request '$is_file.api_req_file' --output request.txt && | 29 --request '$is_file.api_req_file' --output request.txt && |
21 #else | 30 #else |
22 python3 '$__tool_directory__/c3s_retrieve.py' | 31 python3 '$__tool_directory__/c3s_retrieve.py' |
23 --request $req_from_paste --output request.txt && | 32 --request $req_from_paste --output request.txt && |
24 #end if | 33 #end if |
25 bash $__tool_directory__/c3s.sh && | 34 bash $__tool_directory__/c3s.sh && |
26 echo "C3S data retrieval is done" | 35 echo "C3S data retrieval is done" |
27 ]]></command> | 36 ]]></command> |
28 <configfiles> | 37 <configfiles> |
29 <configfile name="cds_key_file"><![CDATA[ | 38 <configfile name="cds_key_file"><![CDATA[ |
30 #set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "") | 39 #set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "") |
31 url: https://cds.climate.copernicus.eu/api/v2 | 40 url: https://cds.climate.copernicus.eu/api |
32 key: $c3s_cds_apikey | 41 key: $c3s_cds_apikey |
33 ]]></configfile> | 42 ]]></configfile> |
34 <configfile name="req_from_paste"><![CDATA[ | 43 <configfile name="req_from_paste"><![CDATA[ |
35 #if str($is_file.has_req).strip() == 'no' | 44 #if str($is_file.has_req).strip() == 'no' |
36 $is_file.api_req_text | 45 $is_file.api_req_text |
50 <param name="api_req_text" type="text" label="Paste API Request" area="true" /> | 59 <param name="api_req_text" type="text" label="Paste API Request" area="true" /> |
51 </when> | 60 </when> |
52 </conditional> | 61 </conditional> |
53 </inputs> | 62 </inputs> |
54 <outputs> | 63 <outputs> |
55 <data name="request" format="txt" from_work_dir="request.txt"/> | 64 <data name="request" format="txt" from_work_dir="request.txt" label="${tool.name} on ${on_string}: request script"/> |
56 <data name="ofilename" format="netcdf" from_work_dir="tmp.nc"/> | 65 <data name="ofilename" format="netcdf" from_work_dir="tmp.nc" label="${tool.name} on ${on_string}: NC"/> |
57 </outputs> | 66 </outputs> |
58 <tests> | 67 <tests> |
59 <test> | 68 <test> |
60 <param name="api_req_file" value="input.txt" /> | 69 <param name="api_req_file" value="input.txt" /> |
61 <output name="request" ftype="txt"> | 70 <output name="request" ftype="txt"> |
62 <assert_contents> | 71 <assert_contents> |
63 <has_text text="dataset to retrieve: reanalysis-era5-single-levels-monthly-means" /> | 72 <has_text text="dataset to retrieve: reanalysis-era5-single-levels-monthly-means" /> |
64 <has_text text="'format': 'netcdf'" /> | 73 <has_text text="'data_format': 'netcdf'" /> |
65 <has_text text="'product_type': 'monthly_averaged_reanalysis'" /> | 74 <has_text text="'product_type': 'monthly_averaged_reanalysis'" /> |
66 <has_text text="'variable': '2m_temperature'" /> | 75 <has_text text="'variable': '2m_temperature'" /> |
67 <has_text text="'year': '2020'" /> | 76 <has_text text="'year': '2020'" /> |
68 <has_text text="'month': '12'" /> | 77 <has_text text="'month': '12'" /> |
69 <has_text text="'time': '00:00'" /> | 78 <has_text text="'time': '00:00'" /> |
79 </test> | 88 </test> |
80 </tests> | 89 </tests> |
81 <help><![CDATA[ | 90 <help><![CDATA[ |
82 | 91 |
83 **Copernicus Climate Data Store (C3S)** | 92 **Copernicus Climate Data Store (C3S)** |
84 ======================================================================================================= | 93 ======================================= |
85 | 94 |
86 This tool is a wrapper to retrieve data from the Copernicus Climate Data Store. | 95 This tool is a wrapper to retrieve data from the Copernicus Climate Data Store. |
87 | 96 |
88 - It allows to retrieve data from the Copernicus climate Data Store. | 97 - It allows to retrieve data from the Copernicus climate Data Store. |
89 - Any user willing to use this tool needs to `create a new account <https://cds.climate.copernicus.eu/user/register?destination=%2F%23!%2Fhome>`_. | 98 - Any user willing to use this tool needs to `create a new account <https://cds.climate.copernicus.eu/>`_. |
90 - Set your CDS API Key via: User -> Preferences -> Manage Information" | 99 - Set your CDS API Key via: User -> Preferences -> Manage Information" |
91 - Documentation on where to get the CDS API key can be found `here <https://cds.climate.copernicus.eu/api-how-to>`_. | 100 - Documentation on where to get the CDS API key can be found `here <https://cds.climate.copernicus.eu/how-to-api>`_. |
92 - Compose your request directly on C3S and copy/paste it in the input field "Request" or save it in a file. | 101 - 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:: |
93 - 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. | 102 |
103 | |
104 import cdsapi | |
105 | |
106 c = cdsapi.Client() | |
107 c.retrieve( | |
108 'reanalysis-era5-single-levels-monthly-means', | |
109 { | |
110 'data_format': 'netcdf', | |
111 'product_type': 'monthly_averaged_reanalysis', | |
112 'variable': '2m_temperature', | |
113 'year': '2020', | |
114 'month': '12', | |
115 'time': '00:00', | |
116 'area': [60, 10, 59.5, 10.5], | |
117 }, | |
118 'download.nc') | |
119 | |
120 | |
121 - 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. | |
94 | 122 |
95 License: | 123 License: |
96 ~~~~~~~~ | 124 ~~~~~~~~ |
97 | 125 |
98 Generated using Copernicus Climate Change Service information [2021] | 126 Generated using Copernicus Climate Change Service information [2024] |
99 Neither the European Commission nor ECMWF is responsible for any use | 127 Neither the European Commission nor ECMWF is responsible for any use |
100 that may be made of the Copernicus information or data it contains. | 128 that may be made of the Copernicus information or data it contains. |
101 ]]></help> | 129 ]]></help> |
102 <citations> | 130 <citations> |
103 | 131 <citation type="bibtex"> |
132 @misc{C3S2024,author={Copernicus Climate Change Service},year={2024}}</citation> | |
104 </citations> | 133 </citations> |
105 <edam_topics> | |
106 <edam_topic>topic_3855</edam_topic> | |
107 <edam_topic>topic_3318</edam_topic> | |
108 </edam_topics> | |
109 <edam_operations> | |
110 <edam_operation>operation_2422</edam_operation> | |
111 <edam_operation>operation_3357</edam_operation> | |
112 <edam_operation>operation_0335</edam_operation> | |
113 </edam_operations> | |
114 </tool> | 134 </tool> |