changeset 3:d413a6b6cebf draft

planemo upload for repository https://github.com/AquaINFRA/tools-ecology/tree/master commit 82b4eef37ab55a62d75ff42e96fca1e07da8d764
author ecology
date Wed, 23 Apr 2025 22:25:38 +0000
parents af00a67d3649
children eb41894de107
files aquainfra_ogc_api_processes.xml macros.xml test-data/points_att_polygon_test_input_2.txt
diffstat 3 files changed, 37 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/aquainfra_ogc_api_processes.xml	Tue Feb 04 07:10:11 2025 +0000
+++ b/aquainfra_ogc_api_processes.xml	Wed Apr 23 22:25:38 2025 +0000
@@ -1,4 +1,4 @@
-<tool id="aquainfra_ogc_api_processes" name="AquaINFRA OGC API Processes" version="0.3.0" profile="22.05">
+<tool id="aquainfra_ogc_api_processes" name="AquaINFRA OGC API Processes" version="0.4.0" profile="22.05">
     <description/>
     <macros>
         <import>macros.xml</import>
@@ -26,6 +26,8 @@
                 <option value="map-trends-static">map-trends-static: Spatial visualisation of regions and data points</option>
                 <option value="map-shapefile-points">map-shapefile-points: Spatial visualisation of regions and data points</option>
                 <option value="owt-classification">owt-classification: OWT Classification</option>
+                <option value="tordera-gloria">tordera-gloria: SWAT+, Soil and Water Assessment Tool</option>
+                <option value="tordera-gloria-connection">tordera-gloria-connection: SWAT+ output to MITgcm input connection tool</option>
             </param>
             <when value="points-att-polygon">
                 <param name="input_data" label="Table to be merged with study region" optional="false" help="URL to the input table containing the in-situ data points with coordinates. Can be provided as Excel file or CSV file (comma-separated text file). The coordinates have to be in WGS84 coordinate system. (URL must be stored in a .txt file)" type="data" format="txt"/>
@@ -54,10 +56,10 @@
             <when value="ts-selection-interpolation">
                 <param name="input_data" label="Input table" optional="false" help="URL to the input table containing data for selection and interpolation. This table includes grouping variables (if applicable), the year (or other time identifier) and the value columns to be interpolated. For example, use the result from mean_by_group. (URL must be stored in a .txt file)" type="data" format="txt"/>
                 <param name="colnames_relevant" label="Column names identifying group(s)" optional="false" help="Column name(s) describing relevant values in the dataset. These columns are treated as grouping identifiers, and a combination of all specified columns will be used to define unique groups. For each group, a separate time series is analyzed and interpolated individually." type="text"/>
-                <param name="missing_threshold_percentage" label="Threshold for missing values" optional="false" help="Threshold for the allowed percentage of missing data points (NAs). For example, a value of 80 means series with more than 80% missing data will be removed. Example = '80'." type="float" min="0" max="100" value="80"/>
+                <param name="missing_threshold_percentage" label="Threshold for missing values" optional="false" value="80" help="Threshold for the allowed percentage of missing data points (NAs). For example, a value of 80 means series with more than 80% missing data will be removed. Example = '80'." type="float" min="0" max="100"/>
                 <param name="colname_year" label="Column name for time" optional="false" help="The name of the column containing the year (or other time identifier, such as quarter, month, or day). Example = 'year'" type="text"/>
                 <param name="colname_value" label="Column name for values" optional="false" help="The name of the column containing the values to be considered for interpolation." type="text"/>
-                <param name="min_data_point" label="Minimum number of data points required" optional="false" help="The minimum number of data points required in a time series for it to be included in the interpolation process. Example = '10'." type="integer" min="0" value="10"/>
+                <param name="min_data_point" label="Minimum number of data points required" optional="false" value="10" help="The minimum number of data points required in a time series for it to be included in the interpolation process. Example = '10'." type="integer" min="0"/>
             </when>
             <when value="trend-analysis-mk">
                 <param name="input_data" label="Input table" optional="false" help="URL to the input table containing the time series data. This table includes grouping identifiers (if applicable), columns for time (e.g., year, month) and values to be analyzed for trends. For example, use the result from ts_selection_interpolation. (URL must be stored in a .txt file)" type="data" format="txt"/>
