Commit 326ffd9e authored by Miguel Tremblay's avatar Miguel Tremblay
Browse files

Remove two verifications that are catched before in QC process (0 or 1 valid observations).

parent 41dcf172
......@@ -288,7 +288,8 @@ class Metro_preprocess_qa_qc_observation(Metro_preprocess):
if sStart_time == "":
return
# Check if the observation are not before the start of the roadcast if specified.
# Check if the observation are not before the start of the roadcast
# if specified.
fStart_time = metro_date.parse_date_string(sStart_time)
npOT = ro_controlled_data.get_matrix_col('Time')\
+nHourStart*3600
......@@ -415,22 +416,16 @@ class Metro_preprocess_qa_qc_observation(Metro_preprocess):
/metro_constant.fTimeStep
# Initialize the boolean field
bNoObs = [0, 0, 0, 0]
bNoObs = [0, 0]
# Check if there is any data for initialisation
fDeltaT = observation_data.get_attribute('DELTA_T')
# If the beginning of the
if fDeltaT <= 0:
bNoObs[0] = 1
# Less than 3 hours of observation
if nNbr30Seconds-fDeltaT*3600/30. < metro_constant.nThreeHours*3600/30:
bNoObs[1] = 1
# No valid observation
if len(npAT) == 0:
bNoObs[2] = 1
# One valid observation
if len(npAT) == 1:
bNoObs[3] = 1
# Set the variable
observation_data.set_attribute('NO_OBS',bNoObs)
......
......@@ -245,21 +245,15 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
/***********************************************************************/
/* Coupling is different if there is more or less than 3 hours. */
if(bpNoObs[2]){
goto liberation;
}
else if(bpNoObs[3]){
if(!bSilent)
printf(" Only one valid observation: No initialization nor coupling.\n");
f77name(makitp)(dpItp, &stTemperatureDepth.nSize, &nIR40, &bFlat,\
&(dpTimeO[0]), &(dpRTO[0]), &(dpDTO[0]), &(dpTAO[0]),\
&dDiff, &dMLon, npSwo, stTemperatureDepth.pdArray);
nNtp2 = nLenObservation - nDeltaTIndice;
}
else if(bpNoObs[1]){
/***********************************************************************/
if(bpNoObs[1]){
/* less than 3 hours of observation in the coupling */
if(!bSilent)
printf(" Not enough data for coupling.\n");
if(!bSilent){
printf("Less than 3 hours of overlap between the\n");
printf("forecast and the road observations. Not enough ");
printf("data for coupling.\n");
}
f77name(makitp)(dpItp, &stTemperatureDepth.nSize, &nIR40, &bFlat, &(dpTimeO[0]),\
&(dpRTO[0]), &(dpDTO[0]), &(dpTAO[0]), &dDiff, \
&dMLon, npSwo, stTemperatureDepth.pdArray);
......@@ -304,7 +298,7 @@ void Do_Metro( BOOL bFlat, double dMLat, double dMLon, double* dpZones, long nNb
&nIR40, &bFlat, npSwo, dpCapacity, dpConductivity);
}
}
else{/* observation complete */
else{/* Complete observations */
if(!bSilent)
printf("Complete observations\n");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment