SICOPOLIS V3.0
 All Classes Files Functions Variables Macros
check.F90
Go to the documentation of this file.
1 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 !
3 ! Subroutine : c h e c k
4 !
5 !> @file
6 !!
7 !! NetCDF error capturing.
8 !!
9 !! @section Copyright
10 !!
11 !! Copyright 2009-2013 Ralf Greve
12 !!
13 !! @section License
14 !!
15 !! This file is part of SICOPOLIS.
16 !!
17 !! SICOPOLIS is free software: you can redistribute it and/or modify
18 !! it under the terms of the GNU General Public License as published by
19 !! the Free Software Foundation, either version 3 of the License, or
20 !! (at your option) any later version.
21 !!
22 !! SICOPOLIS is distributed in the hope that it will be useful,
23 !! but WITHOUT ANY WARRANTY; without even the implied warranty of
24 !! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
25 !! GNU General Public License for more details.
26 !!
27 !! You should have received a copy of the GNU General Public License
28 !! along with SICOPOLIS. If not, see <http://www.gnu.org/licenses/>.
29 !<
30 !+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
31 
32 !-------------------------------------------------------------------------------
33 !> NetCDF error capturing.
34 !<------------------------------------------------------------------------------
35 subroutine check(status)
36 
37 use sico_types
38 use netcdf
39 
40 implicit none
41 
42 integer(i4b), intent(in) :: status
43 
44 if (status /= nf90_noerr) then
45  write(6,'(1x,a)') trim(nf90_strerror(status))
46  stop ' check: Stopped due to NetCDF error!'
47 end if
48 
49 end subroutine check
50 !