diff --git a/lofar-cwl/steps/LoSoTo.ClockTec.cwl b/lofar-cwl/steps/LoSoTo.ClockTec.cwl
new file mode 100644
index 0000000000000000000000000000000000000000..6453badf4041d013d150b6c13a3b89832289692d
--- /dev/null
+++ b/lofar-cwl/steps/LoSoTo.ClockTec.cwl
@@ -0,0 +1,103 @@
+#!/usr/bin/env cwl-runner
+
+class: CommandLineTool
+cwlVersion: v1.0
+id: losoto_clocktec
+
+$namespaces:
+  lofar: https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
+doc: |
+  Separate phase solutions into Clock and TEC.
+  The Clock and TEC values are stored in the specified output soltab with type 'clock', 'tec', 'tec3rd'.
+
+requirements:
+  InlineJavascriptRequirement:
+    expressionLib:
+      - { $include: utils.js}
+  InitialWorkDirRequirement:
+    listing:
+      - entryname: 'parset.config'
+        entry: $(get_losoto_config('CLOCKTEC').join('\n'))
+
+      - entryname: $(inputs.input_h5parm.basename)
+        entry: $(inputs.input_h5parm)
+        writable: true
+
+baseCommand: "losoto"
+
+arguments:
+  - '--verbose'
+  - $(inputs.input_h5parm.basename)
+  - parset.config
+
+hints:
+  DockerRequirement:
+    dockerPull: lofareosc/prefactor:HBAcalibrator
+
+inputs:
+  - id: input_h5parm
+    type: File
+    format: lofar:#H5Parm
+  - id: soltab
+    type: string
+    doc: "Solution table"
+  - id: clocksoltabOut
+    doc: output soltab name for clock
+    type: string?
+  - id: tecsoltabOut
+    doc: output soltab name for tec
+    type: string?
+  - id: offsetsoltabOut
+    doc: output soltab name for phase offset
+    type: string?
+  - id: tec3rdsoltabOut
+    doc: output soltab name for tec3rd offset
+    type: string?
+  - id: flagBadChannels
+    type: boolean?
+    doc: Detect and remove bad channel before fitting, by default True.
+  - id: flagCut
+    type: float?
+  - id: chi2cut
+    type: float?
+  - id: combinePol
+    type: boolean?
+    doc: |
+      Find a combined polarization solution, by default False.
+  - id: removePhaseWraps
+    type: boolean?
+    doc: |
+      Detect and remove phase wraps, by default True.
+  - id: fit3rdorder
+    type: boolean?
+    doc: |
+      Fit a 3rd order ionospheric ocmponent (usefult <40 MHz). By default False.
+  - id: circular
+    type: boolean?
+    doc: |
+      Assume circular polarization with FR not removed. By default False.
+  - id: reverse
+    type: boolean?
+    doc:
+      Reverse the time axis. By default False.
+  - id: invertOffset
+    type: boolean?
+    doc: |
+      Invert (reverse the sign of) the phase offsets. By default False. Set to True
+      if you want to use them with the residuals operation.
+
+outputs:
+  - id: output_h5parm
+    type: File
+    format: lofar:#H5Parm
+    outputBinding:
+      glob: $(inputs.input_h5parm.basename)
+  - id: log
+    type: File[]
+    outputBinding:
+      glob: '$(inputs.input_h5parm.basename)-losoto*.log'
+
+stdout: $(inputs.input_h5parm.basename)-losoto.log
+stderr: $(inputs.input_h5parm.basename)-losoto_err.log
+$schema:
+  - https://git.astron.nl/eosc/ontologies/raw/master/schema/lofar.owl
diff --git a/subworkflow/clocktec.cwl b/subworkflow/clocktec.cwl
new file mode 100644
index 0000000000000000000000000000000000000000..24fd219eac4aae763a13aedc3ec6c70674beda42
--- /dev/null
+++ b/subworkflow/clocktec.cwl
@@ -0,0 +1,209 @@
+class: Workflow
+cwlVersion: v1.0
+id: losoto_ion
+label: losoto_ion
+$namespaces:
+  sbg: 'https://www.sevenbridges.com/'
+inputs:
+  - id: input_h5parm
+    type: File
+    'sbg:x': -588.3988647460938
+    'sbg:y': -147.5
+  - id: fit3rdorder
+    type: boolean?
+    'sbg:x': 83.60113525390625
+    'sbg:y': 53.5
+  - id: refAnt
+    type: string?
+    'sbg:x': 500.74346923828125
+    'sbg:y': -382.8847351074219
+  - id: maxStddev
+    type: float?
+    'sbg:x': 374.1950988769531
+    'sbg:y': -308.9609069824219
+outputs:
+  - id: output_h5parm
+    outputSource:
+      - losoto_flagstation/output_h5parm
+    type: File
+    'sbg:x': 775
+    'sbg:y': -169
+  - id: logfiles
+    outputSource:
+      - flag/log
+      - flagextend/log
+      - merge/log
+      - flagextend/log
+      - merge/log
+      - duplicatePbkp/log
+      - losoto_clocktec/log
+      - smooth/logfile
+      - losoto_residual/log
+      - losoto_flagstation/log
+    type: 'File[]'
+    linkMerge: merge_flattened
+    'sbg:x': 775
+    'sbg:y': 169
+steps:
+  - id: flag
+    in:
+      - id: input_h5parm
+        source: input_h5parm
+      - id: soltab
+        default: sol000/amplitude000
+      - id: axesToFlag
+        default:
+          - time
+          - freq
+      - id: order
+        default:
+          - 100
+          - 40
+      - id: maxCycles
+        default: 1
+      - id: maxRms
+        default: 5
+      - id: mode
+        default: smooth
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.Flag.cwl
+    'sbg:x': -442.3984375
+    'sbg:y': -138.5
+  - id: flagextend
+    in:
+      - id: input_h5parm
+        source: flag/output_h5parm
+      - id: soltab
+        default: sol000/amplitude000
+      - id: axesToExt
+        default:
+          - time
+          - freq
+      - id: size
+        default:
+          - 200
+          - 80
+      - id: percent
+        default: 50
+      - id: maxCycles
+        default: 2
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.Flagextend.cwl
+    'sbg:x': -255
+    'sbg:y': -160
+  - id: merge
+    in:
+      - id: input_h5parm
+        source: flagextend/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: mode
+        default: copy
+      - id: soltabImport
+        default: amplitude000
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.Reweight.cwl
+    'sbg:x': -94
+    'sbg:y': -162
+  - id: duplicatePbkp
+    in:
+      - id: input_h5parm
+        source: merge/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: soltabOut
+        default: phaseOrig
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.Duplicate.cwl
+    'sbg:x': 69
+    'sbg:y': -162
+  - id: losoto_flagstation
+    in:
+      - id: input_h5parm
+        source: losoto_residual/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: mode
+        default: bandpass
+      - id: maxStddev
+        source: maxStddev
+      - id: refAnt
+        source: refAnt
+      - id: soltabExport
+        default: clock
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.FlagStation.cwl
+    'sbg:x': 587
+    'sbg:y': -172
+  - id: losoto_clocktec
+    in:
+      - id: input_h5parm
+        source: duplicatePbkp/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: clocksoltabOut
+        default: clock
+      - id: tecsoltabOut
+        default: tec
+      - id: offsetsoltabOut
+        default: phase_offset
+      - id: tec3rdsoltabOut
+        default: tec3rd
+      - id: combinePol
+        default: true
+      - id: fit3rdorder
+        source: fit3rdorder
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.ClockTec.cwl
+    'sbg:x': 217.72296142578125
+    'sbg:y': -230.69259643554688
+  - id: smooth
+    in:
+      - id: input_h5parm
+        source: losoto_clocktec/output_h5parm
+      - id: soltab
+        default: sol000/clock
+      - id: axesToSmooth
+        default:
+          - time
+      - id: mode
+        default: median
+      - id: replace
+        default: true
+      - id: log
+        default: false
+    out:
+      - id: output_h5parm
+      - id: logfile
+    run: ../lofar-cwl/steps/LoSoTo.Smooth.cwl
+    'sbg:x': 301.4368591308594
+    'sbg:y': -51.11399841308594
+  - id: losoto_residual
+    in:
+      - id: input_h5parm
+        source: smooth/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: soltabsToSub
+        source:
+          - fit3rdorder
+        valueFrom: '$(self ? ["tec", "clock", "tec3rd"] : ["tec", "clock"])'
+    out:
+      - id: output_h5parm
+      - id: log
+    run: ../lofar-cwl/steps/LoSoTo.Residual.cwl
+    'sbg:x': 411.0426330566406
+    'sbg:y': -168.98934936523438
+requirements: []
diff --git a/workflows/HBA_calibrator.cwl b/workflows/HBA_calibrator.cwl
index ad68fdbdb72cdfb2709fc070cbde391691b0f967..35432e92bb5f26f42b877ce11751774509e72e13 100644
--- a/workflows/HBA_calibrator.cwl
+++ b/workflows/HBA_calibrator.cwl
@@ -170,26 +170,21 @@ inputs:
     type: File?
     'sbg:x': -1000
     'sbg:y': 1500
