Mercurial > repos > ecology > copernicusmarine
comparison copernicusmarine.xml @ 0:4de886e6300d draft
planemo upload for repository https://github.com/galaxyecology/tools-ecology/tree/master/tools/ocean commit a7e53c429cf93485aba692b928defe6ee01633d6
author | ecology |
---|---|
date | Tue, 22 Oct 2024 15:55:13 +0000 |
parents | |
children | 4edd010161e9 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4de886e6300d |
---|---|
1 <tool id="copernicusmarine" name="Copernicue Marine Data Store" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="22.01" license="MIT"> | |
2 <description>retrieve marine data</description> | |
3 <macros> | |
4 <token name="@TOOL_VERSION@">1.3.3</token> | |
5 <token name="@VERSION_SUFFIX@">0</token> | |
6 </macros> | |
7 <requirements> | |
8 <requirement type="package" version="@TOOL_VERSION@">copernicusmarine</requirement> | |
9 </requirements> | |
10 <command detect_errors="exit_code"><![CDATA[ | |
11 #import re | |
12 #set $cmems_username = $__user__.extra_preferences.get('cmems_username', "") | |
13 #set $cmems_password = $__user__.extra_preferences.get('cmems_password', "") | |
14 | |
15 #if $cmems_username == "" or $cmems_password == "" | |
16 #set $cmems_username = os.getenv('CMEMS_USERNAME', '') | |
17 #set $cmems_password = os.getenv('CMEMS_PASSWORD', '') | |
18 | |
19 echo "Using global ENVs" && | |
20 | |
21 #if re.match(r"^(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,}$", $cmems_password): | |
22 echo "Password meets the required criteria" && | |
23 #else: | |
24 echo "Password does not meet the required criteria" && | |
25 #end if | |
26 | |
27 #end if | |
28 | |
29 #if $cmems_username != "" | |
30 echo 'Error. Set your CMEMS credentials via: User -> Preferences -> Manage Information' && | |
31 #end if | |
32 | |
33 #set $filename="config_file_with_my_command" | |
34 echo -e '$input_text' > $filename --force-download --username $cmems_username --password $cmems_password && | |
35 | |
36 python '$__tool_directory__/check.py' $filename | |
37 ]]></command> | |
38 <configfiles> | |
39 <configfile name="cmems_credentials"> | |
40 #set $cmems_username = $__user__.extra_preferences.get('cmems_username', "") | |
41 #set $cmems_password = $__user__.extra_preferences.get('cmems_password', "") | |
42 cmems_username: $cmems_username | |
43 cmems_password: $cmems_password | |
44 </configfile> | |
45 </configfiles> | |
46 <inputs> | |
47 <param name="input_text" label="Paste API Request" type="text" area="true"> | |
48 <sanitizer invalid_char=""> | |
49 <valid initial="string.letters,string.digits"> | |
50 <add value="_" /> | |
51 <add value="-" /> | |
52 <add value=" " /> | |
53 <add value=":" /> | |
54 <add value="." /> | |
55 <add value=" " /> | |
56 </valid> | |
57 </sanitizer> | |
58 <validator type="regex">[0-9a-zA-Z_:\-\. ]+</validator> | |
59 </param> | |
60 </inputs> | |
61 <outputs> | |
62 <data name="output_netcdf" label="Copernicus marine data" from_work_dir="./*.nc" format="netcdf"/> | |
63 </outputs> | |
64 <tests> | |
65 <test expect_num_outputs="1"> | |
66 <param name="input_text" value="copernicusmarine subset --dataset-id cmems_mod_med_phy_my_4.2km-climatology_P1M-m --variable bottomT_avg --variable bottomT_std --variable mlotst_avg --variable mlotst_std --variable so_avg --variable so_std --variable thetao_avg --variable thetao_std --variable uo_avg --variable uo_std --variable vo_avg --variable vo_std --variable zos_avg --variable zos_std --start-datetime 1993-12-01T00:00:00 --end-datetime 1993-12-01T00:00:00 --minimum-longitude 10.283266521135577 --maximum-longitude 12.139348881644054 --minimum-latitude 38.461936025366256 --maximum-latitude 39.82957565942514 --minimum-depth 1.0182366371154785 --maximum-depth 1.0182366371154785"/> | |
67 <output name="output_netcdf"> | |
68 <assert_contents> | |
69 <has_text text="_NCProperties"/> | |
70 </assert_contents> | |
71 </output> | |
72 </test> | |
73 </tests> | |
74 <help><![CDATA[ | |
75 ============================ | |
76 Copernicus Marine Data Store | |
77 ============================ | |
78 | |
79 ** Context ** | |
80 This tool is a wrapper to retrieve data from the Copernicus Marine Environment Monitoring Service (CMEMS). | |
81 | |
82 - It allows to retrieve data from the Copernicus Marine Service. | |
83 - Any user willing to use this tool needs to `create a new account <https://data.marine.copernicus.eu/login>`_. | |
84 - Set your Copernicus CMEMS API Key via: User > Preferences > Manage Information | |
85 - Enter your username and password for Copernicus CMEMS | |
86 - Compose your request directly on Copernicus Marine Data Store | |
87 - Choose there which data interest you click on the download button | |
88 - Then on the top right click again on the big download butto | |
89 - Log in | |
90 - Click on "Automate" | |
91 - You should have a pop-up window called "Automate download" | |
92 - Copy the ">_Command-Line Interface" proposed there | |
93 - Back on Galaxy paste it in the input field "Paste API Request". | |
94 | |
95 For more information on the Command-Line Interface (CLI) go on `Copernicus Marine Toolbox CLI - Subset <https://help.marine.copernicus.eu/en/articles/7972861-copernicus-marine-toolbox-cli-subset>` | |
96 | |
97 ** Input ** | |
98 Command line from the Copernicus marine services copy paste as a text. | |
99 | |
100 ** Output ** | |
101 A netcdf file containing the the data chose by the user from the Copernicus Marine Data Store. | |
102 | |
103 ]]></help> | |
104 <citations> | |
105 <citation type="bibtex"> | |
106 @misc{Copernicus, | |
107 title={Copernicus Marine Data Store}, | |
108 url={https://data.marine.copernicus.eu/products}, | |
109 note={E.U. Copernicus Marine Service Information}, | |
110 author={Copernicus, E.U.} | |
111 } | |
112 </citation> | |
113 </citations> | |
114 </tool> |