-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathice_exit.F90
55 lines (37 loc) · 1.25 KB
/
ice_exit.F90
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
! SVN:$Id$
!=======================================================================
!
! Exit the model.
!
! authors William H. Lipscomb (LANL)
! Elizabeth C. Hunke (LANL)
! 2006 ECH: separated serial and mpi functionality
module ice_exit
implicit none
public
!=======================================================================
contains
!=======================================================================
subroutine abort_ice(error_message)
! This routine aborts the ice model and prints an error message.
use ice_fileunits, only: nu_diag, flush_fileunit
#ifdef CCSM
use shr_sys_mod
#endif
character (len=*), intent(in) :: error_message
#ifdef CCSM
call shr_sys_abort(error_message)
#else
write (nu_diag,*) error_message
call flush_fileunit(nu_diag)
stop
#endif
end subroutine abort_ice
!=======================================================================
subroutine end_run
! Ends parallel run by calling MPI_FINALIZE.
! Does nothing in serial runs.
end subroutine end_run
!=======================================================================
end module ice_exit
!=======================================================================