[Dart-dev] DART/branches Revision: 10922

dart at ucar.edu dart at ucar.edu
Thu Jan 19 15:09:16 MST 2017


nancy at ucar.edu
2017-01-19 15:09:16 -0700 (Thu, 19 Jan 2017)
116
add an option to suppress most of the output
when two variables are the same between the two files
being compared.




Modified: DART/branches/rma_trunk/utilities/compare_states.f90
===================================================================
--- DART/branches/rma_trunk/utilities/compare_states.f90	2017-01-19 22:01:01 UTC (rev 10921)
+++ DART/branches/rma_trunk/utilities/compare_states.f90	2017-01-19 22:09:16 UTC (rev 10922)
@@ -82,6 +82,7 @@
 logical :: debug = .false.                   ! or .true.
 logical :: fail_on_missing_field = .true.    ! or .false.
 logical :: do_all_numeric_fields = .true.    ! or .false.
+logical :: only_report_differences = .true.  ! or .false.
 character(len=128) :: fieldnames(1000) = ''  ! something large
 character(len=128) :: fieldlist_file = ''
 
@@ -88,7 +89,8 @@
 ! fieldnames here?
 namelist /compare_states_nml/  debug, fail_on_missing_field, &
                                do_all_numeric_fields,        &
-                               fieldnames, fieldlist_file
+                               fieldnames, fieldlist_file,   &
+                               only_report_differences
 
 ! main code here
  
@@ -441,7 +443,7 @@
         call error_handler(E_MSG, 'compare_states', msgstring, source, revision, revdate)
         write(msgstring, *) 'delta min/max: ', idelmin, idelmax
         call error_handler(E_MSG, 'compare_states', msgstring, source, revision, revdate)
-     else
+     else if (.not. only_report_differences) then
         write(msgstring, *) 'arrays same'
         call error_handler(E_MSG, 'compare_states', msgstring, source, revision, revdate)
         write(msgstring, *) 'min/max value: ', imin1, imax1
@@ -571,7 +573,7 @@
         call error_handler(E_MSG, 'compare_states', msgstring, source, revision, revdate)
         write(msgstring, *) 'delta min/max: ', delmin, delmax
         call error_handler(E_MSG, 'compare_states', msgstring, source, revision, revdate)
-     else
+     else if (.not. only_report_differences) then
         write(msgstring, *) 'arrays same'
         call error_handler(E_MSG, 'compare_states', msgstring, source, revision, revdate)
         write(msgstring, *) 'min/max value: ', min1, max1

Modified: DART/branches/rma_trunk/utilities/compare_states.html
===================================================================
--- DART/branches/rma_trunk/utilities/compare_states.html	2017-01-19 22:01:01 UTC (rev 10921)
+++ DART/branches/rma_trunk/utilities/compare_states.html	2017-01-19 22:09:16 UTC (rev 10922)
@@ -85,6 +85,7 @@
   fieldnames = '', 
   fieldlist_file = '',
   fail_on_missing_field = .true.,
+  only_report_differences = .true.,
   debug = .false., 
 /
 </pre>
@@ -133,6 +134,13 @@
 execution continues.
 </TD></TR>
 
+<TR><TD>only_report_differences</TD>
+    <TD>logical</TD>
+    <TD>If .true. only print the name of the variable being tested; skip printing
+the variable value min and max if the two files are identical.  If .false. print
+more details about both variables which differ and varibles with the same values.
+</TD></TR>
+
 <TR><TD>debug</TD>
     <TD>logical</TD>
     <TD>If true print out debugging info.

Modified: DART/branches/rma_trunk/utilities/compare_states.nml
===================================================================
--- DART/branches/rma_trunk/utilities/compare_states.nml	2017-01-19 22:01:01 UTC (rev 10921)
+++ DART/branches/rma_trunk/utilities/compare_states.nml	2017-01-19 22:09:16 UTC (rev 10922)
@@ -1,8 +1,9 @@
 &compare_states_nml
-  do_all_numeric_fields = .true.,
-  fieldnames = '', 
-  fieldlist_file = '',
-  fail_on_missing_field = .true.,
-  debug = .false., 
+  do_all_numeric_fields = .true.
+  fieldnames = '' 
+  fieldlist_file = ''
+  fail_on_missing_field = .true.
+  debug = .false.
+  only_report_differences = .true.
 /
 


More information about the Dart-dev mailing list