!*********************************************************************** !* Copyright 2012,2013 * !* Adam Dingwell, * !* * !* This file is part of FLEXPART WRF * ! * ! FLEXPART is free software: you can redistribute it and/or modify * ! it under the terms of the GNU General Public License as published by * ! the Free Software Foundation, either version 3 of the License, or * ! (at your option) any later version. * ! * ! FLEXPART is distributed in the hope that it will be useful, * ! but WITHOUT ANY WARRANTY; without even the implied warranty of * ! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * ! GNU General Public License for more details. * ! * ! You should have received a copy of the GNU General Public License * ! along with FLEXPART. If not, see . * !*********************************************************************** subroutine check_ncerror(errcode) !***************************************************************************** ! * ! This function checks the return value of any call to the netcdf interface. * ! The subroutine should be called directly after any call to any nf_* * ! functions, unless some other means of erro handling has been implemented. * ! * ! Author: A. Dingwell * ! * ! 27 May 2013 * ! * !***************************************************************************** implicit none include 'netcdf.inc' integer errcode if( errcode.ne.nf_noerr ) then print*, 'Error: ', nf_strerror(errcode) stop endif return end subroutine check_ncerror