I just noticed that I always forgot to #define BGQC. The reason I forgot is because in the output it always says:
Code: Select all
Variable IstrObs IendObs Count Rejected
temp 1 19 19 1
salt 20 38 19 1
Total 38 2
Obs Tally 38 2
This output suggests to me that these data have been excluded from the computation, but they are not unless BGQC is defined.
Now I looked at the first inner loop results of the adjoint before the conversion to v-space, and finally realized that the values don't make sense.
The reason it took me so long is because the RBL4DVAR results look fine, even if I don't define BGQC. I looked at ad_misfit.F (I4DVAR) and ad_htobs.F (RBL4DVAR) and both contain something like
Code: Select all
# ifdef BGQC
!
! Reject observation that fail background quality control check.
!
DO iobs=Mstr,Mend
ADmodVal(iobs)=ObsScale(iobs)*ADmodVal(iobs)
END DO
# endif
Edit:
see also here:
viewtopic.php?t=6535