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

Last change on this file since 5258 was 5246, checked in by abarral, 6 weeks ago

Convert fixed-form to free-form sources .F -> .{f,F}90
(WIP: some .F remain, will be handled in subsequent commits)

  • 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: 1.1 KB
Line 
1!
2! $Id: abort_gcm.F90 5246 2024-10-21 12:58:45Z abarral $
3!
4!
5!
6SUBROUTINE 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  !! ug Pour les sorties XIOS
15  USE wxios
16
17#include "iniprint.h"
18
19  !
20  ! Stops the simulation cleanly, closing files and printing various
21  ! comments
22  !
23  !  Input: modname = name of calling program
24  !     message = stuff to print
25  !     ierr    = severity of situation ( = 0 normal )
26
27  character(len=*), intent(in):: modname
28  integer, intent(in):: ierr
29  character(len=*), intent(in):: message
30
31  write(lunout,*) 'in abort_gcm'
32
33  IF (using_xios) THEN
34  !Fermeture propre de XIOS
35    CALL wxios_close()
36  ENDIF
37
38#ifdef CPP_IOIPSL
39  call histclo
40  call restclo
41#endif
42  call getin_dump
43  ! call histclo(2)
44  ! call histclo(3)
45  ! call histclo(4)
46  ! call histclo(5)
47  write(lunout,*) 'Stopping in ', modname
48  write(lunout,*) 'Reason = ',message
49  if (ierr .eq. 0) then
50    write(lunout,*) 'Everything is cool'
51    stop
52  else
53    write(lunout,*) 'Houston, we have a problem, ierr = ', ierr
54    stop 1
55  endif
56END SUBROUTINE abort_gcm
Note: See TracBrowser for help on using the repository browser.