netcdf-c/nf_test/handle_err.F
2010-06-03 13:24:43 +00:00

21 lines
642 B
Fortran

C This is part of the netCDF package.
C Copyright 2005 University Corporation for Atmospheric Research/Unidata.
C See COPYRIGHT file for conditions of use.
C This is the error handling function for some of the F77
C tests. This error handler comes from the netcdf tutorial.
C $Id: handle_err.F,v 1.1 2009/06/07 13:17:26 ed Exp $
C This subroutine handles errors by printing an error message and
C exiting with a non-zero status.
subroutine handle_err(errcode)
implicit none
include 'netcdf.inc'
integer errcode
print *, 'Error: ', nf_strerror(errcode)
stop 2
end