Mercurial > repos > ecology > iabiodiv_smartbiodiv_med_environ
comparison med_environ.xml @ 0:f82f266381be draft
planemo upload for repository https://github.com/jeremyfix/medenv commit 6068531bc50297a9c8f2c24e748d7d791fe5f2ba
author | ecology |
---|---|
date | Thu, 15 Feb 2024 20:01:29 +0000 |
parents | |
children | b79faea33a8a |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:f82f266381be |
---|---|
1 <tool id="iabiodiv_smartbiodiv_med_environ" name="Adds environment variables" version="0.0.1" profile="22.05"> | |
2 <description> | |
3 From Copernicus and etopo given geolocalized and timestamped observations | |
4 </description> | |
5 <requirements> | |
6 <requirement type="package" version="2.1.3">pandas</requirement> | |
7 <requirement type="package" version="4.9.3">lxml</requirement> | |
8 <requirement type="package" version="1.0.4">medenv</requirement> | |
9 </requirements> | |
10 <creator> | |
11 <person givenName="Jérémy" familyName="Fix" url="http://www.github.com/jeremyfix/" email="jeremy.fix@centralesupelec.fr"/> | |
12 </creator> | |
13 <command><![CDATA[ | |
14 #set $cmems_username = $__user__.extra_preferences.get('cmems_username', "") | |
15 #if $cmems_username != "" | |
16 cp '$cmems_credentials' ~/.medenvkey && | |
17 #end if | |
18 | |
19 python '$__tool_directory__/med_environ.py' | |
20 --datafile '${input}' | |
21 --out_file '${out_file}' | |
22 --lat_key '${lat_key}' | |
23 --long_key '${long_key}' | |
24 --date_key '${date_key}' | |
25 --depth_key '${depth_key}' | |
26 --variables '${env_variables}' | |
27 --tol_spatial_coordinates '${tol_spatial_coordinates}' | |
28 --keyfile ~/.medenvkey | |
29 --verbose '${verbose}' | |
30 ]]></command> | |
31 <configfiles> | |
32 <configfile name="cmems_credentials"><![CDATA[ | |
33 #set $cmems_username = $__user__.extra_preferences.get('cmems_username', "") | |
34 #set $cmems_password = $__user__.extra_preferences.get('cmems_password', "") | |
35 cmems_username: $cmems_username | |
36 cmems_password: $cmems_password | |
37 ]]></configfile> | |
38 </configfiles> | |
39 <inputs> | |
40 <param name="input" type="data" format="tabular" label="Input dataset"/> | |
41 <param name="env_variables" type="select" label="Which variables to add" multiple="true"> | |
42 <option value="temperature">temperature</option> | |
43 <option value="salinity">salinity</option> | |
44 <option value="phytoplankton-carbon-biomass">Mole concentration of phytoplankton expressed as carbon in sea water (phyc)</option> | |
45 <option value="chlorophyl-a">chlorophyl-a (CHL, mg/m3)</option> | |
46 <option value="nitrate">nitrate (NO3, mmol/M3)</option> | |
47 <option value="phosphate">phosphate (PO4, mmol/m3)</option> | |
48 <option value="ammonium">ammonium (NH4, mmol/m3)</option> | |
49 <option value="net-primary-production">Net primary production of biomass expressed as carbon per unit volume in sea water (nppv, [mg/m3/day])</option> | |
50 <option value="oxygen">Mole concentration of dissolved molecular oxygen in sea water (O2, [mmol/m3])</option> | |
51 <option value="ph">Sea water ph reported on total scale (ph) </option> | |
52 <option value="dissolved-inorganic-carbon">Mole concentration of dissolved inorganic carbon in sea water (dissic, [mol/m3])</option> | |
53 <option value="alkalinity">alkalinity (talk)</option> | |
54 <option value="bathymetry">bathymetry</option> | |
55 <option value="northward-water-velocity">Northward water velocity</option> | |
56 <option value="eastward-water-velocity">Eastward water velocity</option> | |
57 <option value="sea-surface-temperature">sea surface temperature</option> | |
58 <option value="sea-surface-salinity">sea surface salinity</option> | |
59 <option value="sea-surface-above-geoid">sea surface above geoid</option> | |
60 <option value="surface-partial-pressure-co2">surface partial pressure CO2</option> | |
61 <option value="surface-co2-flux">surface CO2 flux</option> | |
62 <option value="mixed-layer-thickness">mixed layer thickness</option> | |
63 </param> | |
64 <param name="lat_key" label="The key of the column for the latitude" type="data_column" data_ref="input" use_header_names="true"/> | |
65 <param name="long_key" label="The key of the column for the longitude" type="data_column" data_ref="input" use_header_names="true"/> | |
66 <param name="tol_spatial_coordinates" type="float" value="0.2" label="A tolerance on the latitude/longitude for the request point" optional="False"/> | |
67 <param name="depth_key" label="The key of the column for the depth" type="data_column" data_ref="input" use_header_names="true"/> | |
68 <param name="date_key" label="The key of the column for the observation time" type="data_column" data_ref="input" use_header_names="true"/> | |
69 <param name="verbose" type="boolean" value="False" label="Verbose in the standard output of the tool"/> | |
70 </inputs> | |
71 <outputs> | |
72 <data format="tabular" name="out_file" metadata_source="input" label="Dataset augmented with the environmental variables"/> | |
73 </outputs> | |
74 <tests> | |
75 <test expect_num_outputs="1"> | |
76 <param name="input" value="reef_life_subset.tsv"/> | |
77 <param name="env_variables" value="bathymetry"/> <!-- This test is requesting etopo only --> | |
78 <param name="lat_key" value="8"/> | |
79 <param name="long_key" value="9"/> | |
80 <param name="tol_spatial_coordinates" value="0.2"/> | |
81 <param name="depth_key" value="11"/> | |
82 <param name="date_key" value="10"/> | |
83 <param name="verbose" value="False"/> | |
84 <output name="out_file" file="expected-output.tsv"> | |
85 <assert_contents> | |
86 <has_n_lines n="100"/> | |
87 <has_n_columns n="21"/> | |
88 </assert_contents> | |
89 </output> | |
90 </test> | |
91 </tests> | |
92 <help> | |
93 | |
94 **What it does** | |
95 | |
96 This tool allows you to augment your dataset by adding some environmental variables grabbed from CMEMS, etopo, and woa. It is a galaxy tool built on the medenv python package available at https://github.com/jeremyfix/medenv. | |
97 | |
98 It will augment the dataset with environmental variables as provided by copernicus and etopo based on the informations coming from an "observation file". This version of the tool gets environmental data from etopo for the bathymetry and otherwise copernicus mediterranean products. | |
99 | |
100 We expect the dataset you provide to contain the coordinates of the observation: latitude, longitude, depth, and time. The time is expected in ISO 8601: YYYY-MM-DDTHH:MM:SSZ | |
101 | |
102 The `cmems_username` and `cmems_password` are required only if you want to add variables provided by CMEMS. These must be defined in "User -> Preferences -> Manage Information" | |
103 | |
104 The CMEMS data are collected from the following products : | |
105 | |
106 - med-cmcc: https://resources.marine.copernicus.eu/product-detail/MEDSEA_MULTIYEAR_PHY_006_004/INFORMATION | |
107 - med-ogs: https://resources.marine.copernicus.eu/product-detail/MEDSEA_MULTIYEAR_BGC_006_008/INFORMATION | |
108 | |
109 The bathymetry is obtained with the ETOPO at : | |
110 | |
111 - https://www.ngdc.noaa.gov/mgg/global/relief/ETOPO1/data/bedrock/grid_registered/netcdf/ETOPO1_Bed_g_gmt4.grd.gz | |
112 | |
113 We request data around the point with a given tolerance and average the collected values. The medenv package does not force that averaging and could return a raster. A later update of the Galaxy tool could take this into account. | |
114 | |
115 The features you can request are the following, some indexed by depth : | |
116 | |
117 - "bathymetry", (etopo) | |
118 - "temperature", | |
119 - "salinity", | |
120 - "chlorophyl-a", | |
121 - "nitrate", | |
122 - "phosphate", | |
123 - "ammonium", | |
124 - "phytoplankton-carbon-biomass", | |
125 - "oxygen", | |
126 - "net-primary-production", | |
127 - "ph", | |
128 - "alkalinity", | |
129 - "dissolved-inorganic-carbon", | |
130 - "northward-water-velocity", | |
131 - "eastward-water-velocity". | |
132 | |
133 and others not indexed by depth : | |
134 | |
135 - "mixed-layer-thickness", | |
136 - "sea-surface-temperature", | |
137 - "sea-surface-salinity", | |
138 - "sea-surface-above-geoid", | |
139 - "surface-partial-pressure-co2", | |
140 - "surface-co2-flux". | |
141 | |
142 ** Copernicus credentials ** | |
143 | |
144 To request Copernicus, you need to have an account on the https://resources.marine.copernicus.eu platform. | |
145 Then, you need to provide your credentials in the user-preference section of Galaxy. | |
146 | |
147 </help> | |
148 <citations> | |
149 <citation type="bibtex">@misc{medenvGithubRepository, | |
150 title = "MedEnv", | |
151 author = "{Jeremy Fix}", | |
152 howpublished = "\url{https://github.com/jeremyfix/medenv}", | |
153 year = 2023 | |
154 } | |
155 </citation> | |
156 </citations> | |
157 </tool> |