[Dart-dev] DART/branches Revision: 12205

dart at ucar.edu dart at ucar.edu
Thu Dec 14 15:09:47 MST 2017


nancy at ucar.edu
2017-12-14 15:09:46 -0700 (Thu, 14 Dec 2017)
132
only print the model time from a single task, not
all tasks.  also remove redundant check for do_output()
from the print routines.




Modified: DART/branches/recam/assimilation_code/programs/model_mod_check/model_mod_check.f90
===================================================================
--- DART/branches/recam/assimilation_code/programs/model_mod_check/model_mod_check.f90	2017-12-14 22:09:06 UTC (rev 12204)
+++ DART/branches/recam/assimilation_code/programs/model_mod_check/model_mod_check.f90	2017-12-14 22:09:46 UTC (rev 12205)
@@ -251,17 +251,21 @@
 
    call write_state(ens_handle, file_info_output)
 
-   ! print date does not work when a model does not have a calendar
-   if (get_calendar_type() /= NO_CALENDAR) then
-      write(*,'(A)') '-- printing model date --------------------------------------'
-      call print_date( model_time,' model_mod_check:model date')
+   ! this can be an MPI program.  do this only from a single task or you
+   ! get hash from multiple tasks writing over each other.
+   if (do_output()) then
+      ! print date does not work when a model does not have a calendar
+      if (get_calendar_type() /= NO_CALENDAR) then
+         write(*,'(A)') '-- printing model date --------------------------------------'
+         call print_date( model_time,' model_mod_check:model date')
+      endif
+   
+      write(*,'(A)') '-- printing model time --------------------------------------'
+      call print_time( model_time,' model_mod_check:model time')
+      write(*,'(A)') '-------------------------------------------------------------'
+      write(*,'(A)') ''
    endif
 
-   write(*,'(A)') '-- printing model time --------------------------------------'
-   call print_time( model_time,' model_mod_check:model time')
-   write(*,'(A)') '-------------------------------------------------------------'
-   write(*,'(A)') ''
-
    call print_test_message('TEST 2', ending=.true.)
 
 endif
@@ -331,6 +335,8 @@
    call print_test_message('TEST 5', &
                            'Testing range of data for model_interpolate', starting=.true.)
 
+   call create_state_window(ens_handle)
+
    num_failed = test_interpolate_range( ens_handle,            &
                                         num_ens,               &
                                         interp_test_dlon,      &
@@ -348,6 +354,8 @@
    write(string2, *)'check_me_interptest.nc (netcdf) and check_me_interptest.m (matlab)'
    call print_info_message(string1, string2)
 
+   call free_state_window(ens_handle)
+
    call print_test_message('TEST 5', ending=.true.)
 endif
 
@@ -447,8 +455,7 @@
 logical,          intent(in), optional :: starting
 logical,          intent(in), optional :: ending
 
-if (do_output()) &
-   call print_message(.true., test_label, msg1, msg2, msg3, starting, ending)
+call print_message(.true., test_label, msg1, msg2, msg3, starting, ending)
 
 end subroutine print_test_message
 
@@ -464,8 +471,7 @@
 logical,          intent(in), optional :: starting
 logical,          intent(in), optional :: ending
 
-if (do_output()) &
-   call print_message(.false., info_msg, msg1, msg2, msg3, starting, ending)
+call print_message(.false., info_msg, msg1, msg2, msg3, starting, ending)
 
 end subroutine print_info_message
 


More information about the Dart-dev mailing list