netcdf.f 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
  2. !
  3. ! This module contains the netCDF include file and a netcdf error
  4. ! handling routine.
  5. !
  6. !-----------------------------------------------------------------------
  7. !
  8. ! CVS:$Id: netcdf.f,v 1.2 2000/04/19 21:56:25 pwjones Exp $
  9. !
  10. ! Copyright (c) 1997, 1998 the Regents of the University of
  11. ! California.
  12. !
  13. ! This software and ancillary information (herein called software)
  14. ! called SCRIP is made available under the terms described here.
  15. ! The software has been approved for release with associated
  16. ! LA-CC Number 98-45.
  17. !
  18. ! Unless otherwise indicated, this software has been authored
  19. ! by an employee or employees of the University of California,
  20. ! operator of the Los Alamos National Laboratory under Contract
  21. ! No. W-7405-ENG-36 with the U.S. Department of Energy. The U.S.
  22. ! Government has rights to use, reproduce, and distribute this
  23. ! software. The public may copy and use this software without
  24. ! charge, provided that this Notice and any statement of authorship
  25. ! are reproduced on all copies. Neither the Government nor the
  26. ! University makes any warranty, express or implied, or assumes
  27. ! any liability or responsibility for the use of this software.
  28. !
  29. ! If software is modified to produce derivative works, such modified
  30. ! software should be clearly marked, so as not to confuse it with
  31. ! the version available from Los Alamos National Laboratory.
  32. !
  33. !***********************************************************************
  34. module netcdf_mod
  35. !-----------------------------------------------------------------------
  36. use kinds_mod
  37. use constants
  38. implicit none
  39. include 'netcdf.inc'
  40. !***********************************************************************
  41. contains
  42. !***********************************************************************
  43. subroutine netcdf_error_handler(istat)
  44. !-----------------------------------------------------------------------
  45. !
  46. ! This routine provides a simple interface to netCDF error message
  47. ! routine.
  48. !
  49. !-----------------------------------------------------------------------
  50. integer (kind=int_kind), intent(in) ::
  51. & istat ! integer status returned by netCDF function call
  52. !-----------------------------------------------------------------------
  53. if (istat /= NF_NOERR) then
  54. print *,'Error in netCDF: ',nf_strerror(istat)
  55. stop
  56. endif
  57. !-----------------------------------------------------------------------
  58. end subroutine netcdf_error_handler
  59. !***********************************************************************
  60. end module netcdf_mod
  61. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!