[Dart-dev] [4740] DART/trunk/observations/NCEP/ascii_to_obs/real_obs_mod.f90: Fix two problems:

nancy at ucar.edu nancy at ucar.edu
Tue Feb 22 08:59:43 MST 2011


Revision: 4740
Author:   nancy
Date:     2011-02-22 08:59:43 -0700 (Tue, 22 Feb 2011)
Log Message:
-----------
Fix two problems: 
1) initialize the uninitialized 'first_obs', and
2) set the time_obs variable before it is used.  
Symptom was randomly the insert of a new obs would fail.  
No bad obs files were created as a result of this bug 
(time_obs was only used to optimize the insert, and
not used when setting the actual observation time).
Thanks to Russ Schumacher for pointing this out.

Modified Paths:
--------------
    DART/trunk/observations/NCEP/ascii_to_obs/real_obs_mod.f90

-------------- next part --------------
Modified: DART/trunk/observations/NCEP/ascii_to_obs/real_obs_mod.f90
===================================================================
--- DART/trunk/observations/NCEP/ascii_to_obs/real_obs_mod.f90	2011-02-18 21:40:46 UTC (rev 4739)
+++ DART/trunk/observations/NCEP/ascii_to_obs/real_obs_mod.f90	2011-02-22 15:59:43 UTC (rev 4740)
@@ -204,6 +204,7 @@
 
 obs_num = 0
 iskip(:) = 0
+first_obs = .true.
 
 !  loop over all observations within the file
 !------------------------------------------------------------------------------
@@ -469,6 +470,9 @@
 
    end if
 
+   ! fill the time_obs variable to pass into add routine
+   time_obs = set_time(seconds, days)
+
    !   create the obs_def for this observation, add to sequence
    !------------------------------------------------------------------------------
 


More information about the Dart-dev mailing list