source: LMDZ6/trunk/libf/dyn3d/abort_gcm.F90 @ 5300

Last change on this file since 5300 was 5282, checked in by abarral, 4 days ago

Turn iniprint.h clesphys.h into modules
Remove unused description.h

  • Property copyright set to
    Name of program: LMDZ
    Creation date: 1984
    Version: LMDZ5
    License: CeCILL version 2
    Holder: Laboratoire de m\'et\'eorologie dynamique, CNRS, UMR 8539
    See the license file in the root directory
  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 988 bytes
Line 
1!
2! $Id: abort_gcm.F90 5282 2024-10-28 12:11:48Z abarral $
3!
4!
5!
6SUBROUTINE abort_gcm(modname, message, ierr)
7
8  USE iniprint_mod_h
9USE IOIPSL
10  !! ug Pour les sorties XIOS
11  USE wxios
12
13
14  !
15  ! Stops the simulation cleanly, closing files and printing various
16  ! comments
17  !
18  !  Input: modname = name of calling program
19  !     message = stuff to print
20  !     ierr    = severity of situation ( = 0 normal )
21
22  character(len=*), intent(in):: modname
23  integer, intent(in):: ierr
24  character(len=*), intent(in):: message
25
26  write(lunout,*) 'in abort_gcm'
27
28  IF (using_xios) THEN
29  !Fermeture propre de XIOS
30    CALL wxios_close()
31  ENDIF
32
33  call histclo
34  call restclo
35  call getin_dump
36  ! call histclo(2)
37  ! call histclo(3)
38  ! call histclo(4)
39  ! call histclo(5)
40  write(lunout,*) 'Stopping in ', modname
41  write(lunout,*) 'Reason = ',message
42  if (ierr .eq. 0) then
43    write(lunout,*) 'Everything is cool'
44    stop
45  else
46    write(lunout,*) 'Houston, we have a problem, ierr = ', ierr
47    stop 1
48  endif
49END SUBROUTINE abort_gcm
Note: See TracBrowser for help on using the repository browser.