SURFEX  V8_0
Surfex V8_0 release
 All Classes Files Functions Variables
handle_err.F90
Go to the documentation of this file.
1 !SFX_LIC Copyright 1994-2014 CNRS, Meteo-France and Universite Paul Sabatier
2 !SFX_LIC This is part of the SURFEX software governed by the CeCILL-C licence
3 !SFX_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt
4 !SFX_LIC for details. version 1.
5 ! #########
6  SUBROUTINE handle_err(IRET,HNAME)
7 
8 !
9 USE yomhook ,ONLY : lhook, dr_hook
10 USE parkind1 ,ONLY : jprb
11 !
12 USE modi_abor1_sfx
13 !
14 implicit none
15 
16 include "netcdf.inc"
17 
18 integer, intent(in) :: iret
19 character(LEN=*),intent(in) :: hname
20 REAL(KIND=JPRB) :: zhook_handle
21 
22 ! - - - - - - - - - - - - - - - - - - - - - - - - - - -
23 
24  IF (lhook) CALL dr_hook('HANDLE_ERR',0,zhook_handle)
25  if (iret /= nf_noerr) then
26  write(*,*)'HANDLE_ERR: ',nf_strerror(iret)
27  CALL abor1_sfx('HANFLE_ERR: ABORTING PROGRAM TO WRITE A NETCDF FILE: '//hname)
28  endif
29 IF (lhook) CALL dr_hook('HANDLE_ERR',1,zhook_handle)
30 
31 END SUBROUTINE handle_err
subroutine handle_err(IRET, HNAME)
Definition: handle_err.F90:6
subroutine abor1_sfx(YTEXT)
Definition: abor1_sfx.F90:6