Skip to content

Commit 5c12f69

Browse files
CDS downloader: switch to new credentials method in 25.1 (#216)
* switch to new credentials method in 25.1 * rm bc requriement, align credentials * Update ccds_download_era5_af.xml --------- Co-authored-by: Björn Grüning <bjoern@gruenings.eu>
1 parent 5d9fafe commit 5c12f69

1 file changed

Lines changed: 4 additions & 16 deletions

File tree

tools/ccds_download_era5_af/ccds_download_era5_af.xml

Lines changed: 4 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tool id="ccds_download_era5_af" name="Copernicus CDS Downloader for AquaINFRA marine model" version="1.0.2" profile="22.05">
1+
<tool id="ccds_download_era5_af" name="Copernicus CDS Downloader for AquaINFRA marine model" version="2.0.0" profile="25.1">
22
<description>
33
Download ERA5 data from the Copernicus Climate Data Store to provide as input to the AquaINFRA marine model. Products: ERA5 hourly data on single levels from 1940 to present, Reanalysis.
44
</description>
@@ -16,28 +16,16 @@
1616
<requirement type="package" version="1.7.3">bc</requirement>
1717
<requirement type="package" version="2.2.3">pandas</requirement>
1818
<requirement type="package" version="0.7.7">cdsapi</requirement>
19-
<!--<credentials name="cds_api" version="1.0">
20-
<variable name="token" inject_as_env="CDS_TOKEN" />
21-
</credentials>-->
19+
<credentials name="cds_api" version="1.0">
20+
<secret name="token" inject_as_env="CDS_TOKEN" optional="false" label="CDS Token" description="Your Climate Data Store Token. Get it from your Climate Data Store account."/>
21+
</credentials>
2222
</requirements>
2323
<command detect_errors="exit_code"><![CDATA[
24-
source '$cds_token_api' &&
25-
2624
bash '$__tool_directory__/ccds_download_era5_af.sh' \
2725
"$min_lat" "$max_lat" \
2826
"$min_lon" "$max_lon" \
2927
"$start_date" "$end_date"
3028
]]></command>
31-
<configfiles>
32-
<configfile name="cds_token_api">
33-
#import os
34-
#set $c3s_cds_apikey = $__user__.extra_preferences.get('c3s_account|c3s_cds_apikey', "")
35-
#if $c3s_cds_apikey == ""
36-
echo "Error. Set your credentials via: C3S CDS API Key"
37-
#end if
38-
export CDS_TOKEN='$c3s_cds_apikey'
39-
</configfile>
40-
</configfiles>
4129
<inputs>
4230
<param name="min_lat" type="float" label="Min latitude (ºN)" min="-180" max="180" optional="false" value="" help="Minimum latitude value for the data subset (southern boundary latitude)." />
4331
<param name="max_lat" type="float" label="Max latitude (ºN)" min="-180" max="180" optional="false" value="" help="Maximum latitude value for the data subset (northern boundary latitude)." />

0 commit comments

Comments
 (0)