---
# System prepended metadata

title: SIRTA Raw-2-SCC automatic data processing Diagram

---

# SIRTA Raw-2-SCC automatic data processing Diagram
# New since April 16 2021, implementation on climserv by MAD


```mermaid
%%{init: {'theme':'forest'}}%%
graph TB


linkStyle default color:#9f6,fill:none,stroke:black,stroke-width:2px;
  climserv --> Read_Headers

  subgraph "climserv Home data"
  temp((storage temp))
  scc_inputs((SCC input files <br/> netcdf))
  scc_outputs((SCC ouput files <br/> netcdf))
  end
  
  subgraph "Climserv SIRTA processing"
     climserv[(climserv server)]
     Read_Headers(Read RM headers <br/> field BT3 <br/> 9th column)
     Read_Headers -- 6 --> DoChoice1[Raman included] --> MPS{MAD Python Sorter} 
     Read_Headers -- 0 --> DoChoice2[Raman excluded] --> MPS{MAD Python Sorter}
     ipral_config_file((Ipral SCC Config. File)) --> |IPRAL configuration <br/> in auto mode <br/> no radiosounding <br/> uses model <br/> mode 0| licel2scc{licel2scc}
     MPS --> raw_prep((fa:fa-folder store files in <br/> 1 folder per hour from <br/> HH-30mn and HH+30mn)) --> temp
     ipral_scc_ref((Ipral SCC input files <br/> ref. ID a1a2a3a4 <br/> a1:mode -0=auto- <br/> a2:scc system <br/> a3a4:HH))
     ipral_scc_ref --> licel2scc
     temp --> licel2scc
     subgraph "Raw2scc script"
        licel2scc -->|a2=0 <br/> system 375 <br/> FR telescope - Raman on | scc_inputs
        licel2scc -->|a2=1 <br/> system 376 <br/> FR telescope - Elastic only | scc_inputs
        licel2scc -->|a2=2 <br/> system 377 <br/> NR - Raman on | scc_inputs
        licel2scc -->|a2=3 <br/> system 378 <br/> NR - Elastic only | scc_inputs
        scc_inputs --> |provide scc input files <br/> & system number| scc_access{SCC_Access}
        scc_access --> scc_outputs
     end
     linkStyle 1 fill:none,stroke:red,stroke-width:2px;
  end

  subgraph "SCC Processing"
      web>WEB Interface] --> web_data(data submission) -- submit input file <br/> to the right SCC system# --> storage[(SCC_server)]
      storage[(SCC_server)] --> code{Processing} --> scc_products((SCC_Products))
      web --> web_sysconfig(SCC IPRAL Configuration <br/> 375=FR w/raman <br/> 376 FR w/o raman <br/> 377 NR w/raman <br/> 378 NR w/o raman) --> code
      scc_access --> web_data
      scc_products --> scc_access
  end

  subgraph "Data preparation"
      col[collect Raw Licel IPRAL binary Files] --> zipfile[1, 3 or more zip]
      zipfile -- extract RM files--> climserv
  end
 
   subgraph "User or Cron on climserv"
     auto((Automatic <br/> processing)) -- date selection --> col
     user((fa:fa-hand-pointer-o User action))
     user --> web_sysconfig 
     user -- date selection --> col
     linkStyle 1 fill:none,stroke:red,stroke-width:2px;
    end

   subgraph "Climserv BDD SIRTA"
     bdd[(BDD SIRTA)] --> raw_ipral((0a / ipral <br/> yyyy/mm/dd)) --> col
     bdd --> chm15k((CHM15K CBH)) --> MPS
   end
 
classDef green fill:#9f6,stroke:#333,stroke-width:2px
classDef orange fill:#f96,stroke:#333,stroke-width:4px
classDef grey fill:#a98,stroke:#333,stroke-width:2px
classDef red fill:#f20,stroke:#333,stroke-width:2px
class user,auto green
class code,MPS,licel2scc,scc_access orange
class storage,bdd,store,climserv grey
class scc_inputs,temp,scc_outputs,raw_prep,scc_products red
```