-  - id: cal_solutions
-    type: string?
-    default: cal_solutions.h5
-    'sbg:x': -1000
-    'sbg:y': 1600
   - id: avg_timeresolution
     type: float?
     default: 4
     'sbg:x': -1000
-    'sbg:y': 1700
+    'sbg:y': 1600
   - id: avg_freqresolution
     type: string?
     default: 48.82kHz
     'sbg:x': -1000
-    'sbg:y': 1800
+    'sbg:y': 1700
   - id: bandpass_freqresolution
     type: string?
     default: 195.3125kHz
     'sbg:x': -1000
-    'sbg:y': 1900
+    'sbg:y': 1800
 outputs:
   - id: solutions
     outputSource:
@@ -294,8 +289,6 @@ steps:
         source: calibrator_path_skymodel
       - id: A-Team_skymodel
         source: A-Team_skymodel
-      - id: cal_solutions
-        source: cal_solutions
       - id: avg_timeresolution
         source: avg_timeresolution
       - id: avg_freqresolution
diff --git a/workflows/prefactor_calibrator.cwl b/workflows/prefactor_calibrator.cwl
index 18d50c141ff4c20e951a887ec8662fe20dd15d54..a1e71b9c84aaf3d94304123aab9ffaac6f5af7f9 100644
--- a/workflows/prefactor_calibrator.cwl
+++ b/workflows/prefactor_calibrator.cwl
@@ -170,26 +170,21 @@ inputs:
     type: File?
     'sbg:x': -1000
     'sbg:y': 1500
