Skip to content

Commit 5d9fafe

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

1 file changed

Lines changed: 5 additions & 20 deletions

File tree

tools/cmems_download_ic_bc/cmems_download_ic_bc.xml

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<tool id="cmems_download_ic_bc" name="Copernicus CMEMS Downloader for AquaINFRA marine model" version="1.0.1" profile="22.05">
1+
<tool id="cmems_download_ic_bc" name="Copernicus CMEMS Downloader for AquaINFRA marine model" version="2.0.0" profile="25.1">
22
<description>
33
Download data from the Copernicus Marine Service to provide as input to the AquaINFRA marine model. Products: Mediterranean Sea Physics Analysis and Forecast or Mediterranean Sea Physics Reanalysis, depending on the selected temporal period.
44
</description>
@@ -14,14 +14,12 @@
1414
<requirement type="package" version="1.8.1">jq</requirement>
1515
<requirement type="package" version="1.7.3">netcdf4</requirement>
1616
<requirement type="package" version="1.7.3">bc</requirement>
17-
<!--<credentials name="copernicus_marine" version="2.0">
18-
<variable name="username" inject_as_env="CMEMS_USERNAME" />
19-
<variable name="password" inject_as_env="CMEMS_PASSWORD" />
20-
</credentials>-->
17+
<credentials name="cmems_credentials" version="1.0" label="CMEMS Credentials" description="Credentials for accessing Copernicus Marine Service API.">
18+
<variable name="username" inject_as_env="CMEMS_USERNAME" optional="false" label="CMEMS Username" description="Your Copernicus Marine Service Username. Get it from your Copernicus account."/>
19+
<secret name="password" inject_as_env="CMEMS_PASSWORD" optional="false" label="CMEMS password" description="Your Copernicus Marine Service password."/>
20+
</credentials>
2121
</requirements>
2222
<command detect_errors="exit_code"><![CDATA[
23-
source '$cmems_credentials' &&
24-
2523
bash "$__tool_directory__/cmems_download_ic_bc.sh" \
2624
"$min_lat" "$max_lat" \
2725
"$min_lon" "$max_lon" \
@@ -30,19 +28,6 @@
3028
"$bc_south" "$bc_north" \
3129
"$bc_west" "$bc_east"
3230
]]></command>
33-
<configfiles>
34-
<configfile name="cmems_credentials">
35-
#import os
36-
#set $cmems_username = $__user__.extra_preferences.get('cmems_account|cmems_username', "")
37-
#set $cmems_password = $__user__.extra_preferences.get('cmems_account|cmems_password', "")
38-
#if $cmems_username == "" or $cmems_password == ""
39-
#set $cmems_username = os.getenv('CMEMS_USERNAME', '')
40-
#set $cmems_password = os.getenv('CMEMS_PASSWORD', '')
41-
#end if
42-
export CMEMS_USERNAME='$cmems_username'
43-
export CMEMS_PASSWORD='$cmems_password'
44-
</configfile>
45-
</configfiles>
4631
<inputs>
4732
<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)." />
4833
<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)