source: LMDZ6/branches/Amaury_dev/libf/dyn3d/abort_gcm.F90 @ 5127

Last change on this file since 5127 was 5118, checked in by abarral, 3 months ago

Replace iniprint.h by lmdz_iniprint.f90
(lint) along the way

  • 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: 948 bytes
Line 
1! $Id: abort_gcm.F90 5118 2024-07-24 14:39:59Z snguyen $
2
3!
4!
5SUBROUTINE abort_gcm(modname, message, ierr)
6
7  USE IOIPSL
8  !! ug Pour les sorties XIOS
9  USE lmdz_wxios
10  USE lmdz_iniprint, ONLY: lunout, prt_level
11
12  !
13  ! Stops the simulation cleanly, closing files and printing various
14  ! comments
15  !
16  !  Input: modname = name of calling program
17  !     message = stuff to print
18  !     ierr    = severity of situation ( = 0 normal )
19
20  CHARACTER(LEN = *), INTENT(IN) :: modname
21  INTEGER, INTENT(IN) :: ierr
22  CHARACTER(LEN = *), INTENT(IN) :: message
23
24  WRITE(lunout, *) 'in abort_gcm'
25
26  IF (using_xios) THEN
27    !Fermeture propre de XIOS
28    CALL wxios_close()
29  ENDIF
30
31  CALL histclo
32  CALL restclo
33  CALL getin_dump
34  WRITE(lunout, *) 'Stopping in ', modname
35  WRITE(lunout, *) 'Reason = ', message
36  IF (ierr == 0) THEN
37    WRITE(lunout, *) 'Everything is cool'
38    stop
39  else
40    WRITE(lunout, *) 'Houston, we have a problem, ierr = ', ierr
41    stop 1
42  ENDIF
43END SUBROUTINE abort_gcm
Note: See TracBrowser for help on using the repository browser.