[Dart-dev] DART/branches Revision: 12306

dart at ucar.edu dart at ucar.edu
Wed Jan 10 15:29:01 MST 2018


nancy at ucar.edu
2018-01-10 15:29:01 -0700 (Wed, 10 Jan 2018)
32
try to print which obs is bad.




Modified: DART/branches/recam/assimilation_code/modules/observations/forward_operator_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/observations/forward_operator_mod.f90	2018-01-10 21:28:21 UTC (rev 12305)
+++ DART/branches/recam/assimilation_code/modules/observations/forward_operator_mod.f90	2018-01-10 22:29:01 UTC (rev 12306)
@@ -67,7 +67,7 @@
 
 
 ! Module storage for writing error messages
-character(len = 256) :: msgstring
+character(len = 256) :: msgstring, msgstring2
 
 contains
 
@@ -236,7 +236,7 @@
       qc_ens_handle%vars(j, 1:num_copies_to_calc) = istatus(:)
 
       call check_forward_operator_istatus(num_copies_to_calc, assimilate_this_ob, &
-                                 evaluate_this_ob, istatus, expected_obs)
+                                 evaluate_this_ob, istatus, expected_obs, keys(j))
 
    end do ALL_OBSERVATIONS
 
@@ -303,7 +303,7 @@
    qc_ens_handle%copies(:, j) = istatus
 
    call check_forward_operator_istatus(num_copies_to_calc, assimilate_this_ob, evaluate_this_ob, &
-                               istatus, expected_obs)
+                               istatus, expected_obs, thiskey(1))
 
    end do MY_OBSERVATIONS
 
@@ -509,7 +509,7 @@
 !>   * Successful istatus but missing_r8 for forward operator
 !>   * Negative istatus
 !> This routine calls the error handler (E_ERR) if either of these happen.
-subroutine check_forward_operator_istatus(num_fwd_ops, assimilate_ob, evaluate_ob, istatus, expected_obs)
+subroutine check_forward_operator_istatus(num_fwd_ops, assimilate_ob, evaluate_ob, istatus, expected_obs, thiskey)
 
 integer,  intent(in) :: num_fwd_ops
 logical,  intent(in) :: assimilate_ob
@@ -516,6 +516,7 @@
 logical,  intent(in) :: evaluate_ob
 integer,  intent(in) :: istatus(num_fwd_ops)
 real(r8), intent(in) :: expected_obs(num_fwd_ops)
+integer,  intent(in) :: thiskey
 
 
 integer :: copy
@@ -527,12 +528,14 @@
    if(istatus(copy) == 0) then
       if ((assimilate_ob .or. evaluate_ob) .and. (expected_obs(copy) == missing_r8)) then
          write(msgstring, *) 'istatus was 0 (OK) but forward operator returned missing value.'
-         call error_handler(E_ERR,'filter_main', msgstring, source, revision, revdate)
+         write(msgstring2, *) 'observation number ', thiskey
+         call error_handler(E_ERR,'filter_main', msgstring, source, revision, revdate, text2=msgstring2)
       endif
    ! Negative istatus
    else if (istatus(copy) < 0) then
       write(msgstring, *) 'istatus must not be <0 from forward operator. 0=OK, >0 for error'
-      call error_handler(E_ERR,'filter_main', msgstring, source, revision, revdate)
+      write(msgstring2, *) 'observation number ', thiskey
+      call error_handler(E_ERR,'filter_main', msgstring, source, revision, revdate, text2=msgstring2)
    endif
 
 enddo


More information about the Dart-dev mailing list