@@ -70,7 +72,7 @@
                 <param name="colname_id" label="Column name for identifier" optional="false" help="The name of the column containing group or sample identifiers, e.g., polygon id. Example = 'polygon_id'" type="text"/>
                 <param name="colname_test_value" label="Column name for test value" optional="false" help="The name of the column containing the test values (e.g., statistical coefficients) to be plotted on the Y-axis, e.g., Tau for Mann-Kendall test." type="text"/>
                 <param name="colname_p_value" label="Column name for p value" optional="false" help="The name of the column containing p values, used to determine bar transparency. Example = 'p_value'" type="text"/>
-                <param name="p_value_threshold" label="p value threshold for significance" optional="false" help="The threshold for distinguishing significant from insignificant values. It adjusts the transparency of bars in the plot. Example = '0.05'" type="float" min="0.01" max="0.1" value="0.05"/>
+                <param name="p_value_threshold" label="p value threshold for significance" optional="false" value="0.05" help="The threshold for distinguishing significant from insignificant values. It adjusts the transparency of bars in the plot. Example = '0.05'" type="float" min="0.01" max="0.1"/>
                 <param name="colname_group" label="Column name for subgroups" optional="false" help="The name of the column that defines the subgroups or categories to be displayed on the X-axis, e.g., seasons for every polygon_id." type="text"/>
             </when>
             <when value="map-trends-static">
@@ -79,7 +81,7 @@
                 <param name="colname_id_trend" label="Column name of study region identifier" optional="false" help="The name of the column containing identifiers for study regions, which must correspond to the identifiers in the shapefile (shp). Example = 'id'" type="text"/>
                 <param name="colname_region_id" label="Column name of study region identifier" optional="false" help="The name of the column in the input data that contains identifiers for study regions, corresponding to the identifiers in the shapefile. Example = 'id'" type="text"/>
                 <param name="colname_group" label="Column name for subgroups" optional="false" help="The name of the column that defines the subgroups or categories to be displayed on the X-axis, e.g., seasons for every polygon_id." type="text"/>
-                <param name="p_value_threshold" label="p value threshold for significance" optional="false" help="The threshold for distinguishing significant from insignificant values. It adjusts the transparency of bars in the plot. Default = 0.05" type="float" min="0.01" max="0.1" value="0.05"/>
+                <param name="p_value_threshold" label="p value threshold for significance" optional="false" value="0.05" help="The threshold for distinguishing significant from insignificant values. It adjusts the transparency of bars in the plot. Default = 0.05" type="float" min="0.01" max="0.1"/>
                 <param name="colname_p_value" label="Column name for p value" optional="false" help="The name of the column containing p values, used to determine bar transparency. Example = 'p_value'" type="text"/>
             </when>
             <when value="map-shapefile-points">
@@ -125,6 +127,19 @@
                     <option value="2">2</option>
                 </param>
             </when>
+            <when value="tordera-gloria">
+                <param name="TextInOut_URL" label="URL to project folder" optional="true" help="To model a watershed other than the Tordera Basin, users can add a URL to their own zipped project folder. Important: Do not include the SWAT executable to that folder — AquaINFRA has integrated the executable version rev60.5.7_64rel_linux. Defaults to: https://raw.githubusercontent.com/AmandaBatlle/AquaINFRA_CaseUse_MedInlandModel/refs/heads/main/example_inputs/project.zip" type="data" format="txt"/>
+                <param name="par_cal" label="Parameter inputs" optional="true" help="JSON file including the parameter value change as defined by SWATrunR documentation (https://chrisschuerz.github.io/SWATrunR/articles/SWATrunR.html#parameter-inputs). Defaults to: https://raw.githubusercontent.com/AmandaBatlle/AquaINFRA_CaseUse_MedInlandModel/refs/heads/main/example_inputs/par_cal.json" type="data" format="txt"/>
+                <param name="unit" label="Output Spatial unit" optional="true" help="Specify the spatial unit for which to generate output. This corresponds to the ID of a river reach, HRU (Hydrologic Response Unit), or LSU (Landscape Unit) as defined in the SWAT+ watershed delineation. The value can be entered as a single number (e.g., 1), a range (e.g., 1:10), or a list of values (e.g., (1, 3, 25, 40)). The default unit for the La Tordera SWAT+ model is 1." type="integer"/>
+                <param name="file" label="SWAT Output File" optional="true" help="A SWAT+ output file name consists of three elements separated by underscores (_): spatial unit, output category, and time step. For example, 'channel_sd_day'. The spatial unit defines the scale of the output and can be basin, hru, lsunit, channel, aquifer, or reservoir. The output category specifies the type of data such as wb (water balance), nb (nutrient balance), ls (losses), pw (plant and weather), or sd (streamflow and sediment in channels). The time step indicates the temporal resolution and can be day (daily), mon (monthly), yr (yearly), or aa (annual average). Combining these elements forms the output file name. For more details, refer to the SWAT+ OUTPUT FILES section in the SWAT+ documentation (https://swatplus.gitbook.io/io-docs). Defaults to: 'channel_sd_day'" type="text"/>
+                <param name="variable" label="SWAT Variable" optional="true" help="Variable to simulate. Example: 'flo_out'. For more details and extended capabilities, refer to the SWAT+ OUTPUT FILES section in the SWAT+ documentation (https://swatplus.gitbook.io/io-docs). For one variable, enter the variable name. For multiple variables, enter them separated by comma. Defaults to: 'flo_out,water_temp'" type="text"/>
+                <param name="start_date" label="Start Date" optional="true" help="Start date of the simulation in the format yyyymmdd. Defaults to: 20160101. Earliest possible date for the default input project: 20000101." type="integer"/>
+                <param name="start_date_print" label="Start Date for printing" optional="true" help="Start date for printing in the format yyyymmdd. Defaults to: 20190601. Earliest possible date for the default input project: 20020101. It is recommended to allow for at least two warm-up years between the model simulation start and the model output printing to ensure relevant results." type="integer"/>
+                <param name="end_date" label="End Date" optional="true" help="End date of the simulation in the format yyyymmdd. Defaults to: 20201231. Latest possible date for the default input project: 20221231." type="integer"/>
+            </when>
+            <when value="tordera-gloria-connection">
+                <param name="swat_output_file" label="SWAT+ Variable Outputs Database" optional="false" help="SQLite database (thread_1.sqlite) storing the simulated output values based on the defined time range and time step (daily, monthly, yearly, or annual average)." type="data" format="txt"/>
+            </when>
         </conditional>
     </inputs>
     <outputs>
