====== 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 [[kvoss:system:qc2:user:version|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 [[kvoss:system:qc2:requirements|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. **List of options** (last update: 2011-07-13) ^Name to use in the configfuration file ^Type & Default Value ^Description ^ |RunAtMinute|po::value(&RunMinute)->default_value(0)|Minute at which to run the algorithm.| |RunAtHour|po::value(&RunHour)->default_value(2)|Hour at which to run the algorithm.| |Start_YYYY|po::value(&StartYear)->default_value(miutil::miTime::nowTime().year())|Start Year (of the data to process...)| |Start_MM|po::value (&StartMonth)->default_value(miutil::miTime::nowTime().month())|Start Month| |Start_DD|po::value(&StartDay)->default_value(miutil::miTime::nowTime().day())| Start Day| |Start_hh|po::value(&StartHour)->default_value(miutil::miTime::nowTime().hour())|Start Hour| |Start_mm|po::value(&StartMinute)->default_value(0)|Start Minute| |Start_ss|po::value(&StartSecond)->default_value(0)|Start Second| |End_YYYY|po::value(&EndYear)->default_value(miutil::miTime::nowTime().year())|End Year (of the data to process...)| |End_MM|po::value(&EndMonth)->default_value(miutil::miTime::nowTime().month())|End Month| |End_DD|po::value(&EndDay)->default_value(miutil::miTime::nowTime().day())| End Day| |End_hh|po::value(&EndHour)->default_value(miutil::miTime::nowTime().hour())|End Hour| |End_mm|po::value(&EndMinute)->default_value(0)|End Minute| |End_ss|po::value(&EndSecond)->default_value(0)|End Second| |Last_NDays|po::value(&LastN)->default_value(-1)|Last N Days to Run Algorithm (from the latest time)| |Step_YYYY|po::value(&StepYear)->default_value(0)|Step Year (to step through the data interval ...)| |Step_MM|po::value(&StepMonth)->default_value(0)|Step Minute| |Step_DD|po::value(&StepDay)->default_value(0)|Step Day| |Step_hh|po::value(&StepHour)->default_value(0)|Step Hour| |Step_mm|po::value(&StepMinute)->default_value(0)|Step Minute| |Step_ss|po::value(&StepSecond)->default_value(0)|Step Second| |ParamId|po::value(&ParamId)->default_value(0)|Parameter ID| |MaxParamId|po::value(&MaxParamId)->default_value(0)|Parameter ID for a maximum value| |MinParamId|po::value(&MinParamId)->default_value(0)|Parameter ID for a minimum value| |TypeId|po::value(&TypeId)|Type ID| |TypeIds|po::value >(&TypeIds)|One of many Type IDs| |AlgoCode|po::value(&AlgoCode)->default_value(-1)|Algorithm Code| |Algorithm|po::value(&Algorithm)->default_value(NotSet)|Algorithm Name| |InterpCode|po::value(&InterpCode)->default_value(-1)|Code to determine method of interpolation| |ControlString|po::value(&ControlString)|Control Info (not used)| |ControlVector|po::value > (&ControlVector)|Control Vector (not used)| |BestStationFilename|po::value (&BestStationFilename)->default_value(NotSet)|Filename containing the best station list| |ParValFilename|po::value (&ParValFilename)->default_value(NotSet)|Filename containing pairs of paramids and associated values| |FlagsIn|po::value (&FlagsIn)->default_value(NotSet)|Pathname for file containing controlinfo useifno test flag pairs| |FlagsOut|po::value (&FlagsOut)->default_value(NotSet)|Pathname for results of flag tests. | |CfailedString|po::value (&CfailedString)->default_value()|Value to add to CFAILED if the algorithm runs and writes data back to the database| |MissingValue|po::value(&MissingValue)->default_value(-32767.0)|Original Missing Data Value| |RejectedValue|po::value(&RejectedValue)->default_value(-32766.0)|Original Rejected Data Value| |DeltaValue|po::value(&DeltaValue)->default_value(0.0)|Delta Value for Dip Test (can be Øgland's Parameter for example| |MinValue|po::value(&MinValue)->default_value(-32767.0)|Minimum Data Value For Some Controls| |InterpolationDistance|po::value(&InterpolationDistance)->default_value(25)|Nearest Neighbour Limiting Distance| |MaxHalfGap|po::value(&MaxHalfGap)->default_value(0)|Maximum distance from a good neighbour for an Akima Interpolation:| |z_fqclevel|po::value >(&z_fqclevel)|fqclevel [GENERAL FILTER]| |z_fr|po::value >(&z_fr)|fr| |z_fcc|po::value >(&z_fcc)|fcc| |z_fs|po::value >(&z_fs)|fs| |z_fnum|po::value >(&z_fnum)|fnum| |z_fpos|po::value >(&z_fpos)|fpos| |z_fmis|po::value >(&z_fmis)|fmis| |z_ftime|po::value >(&z_ftime)|ftime| |z_fw|po::value >(&z_fw)|fw| |z_fstat|po::value >(&z_fstat)|fstat| |z_fcp|po::value >(&z_fcp)|fcp| |z_fclim|po::value >(&z_fclim)|fclim| |z_fd|po::value >(&z_fd)|fd| |z_fpre|po::value >(&z_fpre)|fpre| |z_fcombi|po::value >(&z_fcombi)|fcombi| |z_fhqc|po::value >(&z_fhqc)|fhqc| |zbool|po::value(&zbool)->default_value(true)|Option to change logic of all flag controls| |R_fqclevel|po::value >(&R_fqclevel)|fqclevel [FILTER for Reading Data]| |R_fr|po::value >(&R_fr)|fr| |R_fcc|po::value >(&R_fcc)|fcc| |R_fs|po::value >(&R_fs)|fs| |R_fnum|po::value >(&R_fnum)|fnum| |R_fpos|po::value >(&R_fpos)|fpos| |R_fmis|po::value >(&R_fmis)|fmis| |R_ftime|po::value >(&R_ftime)|ftime| |R_fw|po::value >(&R_fw)|fw| |R_fstat|po::value >(&R_fstat)|fstat| |R_fcp|po::value >(&R_fcp)|fcp| |R_fclim|po::value >(&R_fclim)|fclim| |R_fd|po::value >(&R_fd)|fd| |R_fpre|po::value >(&R_fpre)|fpre| |R_fcombi|po::value >(&R_fcombi)|fcombi| |R_fhqc|po::value >(&R_fhqc)|fhqc| |Rbool|po::value(&Rbool)->default_value(true)|Option to change logic of all flag controls| |I_fqclevel|po::value >(&I_fqclevel)|fqclevel [FILTER for Intrpolating Data]| |I_fr|po::value >(&I_fr)|fr| |I_fcc|po::value >(&I_fcc)|fcc| |I_fs|po::value >(&I_fs)|fs| |I_fnum|po::value >(&I_fnum)|fnum| |I_fpos|po::value >(&I_fpos)|fpos| |I_fmis|po::value >(&I_fmis)|fmis| |I_ftime|po::value >(&I_ftime)|ftime| |I_fw|po::value >(&I_fw)|fw| |I_fstat|po::value >(&I_fstat)|fstat| |I_fcp|po::value >(&I_fcp)|fcp| |I_fclim|po::value >(&I_fclim)|fclim| |I_fd|po::value >(&I_fd)|fd| |I_fpre|po::value >(&I_fpre)|fpre| |I_fcombi|po::value >(&I_fcombi)|fcombi| |I_fhqc|po::value >(&I_fhqc)|fhqc| |Ibool|po::value(&Ibool)->default_value(true)|Option to change logic of all flag controls| |A_fqclevel|po::value >(&A_fqclevel)|fqclevel [FILTER for applying Algorithm]| |A_fr|po::value >(&A_fr)|fr| |A_fcc|po::value >(&A_fcc)|fcc| |A_fs|po::value >(&A_fs)|fs| |A_fnum|po::value >(&A_fnum)|fnum| |A_fpos|po::value >(&A_fpos)|fpos| |A_fmis|po::value >(&A_fmis)|fmis| |A_ftime|po::value >(&A_ftime)|ftime| |A_fw|po::value >(&A_fw)|fw| |A_fstat|po::value >(&A_fstat)|fstat| |A_fcp|po::value >(&A_fcp)|fcp| |A_fclim|po::value >(&A_fclim)|fclim| |A_fd|po::value >(&A_fd)|fd| |A_fpre|po::value >(&A_fpre)|fpre| |A_fcombi|po::value >(&A_fcombi)|fcombi| |A_fhqc|po::value >(&A_fhqc)|fhqc| |Abool|po::value(&Abool)->default_value(true)|Option to change logic of all flag controls| |Not_fqclevel|po::value >(&Not_fqclevel)|fqclevel [FILTER for not applying the Algorithm]| |Not_fr|po::value >(&Not_fr)|fr| |Not_fcc|po::value >(&Not_fcc)|fcc| |Not_fs|po::value >(&Not_fs)|fs| |Not_fnum|po::value >(&Not_fnum)|fnum| |Not_fpos|po::value >(&Not_fpos)|fpos| |Not_fmis|po::value >(&Not_fmis)|fmis| |Not_ftime|po::value >(&Not_ftime)|ftime| |Not_fw|po::value >(&Not_fw)|fw| |Not_fstat|po::value >(&Not_fstat)|fstat| |Not_fcp|po::value >(&Not_fcp)|fcp| |Not_fclim|po::value >(&Not_fclim)|fclim| |Not_fd|po::value >(&Not_fd)|fd| |Not_fpre|po::value >(&Not_fpre)|fpre| |Not_fcombi|po::value >(&Not_fcombi)|fcombi| |Not_fhqc|po::value >(&Not_fhqc)|fhqc| |Notbool|po::value(&Notbool)->default_value(true)|Option to change logic of all flag controls| |U_0|po::value >(&U_0)|f0 [FILTER applied to the Useinfo for applying the ALgorithm.]| |U_1|po::value >(&U_1)|f1| |U_2|po::value >(&U_2)|f2| |U_3|po::value >(&U_3)|f3| |U_4|po::value >(&U_4)|f4| |U_5|po::value >(&U_5)|f5| |U_6|po::value >(&U_6)|f6| |U_7|po::value >(&U_7)|f7| |U_8|po::value >(&U_8)|f8| |U_9|po::value >(&U_9)|f9| |U_10|po::value >(&U_10)|f10| |U_11|po::value >(&U_11)|f11| |U_12|po::value >(&U_12)|f12| |U_13|po::value >(&U_13)|f13| |U_14|po::value >(&U_14)|f14| |U_15|po::value >(&U_15)|f15| |Ubool|po::value(&Ubool)->default_value(true)|Option to change logic of all flag controls| |NotU_0|po::value >(&NotU_0)|f0 [FILTER applied to the Useinfo for not applying the ALgorithm.]| |NotU_1|po::value >(&NotU_1)|f1| |NotU_2|po::value >(&NotU_2)|f2| |NotU_3|po::value >(&NotU_3)|f3| |NotU_4|po::value >(&NotU_4)|f4| |NotU_5|po::value >(&NotU_5)|f5| |NotU_6|po::value >(&NotU_6)|f6| |NotU_7|po::value >(&NotU_7)|f7| |NotU_8|po::value >(&NotU_8)|f8| |NotU_9|po::value >(&NotU_9)|f9| |NotU_10|po::value >(&NotU_10)|f10| |NotU_11|po::value >(&NotU_11)|f11| |NotU_12|po::value >(&NotU_12)|f12| |NotU_13|po::value >(&NotU_13)|f13| |NotU_14|po::value >(&NotU_14)|f14| |NotU_15|po::value >(&NotU_15)|f15| |NotUbool|po::value(&NotUbool)->default_value(true)|Option to change logic of all flag controls| |W_fqclevel|po::value >(&W_fqclevel)|fqclevel [FILTER for Writing results back to the DataBase]| |W_fr|po::value >(&W_fr)|fr| |W_fcc|po::value >(&W_fcc)|fcc| |W_fs|po::value >(&W_fs)|fs| |W_fnum|po::value >(&W_fnum)|fnum| |W_fpos|po::value >(&W_fpos)|fpos| |W_fmis|po::value >(&W_fmis)|fmis| |W_ftime|po::value >(&W_ftime)|ftime| |W_fw|po::value >(&W_fw)|fw| |W_fstat|po::value >(&W_fstat)|fstat| |W_fcp|po::value >(&W_fcp)|fcp| |W_fclim|po::value >(&W_fclim)|fclim| |W_fd|po::value >(&W_fd)|fd| |W_fpre|po::value >(&W_fpre)|fpre| |W_fcombi|po::value >(&W_fcombi)|fcombi| |W_fhqc|po::value >(&W_fhqc)|fhqc| |Wbool|po::value(&Wbool)->default_value(true)|Option to change logic of all flag controls| |S_fqclevel|po::value(&S_fqclevel)->default_value(0x3F)|fqclevel [Controlinfo to set for the controlled datum]| |S_fr|po::value(&S_fr)->default_value(0x3F)|fr| |S_fcc|po::value(&S_fcc)->default_value(0x3F)|fcc| |S_fs|po::value(&S_fs)->default_value(0x3F)|fs| |S_fnum|po::value(&S_fnum)->default_value(0x3F)|fnum| |S_fpos|po::value(&S_fpos)->default_value(0x3F)|fpos| |S_fmis|po::value(&S_fmis)->default_value(0x3F)|fmis| |S_ftime|po::value(&S_ftime)->default_value(0x3F)|ftime| |S_fw|po::value(&S_fw)->default_value(0x3F)|fw| |S_fstat|po::value(&S_fstat)->default_value(0x3F)|fstat| |S_fcp|po::value(&S_fcp)->default_value(0x3F)|fcp| |S_fclim|po::value(&S_fclim)->default_value(0x3F)|fclim| |S_fd|po::value(&S_fd)->default_value(0x3F)|fd| |S_fpre|po::value(&S_fpre)->default_value(0x3F)|fpre| |S_fcombi|po::value(&S_fcombi)->default_value(0x3F)|fcombi| |S_fhqc|po::value(&S_fhqc)->default_value(0x3F)|fhqc| |change_fqclevel|po::value >(&change_fqclevel)|Conditional change to fqclevel| |change_fr|po::value >(&change_fr)|Conditional change to fr| |change_fcc|po::value >(&change_fcc)|Conditional change to fcc| |change_fs|po::value >(&change_fs)|Conditional change to fs| |change_fnum|po::value >(&change_fnum)|Conditional change to fnum| |change_fpos|po::value >(&change_fpos)|Conditional change to fpos| |change_fmis|po::value >(&change_fmis)|Conditional change to fmis| |change_ftime|po::value >(&change_ftime)|Conditional change to ftime| |change_fw|po::value >(&change_fw)|Conditional change to fw| |change_fstat|po::value >(&change_fstat)|Conditional change to fstat| |change_fcp|po::value >(&change_fcp)|Conditional change to fcp| |change_fclim|po::value >(&change_fclim)|Conditional change to fclim| |change_fd|po::value >(&change_fd)|Conditional change to fd| |change_fpre|po::value >(&change_fpre)|Conditional change to fpre| |change_fcombi|po::value >(&change_fcombi)|Conditional change to fcombi| |change_fhqc|po::value >(&change_fhqc)|Conditional change to fhqc| |V_fqclevel|po::value >(&V_fqclevel)|fqclevel [Additional vector for controlinfo controls (not used)]| |V_fr|po::value >(&V_fr)|fr| |V_fcc|po::value >(&V_fcc)|fcc| |V_fs|po::value >(&V_fs)|fs| |V_fnum|po::value >(&V_fnum)|fnum| |V_fpos|po::value >(&V_fpos)|fpos| |V_fmis|po::value >(&V_fmis)|fmis| |V_ftime|po::value >(&V_ftime)|ftime| |V_fw|po::value >(&V_fw)|fw| |V_fstat|po::value >(&V_fstat)|fstat| |V_fcp|po::value >(&V_fcp)|fcp| |V_fclim|po::value >(&V_fclim)|fclim| |V_fd|po::value >(&V_fd)|fd| |V_fpre|po::value >(&V_fpre)|fpre| |V_fcombi|po::value >(&V_fcombi)|fcombi| |V_fhqc|po::value >(&V_fhqc)|fhqc|