source: trunk/LMDZ.COMMON/libf/dyn3d/abort_gcm.F @ 3020

Last change on this file since 3020 was 1391, checked in by emillour, 10 years ago

Common dynamical core:
Updates in the dynamics to keeup up with updates in LMDZ5
(up to LMDZ5 trunk rev 2200):

  • compilation:
  • create_make_gcm : added processing of .f & .f90 files (not just .F and .F90)
  • makelmdz: add "mix" option for -io (ouptut with both IOIPSL and XIOS)
  • makelmdz_fcm: add "mix" option for -io
  • filtrez:
  • acc.F and eigen.F : add "implicit none" and variable declarations
  • bibio:
  • handle_err_m.F90: replace "stop" with call to abort_gcm()
  • i1mach.F, j4save.F: add "implicit none" and variable declarations
  • xercnt.F, xermsg.F, xerprn.F, xersve.F, xgetua.F: add "implicit none" and variable declarations
  • dyn3d_common:
  • disvert.F90 : added comments on meaning of "pa" variable
  • grid_atob.F : better control on level of default ouputs
  • infotrac.F90: update Earth-specific stuff (nqo water tracers)
  • interpre.F: correction on the size of input array w
  • juldate.F, massbar.F, ppm3d.F, ran1.F: add "implicit none" and variable declarations
  • sortvarc.F: code cleanup
  • iniacademic.F90: cleanup and extra sanity check.
  • dyn3d:
  • abort_gcm.F: additions for XIOS
  • conf_gcm.F90: transformed to free form from conf_gcm.F
  • gcm.F: added test to check that iphysiq is a multiple of iperiod
  • getparam.F90, guidz_mod.F: update from LMDZ5
  • integrd.F: replace stop with call_abort()
  • dyn3dpar:
  • abort_gcm.F: minor cleanup
  • gcm.F: added test to check that iphysiq is a multiple of iperiod
  • getparam.F90, guide_p_mod.F90: update from LMDZ5
  • integrd_p.F: abort with call_abort when there is negative surface pressure
  • leapfrog_p.F: add INCA specific stuff to keep up with current LMDZ5
  • conf_gcm.F90: transformed to free form from conf_gcm.F

EM

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