-  - id: cal_solutions
-    type: string?
-    default: cal_solutions.h5
-    'sbg:x': -1000
-    'sbg:y': 1600
   - id: avg_timeresolution
     type: float?
     default: 4
     'sbg:x': -1000
-    'sbg:y': 1700
+    'sbg:y': 1600
   - id: avg_freqresolution
     type: string?
     default: 48.82kHz
     'sbg:x': -1000
-    'sbg:y': 1800
+    'sbg:y': 1700
   - id: bandpass_freqresolution
     type: string?
     default: 195.3125kHz
     'sbg:x': -1000
-    'sbg:y': 1900
+    'sbg:y': 1800
 outputs:
   - id: inspection
     linkMerge: merge_flattened
@@ -198,12 +193,13 @@ outputs:
       - pa/inspection
       - fr/inspection
       - bp/inspection
+      - ion/inspection
     type: File[]
     'sbg:x': 2000
     'sbg:y': -600
   - id: solutions
     outputSource:
-      - bp/outsolutions
+      - ion/outsolutions
     type: File
     'sbg:x': 2000
     'sbg:y': -500
@@ -225,6 +221,7 @@ outputs:
       - pa/logfiles
       - fr/logfiles
       - bp/logfiles
+      - ion/logfiles
     type: 'File[]'
     linkMerge: merge_flattened
     'sbg:x': 2000
@@ -403,5 +400,31 @@ steps:
     label: BP
     'sbg:x': 1000
     'sbg:y': 0
+  - id: ion
+    in:
+      - id: h5parm
+        source:
+          - bp/outh5parm
+      - id: refant
+        source: refant
+      - id: inh5parm_logfile
+        source:
+          - bp/outh5parm_logfile
+      - id: insolutions
+        source: bp/outsolutions
+      - id: maxStddev
+        source: maxStddev
+      - id: ion_3rd
+        source: ion_3rd
+      - id: tables2export
+        source: tables2export
+    out:
+      - id: outsolutions
+      - id: inspection
+      - id: logfiles
+    run: ./prefactor_calibrator/ion.cwl
+    label: ion
+    'sbg:x': 1300
+    'sbg:y': 0
 requirements:
   - class: SubworkflowFeatureRequirement
