@startuml sarwind-component-diagram
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

LAYOUT_TOP_DOWN()
'LAYOUT_LEFT_RIGHT()

System_Ext(nbs, "NBS", "Norwegian ground segment for Sentinel data.")
SystemDb_Ext(met_storage, "Data storage", "Lustre file system.")

Container(broker, "Broker", "cron/bash/python", "Broker system to listen for messages about new SAR datasets and start processing chain. Probably only requires the MMD data access field.")

Container_Boundary(sarwind, "SAR wind"){

  Component(hh2vv, "HH2VV function", "Python", "Convert from HH to VV polarization, using PR from Lin Ren, Jingsong Yang, Alexis Mouche, et al. (2017; remote sensing).")
  Component(nansat, "Nansat software", "Python", "Reads and calibrates SAR data in SAFE format to sigma nought, generates full resolution incidence angles etc. Also reads any NetCDF-CF compliant data, such as Arome-Arctic.")
  Component(swbroker, "Broker", "Python", "Organizes the wind processing workflow.")

  Component(flagger, "Flagging tool", "Python", "Flags pixels with large deviations from other source wind fields (e.g., models, scatterometers)")

}

Rel(broker, sarwind, "starts SAR wind processing in")

Rel(sarwind, broker, "returns filename to")
Rel(swbroker, nbs, "uses geolocation tool for SAFE files in")

Rel(sarwind, met_storage, "stores result file (NetCDF-CF) in")

SHOW_LEGEND()

@enduml
