﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
253	Temporal separation error in 1dvar produced when times are identical	cburrows	cburrows	"ropp_1dvar_bangle rejects an observation/background pair if the temporal separation between them is greater than 2 hours.  The error message is:

''ERROR (from ropp_qc_genqc):  Temporal separation between observations and background profile exceeds upper limit''

The background time currently used in the comparison is the ""VT"" time, and for ECMWF backgrounds (from the GARF server), this is always 00Z or 12Z.  Hence, all occultations occurring between 02Z and 10Z, and between 14Z and 22Z are currently being rejected by ROPP.

The order of key operations is here:

 * [https://trac.grassaf.org/ropp/browser/ropp_src/trunk/ropp_1dvar/tools/ropp_1dvar_bangle.f90 ropp_1dvar_bangle] calls [https://trac.grassaf.org/ropp/browser/ropp_src/trunk/ropp_io/ropp/ropp_io_read.f90 ropp_io_read] for both the observation and background file
 * For the observation file, the date/time is read into obs_data%DTocc%Hour (and Day, Min etc).  For the background file, the ""VT"" time is read into bg_data%BG%Hour etc.
 * For the observation, [https://trac.grassaf.org/ropp/browser/ropp_src/trunk/ropp_fm/common/ropp_fm_roprof2obs.f90 ropp_fm_roprof2obs] is called and obs%time is calculated based on obs_data%DTocc%Hour etc.
 * For the background, [https://trac.grassaf.org/ropp/browser/ropp_src/trunk/ropp_fm/common/ropp_fm_roprof2state.f90 ropp_fm_roprof2state] is called and bg%time is calculated based on bg_data%BG%Hour etc.
 * Back at the ropp_1dvar_bangle level, [https://trac.grassaf.org/ropp/browser/ropp_src/trunk/ropp_1dvar/qc/ropp_qc_genqc.f90 ropp_qc_genqc] is called for QC.  At line 180 and onwards (rev2511), the temporal separation is calculated as follows: dtime = ABS(bg%time - obs%time), i.e. the occultation time is being compared to the time of the background cycle and hence is often failing.

The fix would be to replace bg%time with the variable describing the time the background is calculated ''for''.

Note that this problem applies to refractivity calculations also
"	defect	closed	normal	6.0	ROPP (all)	5.0	fixed		Ian Culverwell
