<p><b>laura@ucar.edu</b> 2010-12-21 15:44:33 -0700 (Tue, 21 Dec 2010)</p><p>handles errors when running physics<br>
</p><hr noshade><pre><font color="gray">Added: branches/atmos_physics/src/core_physics/module_physics_error.F
===================================================================
--- branches/atmos_physics/src/core_physics/module_physics_error.F                                (rev 0)
+++ branches/atmos_physics/src/core_physics/module_physics_error.F        2010-12-21 22:44:33 UTC (rev 653)
@@ -0,0 +1,41 @@
+!=============================================================================================
+ module module_physics_error
+
+ implicit none
+ private
+ public:: physics_error_fatal
+
+ contains
+
+!=============================================================================================
+ subroutine physics_error_fatal(istat,str)
+!=============================================================================================
+
+!input arguments:
+ character(len=*),intent(in):: str
+ integer,intent(in):: istat
+
+!---------------------------------------------------------------------------------------------
+
+ write(0,*) istat
+ write(0,*)
+ write(0,*) ( '------------------------- FATAL CALLED -------------------------')
+ write(0,*) trim(str)
+
+ error: select case(istat)
+
+    case(-1)
+       write(0,*) 'reached end of file'
+    case(1:)
+       write(0,*) 'file does not exist'
+    case default
+
+ end select error
+ stop ' MPAS core_physics abort'
+ write(0,*)

+ end subroutine physics_error_fatal
+
+!=============================================================================================
+ end module module_physics_error
+!=============================================================================================

</font>
</pre>