[Dart-dev] [6108] DART/branches/development:

nancy at ucar.edu nancy at ucar.edu
Mon May 6 15:19:58 MDT 2013


Revision: 6108
Author:   thoar
Date:     2013-05-06 15:19:56 -0600 (Mon, 06 May 2013)
Log Message:
-----------

Added an error_handler(E_MSG,"Finished successfully") message
to all the programs.

Replaced the call to timestamp() with the more appropriate
finalize_utilities().

Removed some unused variables identified by the Intel compiler on
yellowstone.

Modified Paths:
--------------
    DART/branches/development/models/MITgcm_ocean/create_ocean_obs.f90
    DART/branches/development/models/NAAPS/naaps_to_dart.f90
    DART/branches/development/models/NCOMMAS/dart_to_ncommas.f90
    DART/branches/development/models/NCOMMAS/model_mod.f90
    DART/branches/development/models/NCOMMAS/ncommas_to_dart.f90
    DART/branches/development/models/PBL_1d/create_real_network.f90
    DART/branches/development/models/PBL_1d/gen_init/gen_init.f90
    DART/branches/development/models/noah/model_mod_check.f90
    DART/branches/development/models/rose/dart_to_model.f90
    DART/branches/development/models/rose/model_to_dart.f90
    DART/branches/development/models/template/full_model_mod_check.f90
    DART/branches/development/models/tiegcm/dart_to_model.f90
    DART/branches/development/models/tiegcm/model_to_dart.f90
    DART/branches/development/models/wrf/WRF_BC/pert_wrf_bc.f90
    DART/branches/development/models/wrf/WRF_BC/update_wrf_bc.f90
    DART/branches/development/models/wrf/select.f90
    DART/branches/development/obs_sequence/create_fixed_network_seq.f90
    DART/branches/development/obs_sequence/create_obs_sequence.f90
    DART/branches/development/obs_sequence/obs_seq_coverage.f90
    DART/branches/development/obs_sequence/obs_seq_to_netcdf.f90
    DART/branches/development/obs_sequence/obs_seq_verify.f90
    DART/branches/development/obs_sequence/obs_sequence_tool.f90
    DART/branches/development/observations/AIRS/airs_obs_mod.f90
    DART/branches/development/observations/AIRS/convert_airs_L2.f90
    DART/branches/development/observations/GTSPP/gtspp_to_obs.f90
    DART/branches/development/observations/NCEP/ascii_to_obs/create_real_obs.f90
    DART/branches/development/observations/WOD/wod_to_obs.f90
    DART/branches/development/observations/quikscat/convert_L2b.f90
    DART/branches/development/observations/quikscat/quikscat_JPL_mod.f90
    DART/branches/development/observations/radar/create_obs_radar_sequence.f90
    DART/branches/development/observations/var/gts_dart_mod.f90
    DART/branches/development/observations/var/gts_to_dart.f90
    DART/branches/development/observations/var/littler_tf_dart.f90
    DART/branches/development/observations/var/rad_3dvar_to_dart.f90
    DART/branches/development/preprocess/preprocess.f90
    DART/branches/development/random_seq/test_diff.f90
    DART/branches/development/random_seq/test_random_gsl.f90
    DART/branches/development/random_seq/test_reseed.f90
    DART/branches/development/utilities/closest_member_tool.f90
    DART/branches/development/utilities/model_mod_check.f90
    DART/branches/development/utilities/restart_file_tool.f90

-------------- next part --------------
Modified: DART/branches/development/models/MITgcm_ocean/create_ocean_obs.f90
===================================================================
--- DART/branches/development/models/MITgcm_ocean/create_ocean_obs.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/MITgcm_ocean/create_ocean_obs.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program create_ocean_obs
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 ! Initial program to read the raw ocean observations and insert them
 ! into an observation sequence. To make things easy ... we will mandate
 ! an assimilation interval of 1 day - so all observations will be
@@ -21,7 +15,7 @@
 use dart_MITocean_mod, only : real_obs_sequence
 use     utilities_mod, only : initialize_utilities, register_module, &
                               do_output, logfileunit, &
