source: codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/libf/dyn3d/abort_gcm.F @ 222

Last change on this file since 222 was 222, checked in by ymipsl, 10 years ago

Creating temporary dynamico/lmdz/saturn branche

YM

File size: 1.1 KB
Line 
1!
2! $Id: abort_gcm.F 1425 2010-09-02 13:45:23Z lguez $
3!
4c
5c
6      SUBROUTINE abort_gcm(modname, message, ierr)
7     
8#ifdef CPP_IOIPSL
9      USE IOIPSL
10#else
11! if not using IOIPSL, we still need to use (a local version of) getin_dump
12      USE ioipsl_getincom
13#endif
14#include "iniprint.h"
15 
16C
17C Stops the simulation cleanly, closing files and printing various
18C comments
19C
20C  Input: modname = name of calling program
21C         message = stuff to print
22C         ierr    = severity of situation ( = 0 normal )
23
24      character(len=*) modname
25      integer ierr
26      character(len=*) message
27
28      write(lunout,*) 'in abort_gcm'
29#ifdef CPP_IOIPSL
30      call histclo
31      call restclo
32#endif
33      call getin_dump
34c     call histclo(2)
35c     call histclo(3)
36c     call histclo(4)
37c     call histclo(5)
38      write(lunout,*) 'Stopping in ', modname
39      write(lunout,*) 'Reason = ',message
40      if (ierr .eq. 0) then
41        write(lunout,*) 'Everything is cool'
42        stop
43      else
44        write(lunout,*) 'Houston, we have a problem ', ierr
45        stop 1
46      endif
47      END
Note: See TracBrowser for help on using the repository browser.