[Dart-dev] [8880] DART/trunk/models/clm/model_mod.f90: Fixed logic in FindVarIndex() . ..
nancy at ucar.edu
nancy at ucar.edu
Wed Oct 21 14:10:33 MDT 2015
Revision: 8880
Author: thoar
Date: 2015-10-21 14:10:33 -0600 (Wed, 21 Oct 2015)
Log Message:
-----------
Fixed logic in FindVarIndex() ... could not possibly have exited correctly if the variable was not found.
The upshot is that if the target variable was not part of the DART state, the _last_ variable
in the DART state would have been used for the forward observation operator!
This would have undoubtedly resulted in outlier rejection ...
Modified Paths:
--------------
DART/trunk/models/clm/model_mod.f90
-------------- next part --------------
Modified: DART/trunk/models/clm/model_mod.f90
===================================================================
--- DART/trunk/models/clm/model_mod.f90 2015-10-21 19:03:57 UTC (rev 8879)
+++ DART/trunk/models/clm/model_mod.f90 2015-10-21 20:10:33 UTC (rev 8880)
@@ -4635,8 +4635,10 @@
! Skip to the right variable
VARTYPES : do i = 1,nfields
- findVarIndex = i
- if ( trim(progvar(i)%varname) == varstring) exit VARTYPES
+ if ( trim(progvar(i)%varname) == varstring) then
+ findVarIndex = i
+ exit VARTYPES
+ endif
enddo VARTYPES
if (findVarIndex < 1) then
More information about the Dart-dev
mailing list