This is an old revision of the document!
Configuration files
The QC2 software utilises Boost.Program_Options as the user control for setting the parameters and checks to be run. All options are held in external configuration files. For the standard setup the configuration files are stored in /etc/kvalobs/Qc2Config and must have the suffix “.cfg” appended to the name.
The contents of the configuration file directory are scanned every minute. Information about when an algorithm is to be run is held in the configuration files, if the current time matches this time, QC2 will execute the algorithm pointed to by the configuration file. The prototype will not check for additional algorithms to be run until the current task is finished.
See version details for specific examples of configuration files.
The configuration files comprise name value pairs, an example is provided below:
AlgoCode=1 InterpCode=3 RunAtHour=20 RunAtMinute=30 #[Time Range] Start_YYYY=2007 Start_MM=5 Start_DD=31 Start_hh=6 Start_mm=0 Start_ss=0 End_YYYY=2007 End_MM=12 End_DD=31 End_hh=6 End_mm=0 End_ss=0 #[Time Step] Step_DD=1 #[Specific Data Type and Paramters ids etc.] ParamId=110 TypeId=302 ParamId=110 TypeId=302 # Only write data it it has not been analysed by HQC W_fhqc=0 # Condition for running the algorithm A_fd=2
The above configuration file will run the algorithm which has the id=1 to be run every day at 20:30 UTC.
Parameters
Controlflags ControlFlags set by Qc1 or other Qc2 algorithms are used to manage the operation of each Qc2 algorithm. Five different steps are identified and for each different controlflags can be specified to control the step. There must be corresponding logic in the Qc2 algorithm for each flag specified.
The five steps in which controlflags may be checked are:
- READ: controlflag settings to filter which data is read
- INTERPOLATE: control flag settings to determine if a model value shall be interpolated
- ALGORITHM: control flag settings to determine if the algorithm shall be run
- SET: the control flag values to set if an algorithm is successful
- WRITE: control flag settings to determine if the result sshall be written to the database
The corresponding names of the controlflags are:
- READ: R_fqclevel,R_fr,R_fcc,R_fs,R_fnum,R_fpos,R_fmis,R_ftime,R_fw,R_fstat,R_fcp,R_fclim,R_fd,R_fpre,R_fcombi,R_fhqc
- INTERPOLATE: I_fqclevel,I_fr,I_fcc,I_fs,I_fnum,I_fpos,I_fmis,I_ftime,I_fw,I_fstat,I_fcp,I_fclim,I_fd,I_fpre,I_fcombi,I_fhqc
- ALGORITHM: A_fqclevel,A_fr,A_fcc,A_fs,A_fnum,A_fpos,A_fmis,A_ftime,A_fw,A_fstat,A_fcp,A_fclim,A_fd,A_fpre,A_fcombi,A_fhqc
- WRITE: W_fqclevel,W_fr,W_fcc,W_fs,W_fnum,W_fpos,W_fmis,W_ftime,W_fw,W_fstat,W_fcp,W_fclim,W_fd,W_fpre,W_fcombi,W_fhqc
- SET: S_fqclevel,S_fr,S_fcc,S_fs,S_fnum,S_fpos,S_fmis,S_ftime,S_fw,S_fstat,S_fcp,S_fclim,S_fd,S_fpre,S_fcombi,S_fhqc
Only parameters required by the algorithm need to be specified.