--- a/macros.xml	Tue Feb 04 07:10:11 2025 +0000
+++ b/macros.xml	Wed Apr 23 22:25:38 2025 +0000
@@ -21,11 +21,13 @@
     <xml name="tests">
         <tests>
             <test>
-                <param name="select_process" value="points-att-polygon"/>
-                <param name="regions" value="points_att_polygon_test_input_1.txt"/>
-                <param name="input_data" value="points_att_polygon_test_input_2.txt"/>
-                <param name="colname_long" value="longitude"/>
-                <param name="colname_lat" value="latitude"/>
+                <conditional name="conditional_process">
+                    <param name="select_process" value="points-att-polygon"/>
+                    <param name="input_data" value="points_att_polygon_test_input_2.txt"/>
+                    <param name="regions" value="points_att_polygon_test_input_1.txt"/>
+                    <param name="colname_long" value="longitude"/>
+                    <param name="colname_lat" value="latitude"/>
+                </conditional>
                 <output name="output_data">
                     <assert_contents>
                         <has_n_lines n="1"/>
@@ -33,13 +35,15 @@
                 </output>
             </test>
             <test>
-                <param name="select_process" value="map-shapefile-points"/>
-                <param name="regions" value="points_att_polygon_test_input_1.txt"/>
-                <param name="input_data" value="points_att_polygon_test_input_3.txt"/>
-                <param name="colname_long" value="longitude"/>
-                <param name="colname_lat" value="latitude"/>
-                <param name="colname_value_name" value="transparency_m"/>
-                <param name="colname_region_id" value="HELCOM_ID"/>
+                <conditional name="conditional_process">
+                    <param name="select_process" value="map-shapefile-points"/>
+                    <param name="regions" value="points_att_polygon_test_input_1.txt"/>
+                    <param name="input_data" value="points_att_polygon_test_input_3.txt"/>
+                    <param name="colname_long" value="longitude"/>
+                    <param name="colname_lat" value="latitude"/>
+                    <param name="colname_value_name" value="transparency_m"/>
+                    <param name="colname_region_id" value="HELCOM_ID"/>
+                </conditional>
                 <output name="output_data">
                     <assert_contents>
                         <has_n_lines n="1"/>
--- a/test-data/points_att_polygon_test_input_2.txt	Tue Feb 04 07:10:11 2025 +0000
+++ b/test-data/points_att_polygon_test_input_2.txt	Wed Apr 23 22:25:38 2025 +0000
@@ -1,1 +1,1 @@
-https://aqua.igb-berlin.de/download/testinputs/in_situ_example.xlsx
\ No newline at end of file
+https://vm4072.kaj.pouta.csc.fi/ddas/oapif/collections/lva_secchi/items?f=json&limit=3000
\ No newline at end of file