source: branches/jerome/src_flexwrf_v3.1/check_ncerror.f90 @ 16

Last change on this file since 16 was 16, checked in by jebri, 11 years ago

sources for flexwrf v3.1

File size: 2.4 KB
Line 
1!***********************************************************************
2!* Copyright 2012,2013                                                 *
3!* Adam Dingwell,                                                      *
4!*                                                                     *
5!* This file is part of FLEXPART WRF                                   *
6!                                                                      *
7! FLEXPART is free software: you can redistribute it and/or modify     *
8! it under the terms of the GNU General Public License as published by *
9! the Free Software Foundation, either version 3 of the License, or    *
10! (at your option) any later version.                                  *
11!                                                                      *
12! FLEXPART is distributed in the hope that it will be useful,          *
13! but WITHOUT ANY WARRANTY; without even the implied warranty of       *
14! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        *
15! GNU General Public License for more details.                         *
16!                                                                      *
17! You should have received a copy of the GNU General Public License    *
18! along with FLEXPART.  If not, see <http://www.gnu.org/licenses/>.    *
19!***********************************************************************
20
21subroutine check_ncerror(errcode)
22
23  !*****************************************************************************
24  !                                                                            *
25  ! This function checks the return value of any call to the netcdf interface. *
26  ! The subroutine should be called directly after any call to any nf_*        *
27  ! functions, unless some other means of erro handling has been implemented.  *
28  !                                                                            *
29  !     Author: A. Dingwell                                                    *
30  !                                                                            *
31  !     27 May 2013                                                            *
32  !                                                                            *
33  !*****************************************************************************
34
35  implicit none
36  include 'netcdf.inc'
37  integer errcode
38
39  if( errcode.ne.nf_noerr ) then
40    print*, 'Error: ', nf_strerror(errcode)
41    stop
42  endif
43  return
44end subroutine check_ncerror
45
Note: See TracBrowser for help on using the repository browser.
hosted by ZAMG