cwlVersion: v1.2 $namespaces: s: https://schema.org/ cwltool: http://commonwl.org/cwltool# edam: http://edamontology.org/ $graph: - class: Workflow id: bathymetry_pipeline inputs: lon_min: type: float label: Minimum Longitude doc: The minimum longitude of the study area lon_max: type: float label: Maximum Longitude doc: The maximum longitude of the study area lat_min: type: float label: Minimum Latitude doc: The minimum latitude of the study area lat_max: type: float label: Maximum Latitude doc: The maximum latitude of the study area endpoint: type: string? doc: S3 storage endpoint region: type: string? doc: S3 storage region access_key: type: string? doc: S3 storage access_key secret_key: type: string? doc: S3 storage secret_key session_token: type: string? doc: S3 storage region bucket: type: string? doc: S3 storage bucket base_path: type: string? doc: S3 storage final directory name default: bathymetry_pipeline steps: step_bathymetry: run: '#bathymetry' in: lon_min: lon_min lon_max: lon_max lat_min: lat_min lat_max: lat_max out: - result - metadata step_2stac: run: '#2stac' in: result: step_bathymetry/result metadata: step_bathymetry/metadata out: - results step_2s3: run: '#2s3' when: $(inputs.endpoint != null && inputs.endpoint != "") in: region: region endpoint: endpoint access_key: access_key secret_key: secret_key session_token: session_token bucket: bucket directory: step_2stac/results base_path: base_path out: - base_path outputs: - id: wf_outputs outputSource: - step_2stac/results type: Directory hints: cwltool:Secrets: secrets: - access_key - secret_key - session_token requirements: InlineJavascriptRequirement: {} s:name: bathymetry_pipeline s:description: > This pipeline crops the bathymetry for a given area, transforms the result to STAC format and stores the results in a S3 bucket. The step of saving the results to S3 is optional: if the input endpoint is not set, the S3 step is skipped. s:keywords: - bathymetry - stac s:softwareVersion: 10.3.0 s:sourceOrganization: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: >- https://pipe-drive.inesctec.pt/application-packages/workflows/bathymetry-pipeline/bathymetry_pipeline_10_3_0.cwl s:dateCreated: '2025-02-13T10:49:29Z' - class: CommandLineTool id: bathymetry baseCommand: python arguments: - /opt/bathymetry.py - '--lon_min' - valueFrom: $( inputs.lon_min ) - '--lon_max' - valueFrom: $( inputs.lon_max ) - '--lat_min' - valueFrom: $( inputs.lat_min ) - '--lat_max' - valueFrom: $( inputs.lat_max ) inputs: lon_min: type: float doc: The minimum longitude of the study area. lon_max: type: float doc: The maximum longitude of the study area. lat_min: type: float doc: The minimum latitude of the study area. lat_max: type: float doc: The maximum latitude of the study area. outputs: result: format: edam:format_3650 type: File outputBinding: glob: result/out.nc doc: | The output NetCDF file generated by the bathymetry model. The file is in the OGC NetCDF media type. metadata: format: edam:format_3464 type: File outputBinding: glob: result/metadata.json doc: metadata description requirements: NetworkAccess: networkAccess: true EnvVarRequirement: envDef: PATH: >- /opt/conda/envs/application/bin:/opt/conda/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/bathymetry-forth:0.2.0 s:name: bathymetry s:description: Get bathymetry to a given bounding box. You can define an outside source. s:keywords: - bathymetry - bounding box s:softwareVersion: 0.2.0 s:programmingLanguage: python s:sourceOrganization: class: s:Organization s:name: FORTH s:url: https://forth.gr s:address: class: s:PostalAddress s:addressCountry: GR s:author: class: s:Person s:email: kspanoudaki@gmail.com s:name: Katerina Spanoudaki s:contributor: class: s:Person s:email: miguel.r.correia@inesctec.pt s:name: Miguel Correia s:codeRepository: >- https://pipe-drive.inesctec.pt/application-packages/tools/bathymetry-forth/bathymetry_forth_0_2_0.cwl s:dateCreated: '2025-02-07T17:02:04Z' - class: CommandLineTool id: 2stac baseCommand: python arguments: - /opt/2stac.py - '--result' - valueFrom: $( inputs.result ) - '--metadata' - valueFrom: $( inputs.metadata ) inputs: result: type: File doc: The resulting file of the previous model to insert in STAC metadata: format: edam:format_3464 type: File doc: The resulting metadata of the previous model to insert in STAC outputs: results: outputBinding: glob: . type: Directory doc: STAC output requirements: ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/2stac:0.2.0 s:name: 2stac s:softwareVersion: 0.2.0 s:description: Transform the result into a STAC s:keywords: - stac - metadata s:programmingLanguage: python s:sourceOrganization: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: >- https://pipe-drive.inesctec.pt/application-packages/tools/2stac/2stac_0_2_0.cwl s:dateCreated: '2025-02-07T16:53:16Z' - class: CommandLineTool id: 2s3 baseCommand: python arguments: - /opt/2s3.py - '--endpoint' - valueFrom: $( inputs.endpoint ) - '--access_key' - valueFrom: $( inputs.access_key ) - '--secret_key' - valueFrom: $( inputs.secret_key ) - '--bucket' - valueFrom: $( inputs.bucket ) - '--endpoint' - valueFrom: $( inputs.endpoint ) - valueFrom: >- $( function () { if (inputs.region) { return ["--region", inputs.region]; } else { return []; } }()) - valueFrom: >- $( function () { if (inputs.base_path) { return ["--base_path", `${inputs.base_path}_${new Date().toISOString().replace(/:/g, '').replace(/\-/g, '').split('.')[0]}`]; } else { return []; } }()) - valueFrom: >- $( function () { if (inputs.session_token) { return ["--session_token", inputs.session_token]; } else { return []; } }()) - valueFrom: >- $( function () { if(inputs.files) { var files_array = []; Object.keys(inputs.files).forEach(function (element) { files_array.push('--file'); files_array.push(inputs.files[element]); }); return files_array; } else { return []; } }()) - valueFrom: >- $( function () { if(inputs.directories) { var directories_array = []; Object.keys(inputs.directories).forEach(function (element) { directories_array.push('--directory'); directories_array.push(inputs.directories[element]); }); return directories_array; } else { return []; } }()) - valueFrom: >- $( function () { if(inputs.file) { return ['--file', inputs.file]; } else { return []; } }()) - valueFrom: >- $( function () { if(inputs.directory) { return ['--directory', inputs.directory]; } else { return []; } }()) inputs: endpoint: type: string? doc: S3 storage endpoint region: type: string? doc: S3 storage region access_key: type: string? doc: S3 storage access_key secret_key: type: string? doc: S3 storage secret_key session_token: type: string? doc: S3 storage region bucket: type: string? doc: S3 storage bucket base_path: type: string? doc: S3 storage final directory name files: type: File[]? doc: Multiple files to upload directories: type: Directory[]? doc: Multiple directories to upload directory: type: Directory? doc: Single directory to upload file: type: File? doc: Single file to upload outputs: base_path: type: string requirements: NetworkAccess: networkAccess: true ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/2s3:0.2.0 hints: cwltool:Secrets: secrets: - access_key - secret_key - session_token s:name: 2s3 s:description: Uploads files and/or folders to a S3 bucket storage. s:keywords: - s3 - storage s:programmingLanguage: python s:softwareVersion: 0.2.0 s:sourceOrganization: class: s:Organization s:name: INESCTEC s:url: https://inesctec.pt s:address: class: s:PostalAddress s:addressCountry: PT s:author: class: s:Person s:name: Miguel Correia s:email: miguel.r.correia@inesctec.pt s:codeRepository: >- https://pipe-drive.inesctec.pt/application-packages/tools/2s3/2s3_0_2_0.cwl s:dateCreated: '2025-02-07T16:52:37Z'