source: LMDZ6/trunk/libf/dyn3d/abort_gcm.F @ 4660

Last change on this file since 4660 was 4619, checked in by yann meurdesoif, 17 months ago

Suppress usage of preprocessing key CPP_XIOS.
Wrapper file is used to suppress XIOS symbol when xios is not linked and not used (-io ioipsl)
The CPP_XIOS key is replaced in model by "using_xios" boolean variable to switch between IOIPSL or XIOS output.

YM

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