-                              error_handler, timestamp, E_ERR, E_MSG, &
+                              error_handler, finalize_utilities, E_ERR, E_MSG, &
                               find_namelist_in_file, check_namelist_read
 use  time_manager_mod, only : time_type, set_date, set_time, print_date, &
                               operator(+), set_calendar_type, GREGORIAN
@@ -94,7 +88,14 @@
 
 call destroy_obs_sequence(seq) ! release the memory of the seq.
 
-call timestamp(source,revision,revdate,'end') ! close the log file.
+call error_handler(E_MSG,'create_ocean_obs','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program create_ocean_obs
 
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/NAAPS/naaps_to_dart.f90
===================================================================
--- DART/branches/development/models/NAAPS/naaps_to_dart.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/NAAPS/naaps_to_dart.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program naaps_to_dart
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
- 
 !----------------------------------------------------------------------
 ! purpose: interface between naaps and DART
 !
@@ -26,7 +20,8 @@
 
 use        types_mod, only : r8
 use    utilities_mod, only : initialize_utilities, finalize_utilities, &
-                             find_namelist_in_file, check_namelist_read
+                             find_namelist_in_file, check_namelist_read, &
+                             error_handler, E_MSG
 use        model_mod, only : get_model_size, analysis_file_to_statevector, &
                              get_naaps_restart_path, get_naaps_dtg,        &
                              get_naaps_ensemble_member,     &
@@ -101,12 +96,17 @@
 call awrite_state_restart(model_time, statevector, iunit)
 call close_restart(iunit)
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
-!----------------------------------------------------------------------
-
 call print_date(model_time, str='naaps_to_dart:naaps  model date')
 call print_time(model_time, str='naaps_to_dart:DART model time')
+
+call error_handler(E_MSG,'naaps_to_dart','Finished successfully.',source,revision,revdate)
 call finalize_utilities()
 
 end program naaps_to_dart
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+ 

Modified: DART/branches/development/models/NCOMMAS/dart_to_ncommas.f90
===================================================================
--- DART/branches/development/models/NCOMMAS/dart_to_ncommas.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/NCOMMAS/dart_to_ncommas.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program dart_to_ncommas
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: interface between DART and the ncommas model
 !
@@ -27,9 +21,10 @@
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : initialize_utilities, timestamp, &
+use    utilities_mod, only : initialize_utilities, finalize_utilities, &
                              find_namelist_in_file, check_namelist_read, &
-                             logfileunit, open_file, close_file
+                             logfileunit, open_file, close_file, &
+                             error_handler, E_MSG
 use  assim_model_mod, only : open_restart_read, aread_state_restart, close_restart
 use time_manager_mod, only : time_type, print_time, print_date, operator(-), get_time
 use        model_mod, only : static_init_model, sv_to_restart_file, &
@@ -134,7 +129,14 @@
 call print_date(adv_to_time,'dart_to_ncommas:advance_to date',logfileunit)
 endif
 
-! When called with 'end', timestamp will call finalize_utilities()
-call timestamp(string1=source, pos='end')
+call error_handler(E_MSG,'dart_to_ncommas','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program dart_to_ncommas
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/NCOMMAS/model_mod.f90
===================================================================
--- DART/branches/development/models/NCOMMAS/model_mod.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/NCOMMAS/model_mod.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 module model_mod
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 ! This is the interface between the ncommas model and DART.
 
 ! Modules that are absolutely required for use are listed
@@ -204,7 +198,6 @@
 ! set this to true if you want to print out the current time
 ! after each N observations are processed, for benchmarking.
 
-logical :: print_timestamps = .false.
 integer :: print_every_Nth  = 10000
 
 !------------------------------------------------------------------
@@ -3303,3 +3296,10 @@
 ! End of model_mod
 !===================================================================
 end module model_mod
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/NCOMMAS/ncommas_to_dart.f90
===================================================================
--- DART/branches/development/models/NCOMMAS/ncommas_to_dart.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/NCOMMAS/ncommas_to_dart.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program ncommas_to_dart
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: interface between ncommas and DART
 !
@@ -26,8 +20,9 @@
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : initialize_utilities, timestamp, &
-                             find_namelist_in_file, check_namelist_read
+use    utilities_mod, only : initialize_utilities, error_handler, E_MSG, &
+                             find_namelist_in_file, check_namelist_read, &
+                             finalize_utilities
 use        model_mod, only : get_model_size, restart_file_to_sv, &
                              get_ncommas_restart_filename
 use  assim_model_mod, only : awrite_state_restart, open_restart_write, close_restart
@@ -92,13 +87,17 @@
 call awrite_state_restart(model_time, statevector, iunit)
 call close_restart(iunit)
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
-!----------------------------------------------------------------------
-
 call print_date(model_time, str='ncommas_to_dart:ncommas  model date')
 call print_time(model_time, str='ncommas_to_dart:DART model time')
-call timestamp(string1=source, pos='end')
 
+call error_handler(E_MSG,'ncommas_to_dart','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
+
 end program ncommas_to_dart
 
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/PBL_1d/create_real_network.f90
===================================================================
--- DART/branches/development/models/PBL_1d/create_real_network.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/PBL_1d/create_real_network.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program create_real_network_seq
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 ! JPH
 ! This code originated from create_fixed_network.  It uses module_wrf to get
 ! obs from smos file, with file, date, and interval controlled via the wrf1d
@@ -19,7 +13,7 @@
 ! and perfect_model_obs.
 
 use        types_mod, only : r8, missing_r8, missing_i, metadatalength
-use    utilities_mod, only : timestamp, register_module, open_file, &
+use    utilities_mod, only : finalize_utilities, register_module, open_file, &
                              close_file, find_namelist_in_file, &
                              error_handler, check_namelist_read, &
                              initialize_utilities, E_ERR
@@ -185,9 +179,6 @@
 
 call write_obs_seq(seq, file_name)
 
-! Clean up
-call timestamp(string1=source,string2=revision,string3=revdate,pos='end')
-
 !-------------------------------------------------------------------------
 ! Now the part that replaces perfect_model_obs.  There are some 
 ! assumptions in here about what type of obs we are ingesting:
@@ -293,19 +284,21 @@
   
    end do ! obs
 
-file_name = 'real_obs_seq.out'
+   file_name = 'real_obs_seq.out'
 
-call write_obs_seq(seq_out, file_name)
-stop
+   call write_obs_seq(seq_out, file_name)
 
-
 else 
 
    print*, "could not find any obs in the input sequence"
 
 endif
 
+call error_handler(E_MSG, 'create_real_network', 'Finished successfully.',
+                   source,revision,revdate)
+call finalize_utilities()
 
+
 !--------------------------------------------------------------
 CONTAINS
 !--------------------------------------------------------------
@@ -373,3 +366,10 @@
 end function get_qc_from_obs
 
 end program create_real_network_seq
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/PBL_1d/gen_init/gen_init.f90
===================================================================
--- DART/branches/development/models/PBL_1d/gen_init/gen_init.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/PBL_1d/gen_init/gen_init.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program gen_init
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 use        types_mod, only : r8
 use time_manager_mod, only : time_type, set_time, get_time, print_time
 use  assim_model_mod, only : static_init_assim_model, get_model_size, &
@@ -17,7 +11,7 @@
    open_restart_read, open_restart_write, close_restart
 use utilities_mod,    only : open_file, file_exist, get_unit, close_file, &
                              initialize_utilities, register_module, error_handler, &
-                             E_ERR, E_WARN, E_MSG, E_DBG, timestamp
+                             E_ERR, E_WARN, E_MSG, E_DBG
 
 implicit none
 
@@ -70,3 +64,10 @@
 end subroutine gen_init_modules_used
 
 end program gen_init
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/noah/model_mod_check.f90
===================================================================
--- DART/branches/development/models/noah/model_mod_check.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/noah/model_mod_check.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,20 +4,14 @@
 
 program model_mod_check
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: test routines
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8, digits12, metadatalength
-use    utilities_mod, only : initialize_utilities, timestamp, nc_check, &
+use    utilities_mod, only : initialize_utilities, finalize_utilities, nc_check, &
                              open_file, close_file, find_namelist_in_file, &
-                             check_namelist_read
+                             check_namelist_read, error_handler, E_MSG
 use     location_mod, only : location_type, set_location, write_location, get_dist, &
                              query_location, LocationDims, get_location, &
                              VERTISHEIGHT, VERTISSURFACE
@@ -236,15 +230,15 @@
 
 endif
 
+call error_handler(E_MSG,'model_mod_check','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
+
+
 !----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
-! This must be the last few lines of the main program.
+contains
 !----------------------------------------------------------------------
-call timestamp(string1=source, pos='end')
 
-contains
 
-
 subroutine check_meta_data( iloc )
 
 integer, intent(in) :: iloc
@@ -363,3 +357,10 @@
 
 
 end program model_mod_check
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/rose/dart_to_model.f90
===================================================================
--- DART/branches/development/models/rose/dart_to_model.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/rose/dart_to_model.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program dart_to_model
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: interface between ROSE and DART
 !
@@ -29,7 +23,7 @@
 
 use        types_mod, only : r8
 use    utilities_mod, only : get_unit, initialize_utilities, E_ERR, &
-                             error_handler, timestamp
+                             error_handler, finalize_utilities, E_MSG
 use        model_mod, only : model_type, get_model_size, init_model_instance, &
                              vector_to_prog_var, update_ROSE_restart, &
                              update_ROSE_namelist, static_init_model
@@ -89,9 +83,14 @@
 call update_ROSE_restart(file_name, var)
 call update_ROSE_namelist('rose.nml', model_time, adv_to_time, ens_member)
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will also call finalize_utilities()
-!----------------------------------------------------------------------
-call timestamp(string1=source, pos='end')
+call error_handler(E_MSG,'dart_to_model','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program dart_to_model
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/rose/model_to_dart.f90
===================================================================
--- DART/branches/development/models/rose/model_to_dart.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/rose/model_to_dart.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program model_to_dart
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: interface between ROSE and DART
 !
@@ -20,7 +14,8 @@
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : get_unit, initialize_utilities, timestamp
+use    utilities_mod, only : get_unit, initialize_utilities, finalize_utilities, &
+                             error_handler, E_MSG
 use        model_mod, only : model_type, static_init_model, get_model_size, &
                              init_model_instance, read_ROSE_restart, &
                              prog_var_to_vector 
@@ -70,9 +65,14 @@
 call awrite_state_restart(model_time, x_state, file_unit)
 call close_restart(file_unit)
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will also call finalize_utilities()
-!----------------------------------------------------------------------
-call timestamp(string1=source, pos='end')
+call error_handler(E_MSG,'model_to_dart','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program model_to_dart
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/template/full_model_mod_check.f90
===================================================================
--- DART/branches/development/models/template/full_model_mod_check.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/template/full_model_mod_check.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,20 +4,17 @@
 
 program model_mod_check
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
+! This is not called full_model_mod_check ... because it is used as
+! a generic model_mod for 3D models.
 
 !----------------------------------------------------------------------
 ! purpose: test routines
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8, digits12, metadatalength
-use    utilities_mod, only : initialize_utilities, timestamp, nc_check, &
+use    utilities_mod, only : initialize_utilities, finalize_utilities, nc_check, &
                              open_file, close_file, find_namelist_in_file, &
-                             check_namelist_read
+                             check_namelist_read, error_handler, E_MSG
 use     location_mod, only : location_type, set_location, write_location, get_dist, &
                              query_location, LocationDims, get_location, VERTISHEIGHT
 use     obs_kind_mod, only : get_raw_obs_kind_name, get_raw_obs_kind_index
@@ -198,12 +195,10 @@
    write(*,*)'model_interpolate ERROR: model_interpolate failed with error code ',ios_out
 endif
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will call finalize_utilities()
-! This must be the last few lines of the main program.
-!----------------------------------------------------------------------
-call timestamp(string1=source, pos='end')
+call error_handler(E_MSG,'full_model_mod_check','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
+
 contains
 
 
@@ -322,3 +317,10 @@
 
 
 end program model_mod_check
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/tiegcm/dart_to_model.f90
===================================================================
--- DART/branches/development/models/tiegcm/dart_to_model.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/tiegcm/dart_to_model.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program dart_to_model
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: interface between TIEGCM and DART
 !
@@ -25,8 +19,8 @@
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : get_unit, initialize_utilities, E_ERR, &
-                             error_handler, timestamp, do_output
+use    utilities_mod, only : get_unit, initialize_utilities, E_ERR, E_MSG, &
+                             error_handler, finalize_utilities, do_output
 use        model_mod, only : model_type, get_model_size, init_model_instance, &
                              vector_to_prog_var, update_TIEGCM_restart, &
                              static_init_model
@@ -173,9 +167,15 @@
 
 close(file_unit)
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will also call finalize_utilities()
-!----------------------------------------------------------------------
-call timestamp(string1=source, pos='end')
+call error_handler(E_MSG,'dart_to_model','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
+
 end program dart_to_model
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/tiegcm/model_to_dart.f90
===================================================================
--- DART/branches/development/models/tiegcm/model_to_dart.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/tiegcm/model_to_dart.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program model_to_dart
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !----------------------------------------------------------------------
 ! purpose: interface between TIEGCM and DART
 !
@@ -20,7 +14,8 @@
 !----------------------------------------------------------------------
 
 use        types_mod, only : r8
-use    utilities_mod, only : get_unit, initialize_utilities, timestamp
+use    utilities_mod, only : get_unit, initialize_utilities, finalize_utilities, &
+                             error_handler, E_MSG
 use        model_mod, only : model_type, static_init_model, get_model_size, &
                              init_model_instance, read_TIEGCM_restart,      &
                              read_TIEGCM_secondary,                         &
@@ -77,9 +72,14 @@
 call awrite_state_restart(model_time, x_state, file_unit)
 call close_restart(file_unit)
 
-!----------------------------------------------------------------------
-! When called with 'end', timestamp will also call finalize_utilities()
-!----------------------------------------------------------------------
-call timestamp(string1=source, pos='end')
+call error_handler(E_MSG,'model_to_dart','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program model_to_dart
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/wrf/WRF_BC/pert_wrf_bc.f90
===================================================================
--- DART/branches/development/models/wrf/WRF_BC/pert_wrf_bc.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/wrf/WRF_BC/pert_wrf_bc.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program pert_wrf_bc
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 ! program to update BC file from 3dvar or filter output.
 ! current version reads only wrf-netcdf file format.
 
@@ -20,7 +14,7 @@
 use               types_mod, only : r8
 use           utilities_mod, only : file_exist, open_file, close_file, &
                                     initialize_utilities, finalize_utilities, &
-                                    register_module, error_handler, E_ERR, &
+                                    register_module, error_handler, E_ERR, E_MSG, &
                                     logfileunit, timestamp
 use module_netcdf_interface, only : get_dims_cdf, get_gl_att_real_cdf, put_gl_att_real_cdf, &
                                     get_var_3d_real_cdf, get_var_2d_real_cdf, &
@@ -597,12 +591,18 @@
    deallocate(v_next)
    deallocate(w_next)
 
-   write(logfileunit,*)'FINISHED pert_wrf_bc.'
-   write(logfileunit,*)
 
-   call timestamp(source, revision, revdate, 'none')
-   call finalize_utilities ! closes the log file.
+   call error_handler(E_MSG,'pert_wrf_bc','pert_wrf_bc terminated normally.')
+   call error_handler(E_MSG,'pert_wrf_bc','FINISHED pert_wrf_bc.')
+   call error_handler(E_MSG,'pert_wrf_bc','Finished successfully.',source,revision,revdate)
+   call finalize_utilities()
  
-   write(*,*) 'pert_wrf_bc terminated normally.'
 
 end program pert_wrf_bc
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/wrf/WRF_BC/update_wrf_bc.f90
===================================================================
--- DART/branches/development/models/wrf/WRF_BC/update_wrf_bc.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/wrf/WRF_BC/update_wrf_bc.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program update_wrf_bc
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 ! program to update BC file from 3dvar or filter output.
 ! current version reads only wrf-netcdf file format.
 
@@ -18,7 +12,7 @@
 use               types_mod, only : r8
 use           utilities_mod, only : file_exist, open_file, close_file, &
                                     initialize_utilities, finalize_utilities, register_module, &
-                                    error_handler, E_ERR, logfileunit, timestamp
+                                    error_handler, E_ERR, E_MSG, logfileunit, timestamp
 use module_netcdf_interface, only : get_dims_cdf, get_gl_att_real_cdf, put_gl_att_real_cdf, &
                                     get_var_3d_real_cdf, get_var_2d_real_cdf, put_var_3d_real_cdf, &
                                     put_var_2d_real_cdf, get_times_cdf, put_time_cdf, variable_exist
@@ -629,12 +623,16 @@
    deallocate(v_mean)
    deallocate(w_mean)
 
-   write(logfileunit,*)'FINISHED update_wrf_bc.'
-   write(logfileunit,*)
-
-   call timestamp(source, revision, revdate, 'none')
-   call finalize_utilities ! closes the log file.
+   call error_handler(E_MSG, 'update_wrf_bc', 'update_wrf_bc terminated normally.')
+   call error_handler(E_MSG, 'update_wrf_bc', 'FINISHED update_wrf_bc.')
+   call error_handler(E_MSG, 'update_wrf_bc', 'Finished successfully.',source,revision,revdate)
+   call finalize_utilities()
  
-   write(*,*) 'update_wrf_bc terminated normally.'
-
 end program update_wrf_bc
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/models/wrf/select.f90
===================================================================
--- DART/branches/development/models/wrf/select.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/models/wrf/select.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -5,15 +5,10 @@
  
 PROGRAM select
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 use        types_mod, only : r8, metadatalength
-use    utilities_mod, only : initialize_utilities, timestamp, &
-                             register_module, logfileunit
+use    utilities_mod, only : initialize_utilities, finalize_utilities, &
+                             register_module, logfileunit, &
+                             error_handler, E_MSG
 use obs_sequence_mod, only : obs_type, obs_sequence_type, init_obs_sequence, &
                              insert_obs_in_seq, get_first_obs, get_next_obs, &
                              write_obs_seq, &
@@ -157,12 +152,17 @@
 write(unit=*, fmt='(5x,a,i6,a)') &
      'Total number of observations:  ', num_obs
 
-! Write out the sequence
 call write_obs_seq(seq, out_file_name)
 
-write(logfileunit,*)'FINISHED select.'
-write(logfileunit,*)
-
-call timestamp(source,revision,revdate,'end') ! That closes the log file, too.
+call error_handler(E_MSG,'select','FINISHED select.')
+call error_handler(E_MSG,'select','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
  
 END PROGRAM select
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/obs_sequence/create_fixed_network_seq.f90
===================================================================
--- DART/branches/development/obs_sequence/create_fixed_network_seq.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/obs_sequence/create_fixed_network_seq.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,15 +4,10 @@
 
 program create_fixed_network_seq
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 use        types_mod, only : r8
-use    utilities_mod, only : timestamp, register_module, open_file, close_file, &
-                             initialize_utilities
+use    utilities_mod, only : register_module, open_file, close_file, &
+                             initialize_utilities, finalize_utilities, &
+                             error_handler, E_MSG
 use      obs_def_mod, only : obs_def_type, get_obs_def_time, set_obs_def_time
 use obs_sequence_mod, only : obs_sequence_type, obs_type, read_obs_seq, &
                              get_num_obs, init_obs_sequence, get_first_obs, &
@@ -191,7 +186,14 @@
 read(*, *) file_name
 call write_obs_seq(seq, file_name)
 
-! Clean up
-call timestamp(string1=source,string2=revision,string3=revdate,pos='end')
+call error_handler(E_MSG,'create_fixed_network_seq','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program create_fixed_network_seq
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/obs_sequence/create_obs_sequence.f90
===================================================================
--- DART/branches/development/obs_sequence/create_obs_sequence.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/obs_sequence/create_obs_sequence.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,14 +4,9 @@
 
 program create_obs_sequence
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
-use    utilities_mod, only : timestamp, register_module, open_file, close_file, &
-                             initialize_utilities 
+use    utilities_mod, only : register_module, open_file, close_file, &
+                             initialize_utilities, finalize_utilities, &
+                             error_handler, E_MSG
 use obs_sequence_mod, only : obs_sequence_type, interactive_obs, write_obs_seq, &
                              interactive_obs_sequence, static_init_obs_sequence
 use  assim_model_mod, only : static_init_assim_model
@@ -46,7 +41,14 @@
 read(*, *) file_name
 call write_obs_seq(seq, file_name)
 
-! Clean up
-call timestamp(string1=source,string2=revision,string3=revdate,pos='end')
+call error_handler(E_MSG,'create_obs_sequence','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 end program create_obs_sequence
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/obs_sequence/obs_seq_coverage.f90
===================================================================
--- DART/branches/development/obs_sequence/obs_seq_coverage.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/obs_sequence/obs_seq_coverage.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program obs_seq_coverage
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !-----------------------------------------------------------------------
 ! This program queries a bunch of obs_seq.xxxx files and tries to
 ! figure out 'station coverage' ... what locations are consistently
@@ -65,7 +59,7 @@
                              operator(>=), operator(*)
 use    utilities_mod, only : get_unit, close_file, register_module, &
                              file_exist, error_handler, E_ERR, E_WARN, E_MSG, &
-                             initialize_utilities, nmlfileunit, timestamp, &
+                             initialize_utilities, nmlfileunit, finalize_utilities, &
                              find_namelist_in_file, check_namelist_read, nc_check, &
                              next_file, get_next_filename, find_textfile_dims, &
                              file_to_text, do_nml_file, do_nml_term
@@ -585,8 +579,10 @@
 if (allocated(obs_seq_filenames))     deallocate(obs_seq_filenames)
 if (allocated(DesiredStations))       deallocate(DesiredStations)
 
-call timestamp(source,revision,revdate,'end') ! That closes the log file, too.
+call error_handler(E_MSG,'obs_seq_coverage','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
+
 !======================================================================
 CONTAINS
 !======================================================================
@@ -1196,7 +1192,7 @@
            LocationVarID, WhichVertVarID
 
 real(digits12), allocatable, dimension(:) :: mytimes
-integer, dimension(size(DesiredStations)) :: gooduns
+integer, dimension(num_stations) :: gooduns    ! Cray compiler likes this better
 
 character(len=obstypelength) :: string32(1) ! MUST BE A '2D' ARRAY
 
@@ -1671,3 +1667,9 @@
 
 end program obs_seq_coverage
 
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/obs_sequence/obs_seq_to_netcdf.f90
===================================================================
--- DART/branches/development/obs_sequence/obs_seq_to_netcdf.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/obs_sequence/obs_seq_to_netcdf.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program obs_seq_to_netcdf
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !-----------------------------------------------------------------------
 ! The programs defines a series of epochs (periods of time) 
 !
@@ -41,7 +35,7 @@
                              get_time_from_schedule
 use    utilities_mod, only : open_file, close_file, register_module, &
                              file_exist, error_handler, E_ERR, E_WARN, E_MSG, &
-                             initialize_utilities, nmlfileunit, timestamp, &
+                             initialize_utilities, finalize_utilities, nmlfileunit, &
                              find_namelist_in_file, check_namelist_read, nc_check, &
                              next_file, get_next_filename, find_textfile_dims, &
                              file_to_text, do_nml_file, do_nml_term
@@ -590,8 +584,10 @@
 
 deallocate(obs_seq_filenames)
 
-call timestamp(source,revision,revdate,'end') ! That closes the log file, too.
+call error_handler(E_MSG,'obs_seq_to_netcdf','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
+
 !======================================================================
 CONTAINS
 !======================================================================
@@ -1269,3 +1265,9 @@
 
 end program obs_seq_to_netcdf
 
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/obs_sequence/obs_seq_verify.f90
===================================================================
--- DART/branches/development/obs_sequence/obs_seq_verify.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/obs_sequence/obs_seq_verify.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program obs_seq_verify
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 !-----------------------------------------------------------------------
 !
 ! This program creates a netCDF file suitable for forecast evaluation.
@@ -88,7 +82,7 @@
                              operator(<=), operator(-), operator(+), operator(/=)
 use    utilities_mod, only : get_unit, close_file, register_module, &
                              file_exist, error_handler, E_ERR, E_WARN, E_MSG, &
-                             initialize_utilities, nmlfileunit, timestamp, &
+                             initialize_utilities, finalize_utilities, nmlfileunit, &
                              find_namelist_in_file, check_namelist_read, nc_check, &
                              next_file, get_next_filename, find_textfile_dims, &
                              file_to_text, do_nml_file, do_nml_term
@@ -527,10 +521,10 @@
 if (allocated(obs_seq_filenames))     deallocate(obs_seq_filenames)
 if (allocated(DesiredStations))       deallocate(DesiredStations)
 
-call timestamp(source,revision,revdate,'end') ! That closes the log file, too.
+call error_handler(E_MSG,'obs_seq_verify','Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
 
-
 !======================================================================
 CONTAINS
 !======================================================================
@@ -1762,3 +1756,9 @@
 
 end program obs_seq_verify
 
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/obs_sequence/obs_sequence_tool.f90
===================================================================
--- DART/branches/development/obs_sequence/obs_sequence_tool.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/obs_sequence/obs_sequence_tool.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,16 +4,10 @@
 
 program obs_sequence_tool
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 ! this latest addition has select by list of obs types.
 
 use        types_mod, only : r8, missing_r8, metadatalength, obstypelength
-use    utilities_mod, only : timestamp, register_module, initialize_utilities, &
+use    utilities_mod, only : finalize_utilities, register_module, initialize_utilities, &
                              find_namelist_in_file, check_namelist_read, &
                              error_handler, E_ERR, E_MSG, nmlfileunit,   &
                              do_nml_file, do_nml_term, get_next_filename
@@ -752,8 +746,10 @@
 call destroy_obs(     obs_out)
 call destroy_obs(prev_obs_out)
 
-call timestamp(source,revision,revdate,'end')
+call error_handler(E_MSG, 'obs_sequence_tool', 'Finished successfully.',source,revision,revdate)
+call finalize_utilities()
 
+
 contains
 
 
@@ -1677,3 +1673,10 @@
 
 !---------------------------------------------------------------------
 end program obs_sequence_tool
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/observations/AIRS/airs_obs_mod.f90
===================================================================
--- DART/branches/development/observations/AIRS/airs_obs_mod.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/observations/AIRS/airs_obs_mod.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 module airs_obs_mod
 
-! <next few lines under version control, do not edit>
-! $URL$
-! $Id$
-! $Revision$
-! $Date$
-
 use types_mod,        only : r4, r8, digits12, deg2rad, rad2deg
 
 use obs_def_mod,      only : obs_def_type, get_obs_def_time, read_obs_def,     &
@@ -26,7 +20,7 @@
 
 use    utilities_mod, only : get_unit, open_file, close_file, file_exist, &
                              register_module, error_handler,              &
-                             E_ERR, E_MSG, timestamp, is_longitude_between
+                             E_ERR, E_MSG, is_longitude_between
 
 use     location_mod, only : location_type, set_location, VERTISPRESSURE, &
                              get_location
@@ -550,3 +544,10 @@
 end subroutine debug_print_size_check
 
 end module airs_obs_mod
+
+! <next few lines under version control, do not edit>
+! $URL$
+! $Id$
+! $Revision$
+! $Date$
+

Modified: DART/branches/development/observations/AIRS/convert_airs_L2.f90
===================================================================
--- DART/branches/development/observations/AIRS/convert_airs_L2.f90	2013-05-06 17:17:10 UTC (rev 6107)
+++ DART/branches/development/observations/AIRS/convert_airs_L2.f90	2013-05-06 21:19:56 UTC (rev 6108)
@@ -4,12 +4,6 @@
 
 program convert_airs_L2
 
-! <next few lines under version control, do not edit>
-! $URL$

@@ Diff output truncated at 40000 characters. @@


More information about the Dart-dev mailing list