[Dart-dev] [8060] DART/trunk/assim_tools/assim_tools_mod.f90: Same as commit 8058 on Lanai

nancy at ucar.edu nancy at ucar.edu
Wed Jun 17 11:48:54 MDT 2015


Revision: 8060
Author:   hkershaw
Date:     2015-06-17 11:48:54 -0600 (Wed, 17 Jun 2015)
Log Message:
-----------
Same as commit 8058 on Lanai

Performance fix: Reordered the check for missing_r8 in the state during filter_assim. Now only checking for missing_r8 if allow_missing_in_clm = .true. Note there is a debugging option on line 1522 if you need to check for missing in state at every update. In running an mpas (r4) test case the reordered version completes the sequential obs do loop in about half the time of the previous version. 

Modified Paths:
--------------
    DART/trunk/assim_tools/assim_tools_mod.f90

-------------- next part --------------
Modified: DART/trunk/assim_tools/assim_tools_mod.f90
===================================================================
--- DART/trunk/assim_tools/assim_tools_mod.f90	2015-06-17 17:47:02 UTC (rev 8059)
+++ DART/trunk/assim_tools/assim_tools_mod.f90	2015-06-17 17:48:54 UTC (rev 8060)
@@ -771,32 +771,11 @@
    STATE_UPDATE: do j = 1, num_close_states
       state_index = close_state_ind(j)
 
-      !! or this, for performance reasons?  it won't warn you if there are missing
-      ! values when you don't expect them, but it also won't do the any() unless
-      ! the namelist says you might expect to see them.
-      !if ( allow_missing_in_clm ) then
-      !   ! Some models can take evasive action if one or more of the ensembles have
-      !   ! a missing value. Generally means 'do nothing' (as opposed to DIE) 
-      !   missing_in_state = any(ens_handle%copies(1:ens_size, state_index) == MISSING_R8)
-      !   if ( missing_in_state ) then
-      !      cycle STATE_UPDATE
-      !endif
-
-      ! Some models can take evasive action if one or more of the ensembles have
-      ! a missing value. Generally means 'do nothing' (as opposed to DIE) 
-      missing_in_state = any(ens_handle%copies(1:ens_size, state_index) == MISSING_R8)
-      
-      if ( missing_in_state ) then
-         if ( allow_missing_in_clm ) then
-            cycle STATE_UPDATE
-         else
-            ! FIXME ... at some point ... convey which instances are missing
-            write(msgstring,*)'Encountered a MISSING_R8 in DART at state index ',state_index
-            write(msgstring2,*)'namelist value of allow_missing_in_clm (.false.) &
-                            &implies a fatal error.'
-            call error_handler(E_ERR, 'filter_assim', msgstring, &
-               source, revision, revdate, text2=msgstring2)
-         endif
+      if ( allow_missing_in_clm ) then
+         ! Some models can take evasive action if one or more of the ensembles have
+         ! a missing value. Generally means 'do nothing' (as opposed to DIE)
+         missing_in_state = any(ens_handle%copies(1:ens_size, state_index) == MISSING_R8)
+         if ( missing_in_state ) cycle STATE_UPDATE
       endif
 
       ! Get the initial values of inflation for this variable if state varying inflation


More information about the Dart-dev mailing list