wustl_consolidate_components.cwl

 1#!/usr/bin/env cwl-runner
 2###
 3#  Copyright (c) 2021. Harvard University
 4#
 5#  Developed by Research Software Engineering,
 6#  Faculty of Arts and Sciences, Research Computing (FAS RC)
 7#  Author: Michael A Bouzinier
 8#
 9#  Licensed under the Apache License, Version 2.0 (the "License");
10#  you may not use this file except in compliance with the License.
11#  You may obtain a copy of the License at
12#
13#         http://www.apache.org/licenses/LICENSE-2.0
14#
15#  Unless required by applicable law or agreed to in writing, software
16#  distributed under the License is distributed on an "AS IS" BASIS,
17#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18#  See the License for the specific language governing permissions and
19#  limitations under the License.
20#
21
22cwlVersion: v1.2
23class: CommandLineTool
24baseCommand: [python, -mdorieh.rasters.netCDF_components_consolidator]
25
26requirements:
27  InlineJavascriptRequirement: {}
28  ResourceRequirement:
29    # coresMin: 1
30    coresMax: 4
31    outdirMin: 3072
32
33
34doc: |
35  Given a NetCDF file with absolute values (e.g., for PM25) and a set of 
36  NetCDF files containing percentage values for individual components,  
37  this tool consolidates all data into a single NetCDF file with both
38  percentages and absolute values for all components.
39
40inputs:
41  abs_values:
42    type: File[]
43    doc: "Path to downloaded file with absolute values"
44    inputBinding:
45      prefix: --input
46  components:
47    type: File[]
48    doc: "Paths to component files"
49    inputBinding:
50      prefix: --components
51
52arguments:
53  - valueFrom: "."
54    prefix: --output
55
56outputs:
57  log:
58    type: File?
59    outputBinding:
60      glob: "*.log"
61  consolidated_data:
62    type: File
63    outputBinding:
64      glob:
65        - "*.tif*"
66        - "**/*.tif*"
67    doc: |
68      The output NetCDF file, containing absolute values for the given
69      components
70  errors:
71    type: stderr
72
73stderr: $("consolidate-" + inputs.abs_values.nameroot + ".err")