source: branches/2015/dev_r5546_CNRS19_HPC_scalability/NEMOGCM/TOOLS/WEIGHTS/src/netcdf_mod.f90 @ 5549

Last change on this file since 5549 was 2352, checked in by sga, 10 years ago

NEMO branch nemo_v3_3_beta
Add NOCS tools based on SCRIP package for creating weights for interpolation on the fly
These now should build with the maketools script in the TOOLS directory using the same
architecture configuration file as the model (hopefully)

File size: 3.0 KB
Line 
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
35      module netcdf_mod
36
37!-----------------------------------------------------------------------
38
39      use kinds_mod
40      use constants
41
42      implicit none
43
44      include 'netcdf.inc'
45
46!***********************************************************************
47
48      contains
49
50!***********************************************************************
51
52      subroutine netcdf_error_handler(istat, mess)
53
54!-----------------------------------------------------------------------
55!
56!     This routine provides a simple interface to netCDF error message
57!     routine.
58!
59!-----------------------------------------------------------------------
60
61      integer (kind=int_kind), intent(in) ::  &
62          istat   ! integer status returned by netCDF function call
63      character (len=*), intent(in), optional :: mess
64
65!-----------------------------------------------------------------------
66
67      if (istat /= NF_NOERR) then
68       if (present(mess)) then
69         print *,'Error in netCDF: ',nf_strerror(istat), 'Message: ',mess
70       else
71         print *,'Error in netCDF: ',nf_strerror(istat)
72       endif
73        stop
74      endif
75
76!-----------------------------------------------------------------------
77
78      end subroutine netcdf_error_handler
79
80!***********************************************************************
81
82      end module netcdf_mod
83
84!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Note: See TracBrowser for help on using the repository browser.