[Dart-dev] DART/branches Revision: 11839

dart at ucar.edu dart at ucar.edu
Thu Jul 20 14:53:35 MDT 2017


nancy at ucar.edu
2017-07-20 14:53:33 -0600 (Thu, 20 Jul 2017)
158
make the error messages better now that we have the actual
names of the namelist items as part of the call to this function.
(set_multiple_filename_lists())




Modified: DART/branches/rma_array_nml/assimilation_code/modules/utilities/utilities_mod.f90
===================================================================
--- DART/branches/rma_array_nml/assimilation_code/modules/utilities/utilities_mod.f90	2017-07-20 19:55:54 UTC (rev 11838)
+++ DART/branches/rma_array_nml/assimilation_code/modules/utilities/utilities_mod.f90	2017-07-20 20:53:33 UTC (rev 11839)
@@ -1967,10 +1967,10 @@
 ! if they have specified a file which contains a list, read it into
 ! the name_array array and set the count.
 if (listname(1) /= '') then
-   fsource = 'filenames contained in a list file'
+   fsource = ' contained in a list file'
    from_file = .true.
 else
-   fsource = 'filenames in the namelist'
+   fsource = ' in the namelist'
    from_file = .false.
 endif
 
@@ -1978,7 +1978,7 @@
 if (from_file) then
    num_lists = size(listname)
    if (num_lists < nlists) then
-      write(msgstring1, *) 'expecting ', nlists, ' filenames, got ', num_lists
+      write(msgstring1, *) 'expecting ', nlists, ' filenames in "'//trim(origin_list)//'", got ', num_lists
       call error_handler(E_ERR, caller_name, msgstring1, source,revision,revdate)
    endif
 endif
@@ -2007,14 +2007,14 @@
          write(msgstring1, *) 'Missing filename'
 
          if (from_file) then
-            write(msgstring2,*)'reading listfile # ', nl, '  named "'//trim(listname(nl))//'"'
-            write(msgstring3,*)'expecting ', nentries, ' filenames, got ', ne-1
+            write(msgstring2,*)'reading entry # ', nl, ' from "'//trim(origin_list)//'"'
+            write(msgstring3,*)'expecting ', nentries, ' files, have ', ne-1
          else
-            write(msgstring2,*)'required filename # ', fileindex, ' was not found'
-            write(msgstring3,*)'expecting ', nlists*nentries, ' filenames, got ', fileindex-1
+            write(msgstring2,*)'required entry # ', fileindex, ' from "'//trim(origin)//'"'
+            write(msgstring3,*)'expecting ', nlists*nentries, ' filenames, have ', fileindex-1
          endif
 
-         call error_handler(E_ERR, caller_name, trim(msgstring1)//' in '//trim(fsource), &
+         call error_handler(E_ERR, caller_name, trim(msgstring1)//trim(fsource), &
             source,revision,revdate,text2=msgstring2,text3=msgstring3)
    
       endif


More information about the Dart-dev mailing list