[Dart-dev] DART/branches Revision: 12636

dart at ucar.edu dart at ucar.edu
Wed Jun 6 10:57:33 MDT 2018


nancy at ucar.edu
2018-06-06 10:57:33 -0600 (Wed, 06 Jun 2018)
109
add checkTermLevel() as a separate internal routine
to my changes branch (yes, really my branch this time).




Modified: DART/branches/all_nsc_changes/assimilation_code/modules/utilities/utilities_mod.f90
===================================================================
--- DART/branches/all_nsc_changes/assimilation_code/modules/utilities/utilities_mod.f90	2018-06-06 14:09:46 UTC (rev 12635)
+++ DART/branches/all_nsc_changes/assimilation_code/modules/utilities/utilities_mod.f90	2018-06-06 16:57:33 UTC (rev 12636)
@@ -235,7 +235,7 @@
 endif
 
 ! Check to make sure termlevel is set to a reasonable value
-call checkTermLevel
+call checkTermLevel(TERMLEVEL)
 
 ! Echo the module information using normal mechanism
 call register_module(source, revision, revdate)
@@ -576,7 +576,27 @@
 end subroutine log_it
 
 !-----------------------------------------------------------------------
+
+subroutine checkTermLevel(level)
+
+integer, intent(in) :: level
+
+select case (level)
+  case (E_MSG, E_ALLMSG, E_WARN, E_ERR, E_DBG)
+    ! ok, do nothing
+  case default
+    write(msgstring1, *) 'bad integer value for "termlevel", must be one of'
+    write(msgstring2, *) '-1 (E_MSG), 0 (E_ALLMSG), 1 (E_WARN), 2 (E_ERR), -2 (E_DBG)'
+    call error_handler(E_ERR,'checkTermLevel', msgstring1, &
+                       source, revision, revdate, text2=msgstring2)
+
+  end select
+
+end subroutine checkTermLevel
+
+
 !-----------------------------------------------------------------------
+!-----------------------------------------------------------------------
 ! file and error handling
 !-----------------------------------------------------------------------
 !-----------------------------------------------------------------------


More information about the Dart-dev mailing list