diff --git a/workflows/prefactor_calibrator/ion.cwl b/workflows/prefactor_calibrator/ion.cwl
new file mode 100644
index 0000000000000000000000000000000000000000..2998d82dad4dd4759c0e485b6eea9f59a22cabc9
--- /dev/null
+++ b/workflows/prefactor_calibrator/ion.cwl
@@ -0,0 +1,382 @@
+class: Workflow
+cwlVersion: v1.0
+id: ion
+label: ion
+$namespaces:
+  sbg: 'https://www.sevenbridges.com/'
+inputs:
+  - id: ion_3rd
+    type: boolean
+    'sbg:x': -1000
+    'sbg:y': 0
+  - id: refant
+    type: string?
+    'sbg:x': -1000
+    'sbg:y': 100
+  - id: h5parm
+    type: File
+    'sbg:x': -1000
+    'sbg:y': 200
+  - id: tables2export
+    type: string
+    'sbg:x': -1000
+    'sbg:y': 300
+  - id: inh5parm_logfile
+    type: 'File[]'
+    'sbg:x': -1000
+    'sbg:y': 400
+  - id: maxStddev
+    type: float
+    'sbg:x': -1000
+    'sbg:y': 500
+  - id: insolutions
+    type: File
+    'sbg:x': -1000
+    'sbg:y': 600
+outputs:
+  - id: inspection
+    outputSource:
+      - losoto_plot_A1/output_plots
+      - losoto_plot_A2/output_plots
+      - losoto_plot_P3/output_plots
+      - losoto_plot_Pd/output_plots
+      - losoto_plot_tec/output_plots
+      - losoto_plot_tec3rd/output_plots
+      - losoto_plot_clock/output_plots
+      - losoto_plot_Pr/output_plots
+      - losoto_plot_Pr3/output_plots
+    type: 'File[]?'
+    linkMerge: merge_flattened
+    'sbg:x': 1000
+    'sbg:y': 0
+  - id: outsolutions
+    outputSource:
+      - write_solutions/outh5parm
+    type: File
+    'sbg:x': 1000
+    'sbg:y': 100
+  - id: logfiles
+    outputSource:
+      - concat_logfiles_ion/output
+    type: 'File[]'
+    linkMerge: merge_flattened
+    'sbg:x': 1000
+    'sbg:y': 200
+steps:
+  - id: clocktec
+    in:
+      - id: input_h5parm
+        source: h5parm
+      - id: maxStddev
+        source: maxStddev
+      - id: fit3rdorder
+        source: ion_3rd
+    out:
+      - id: output_h5parm
+      - id: logfiles
+    run: ../../subworkflow/clocktec.cwl
+    label: clocktec
+    'sbg:x': -500
+    'sbg:y': 0
+  - id: losoto_plot_A1
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/amplitudeOrig000
+      - id: axesInPlot
+        default:
+          - time
+          - freq
+      - id: axisInTable
+        default: ant
+      - id: plotFlag
+        default: true
+      - id: prefix
+        default: ion_ampBFlag_
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_A1
+    'sbg:x': 0
+    'sbg:y': -400
+  - id: losoto_plot_A2
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/amplitude000
+      - id: axesInPlot
+        default:
+          - time
+          - freq
+      - id: axisInTable
+        default: ant
+      - id: plotFlag
+        default: true
+      - id: prefix
+        default: ion_ampAFlag_
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_A2
+    'sbg:x': 0
+    'sbg:y': -300
+  - id: losoto_plot_P3
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/phaseOrig
+      - id: axesInPlot
+        default:
+          - time
+          - freq
+      - id: axisInTable
+        default: ant
+      - id: minmax
+        default:
+          - -3.14
+          - 3.14
+      - id: plotFlag
+        default: true
+      - id: refAnt
+        source: refant
+      - id: prefix
+        default: ion_ph_
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_P3
+    'sbg:x': 0
+    'sbg:y': -200
+  - id: losoto_plot_Pd
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/phaseOrig
+      - id: axesInPlot
+        default:
+          - time
+          - freq
+      - id: axisInTable
+        default: ant
+      - id: axisDiff
+        default: pol
+      - id: minmax
+        default:
+          - -3.14
+          - 3.14
+      - id: plotFlag
+        default: true
+      - id: refAnt
+        source: refant
+      - id: prefix
+        default: ion_ph_poldif
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_Pd
+    'sbg:x': 0
+    'sbg:y': -100
+  - id: losoto_plot_tec
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/tec
+      - id: axesInPlot
+        default:
+          - time
+      - id: axisInTable
+        default: ant
+      - id: plotFlag
+        default: false
+      - id: refAnt
+        source: refant
+      - id: prefix
+        default: tec
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_tec
+    'sbg:x': 0
+    'sbg:y': 0
+  - id: losoto_plot_tec3rd
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        source:
+          - ion_3rd
+        valueFrom: '$(self ? "sol000/tec3rd" : sol000/tec)'
+      - id: axesInPlot
+        default:
+          - time
+      - id: axisInTable
+        default: ant
+      - id: plotFlag
+        default: false
+      - id: refAnt
+        source: refant
+      - id: prefix
+        source:
+          - ion_3rd
+        valueFrom: '$(self ? "tec3rd" : "tec")'
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_tec3rd
+    'sbg:x': 0
+    'sbg:y': 100
+  - id: losoto_plot_clock
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/clock
+      - id: axesInPlot
+        default:
+          - time
+      - id: axisInTable
+        default: ant
+      - id: plotFlag
+        default: false
+      - id: refAnt
+        source: refant
+      - id: prefix
+        default: clock
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_clock
+    'sbg:x': 0
+    'sbg:y': 200
+  - id: losoto_plot_Pr
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: axesInPlot
+        default:
+          - time
+          - freq
+      - id: axisInTable
+        default: ant
+      - id: axisDiff
+        default: pol
+      - id: minmax
+        default:
+          - -3.14
+          - 3.14
+      - id: plotFlag
+        default: true
+      - id: refAnt
+        source: refant
+      - id: prefix
+        default: ion_ph-res_poldif
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_Pr
+    'sbg:x': 0
+    'sbg:y': 300
+  - id: losoto_plot_Pr3
+    in:
+      - id: input_h5parm
+        source: clocktec/output_h5parm
+      - id: soltab
+        default: sol000/phase000
+      - id: axesInPlot
+        default:
+          - time
+          - freq
+      - id: axisInTable
+        default: ant
+      - id: axisInCol
+        default: pol
+      - id: minmax
+        default:
+          - -3.14
+          - 3.14
+      - id: plotFlag
+        default: true
+      - id: refAnt
+        source: refant
+      - id: prefix
+        default: ion_ph-res_
+    out:
+      - id: output_plots
+      - id: logfile
+      - id: parset
+    run: ../../lofar-cwl/steps/LoSoTo.Plot.cwl
+    label: losoto_plot_Pr3
+    'sbg:x': 0
+    'sbg:y': 400
+  - id: concat_logfiles_ion
+    in:
+      - id: file_list
+        linkMerge: merge_flattened
+        source:
+          - inh5parm_logfile
+          - clocktec/logfiles
+          - losoto_plot_A1/logfile
+          - losoto_plot_A2/logfile
+          - losoto_plot_P3/logfile
+          - losoto_plot_Pd/logfile
+          - losoto_plot_tec/logfile
+          - losoto_plot_tec3rd/logfile
+          - losoto_plot_clock/logfile
+          - losoto_plot_Pr/logfile
+          - losoto_plot_Pr3/logfile
+          - write_solutions/log
+      - id: file_prefix
+        default: losoto_ion
+    out:
+      - id: output
+    run: ../../steps/concatenate_files.cwl
+    label: concat_logfiles_ion
+    'sbg:x': 500
+    'sbg:y': 500
+  - id: write_solutions
+    in:
+      - id: h5parmFile
+        source: clocktec/output_h5parm
+      - id: outsolset
+        default: calibrator
+      - id: insoltab
+        source: tables2export
+      - id: input_file
+        source: insolutions
+      - id: squeeze
+        default: true
+      - id: verbose
+        default: true
+    out:
+      - id: outh5parm
+      - id: log
+    run: ../../steps/h5parmcat.cwl
+    label: write_solutions
+    'sbg:x': -200
+    'sbg:y': 700
+requirements:
+  - class: SubworkflowFeatureRequirement
+  - class: MultipleInputFeatureRequirement