source: LMDZ4/branches/LMDZ4-dev-20091210/libf/dyn3d/abort_gcm.F @ 1488

Last change on this file since 1488 was 1222, checked in by Ehouarn Millour, 15 years ago

Changes and cleanups to enable compiling without physics
and without ioipsl.

IOIPSL related cleanups:

  • bibio/writehist.F encapsulate the routine (which needs IOIPSL to function)

with #ifdef IOIPSL flag.

  • dyn3d/abort_gcm.F, dyn3dpar/abort_gcm.F and dyn3dpar/getparam.F90: use ioipsl_getincom module when not compiling with IOIPSL library, in order to always be able to use getin() routine.
  • removed unused "use IOIPSL" in dyn3dpar/guide_p_mod.F90
  • calendar related issue: Initialize day_ref and annee_ref in iniacademic.F (i.e. when they are not read from start.nc file)

Earth-specific programs/routines/modules:
create_etat0.F, fluxstokenc.F, limit_netcdf.F, startvar.F
(versions in dyn3d and dyn3dpar)
These routines and modules, which by design and porpose are made to function with
Earth physics are encapsulated with #CPP_EARTH cpp flag.

Earth-specific instructions:

  • calls to qminimum (specific treatment of first 2 tracers, i.e. water) in dyn3d/caladvtrac.F, dyn3d/integrd.F, dyn3dpar/caladvtrac_p.F, dyn3dpar/integrd_p.F only if (planet_type == 'earth')

Interaction with parallel physics:

  • routine dyn3dpar/parallel.F90 uses "surface_data" module (which is in the physics ...) to know value of "type_ocean" . Encapsulated that with #ifdef CPP_EARTH and set to a default type_ocean="dummy" otherwise.
  • So far, only Earth physics are parallelized, so all the interaction between parallel dynamics and parallel physics are encapsulated with #ifdef CCP_EARTH (this way we can run parallel without any physics). The (dyn3dpar) routines which contains such interaction are: bands.F90, gr_dyn_fi_p.F, gr_fi_dyn_p.F, mod_interface_dyn_phys.F90 This should later (when improving dyn/phys interface) be encapsulated with a more general and appropriate #ifdef CPP_PHYS cpp flag.

I checked that these changes do not alter results (on the simple
32x24x11 bench) on Ciclad (seq & mpi), Brodie (seq, mpi & omp) and
Vargas (seq, mpi & omp).

EM

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 1.2 KB
Line 
1!
2! $Id: abort_gcm.F 1222 2009-08-07 11:48:33Z jghattas $
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
14#include "iniprint.h"
15 
16C
17C Stops the simulation cleanly, closing files and printing various
18C comments
19C
20C  Input: modname = name of calling program
21C         message = stuff to print
22C         ierr    = severity of situation ( = 0 normal )
23
24      character(len=*) modname
25      integer ierr
26      character(len=*) message
27
28!      write(lunout,*) 'in abort_gcm'
29      write(6,*) 'in abort_gcm'
30#ifdef CPP_IOIPSL
31      call histclo
32      call restclo
33#endif
34      call getin_dump
35c     call histclo(2)
36c     call histclo(3)
37c     call histclo(4)
38c     call histclo(5)
39c     write(lunout,*) 'Stopping in ', modname
40c     write(lunout,*) 'Reason = ',message
41c     if (ierr .eq. 0) then
42c       write(lunout,*) 'Everything is cool'
43c     else
44c       write(lunout,*) 'Houston, we have a problem ', ierr
45c     endif
46      write(6,*) 'Stopping in ', modname
47      write(6,*) 'Reason = ',message
48      if (ierr .eq. 0) then
49        write(6,*) 'Everything is cool'
50      else
51        write(6,*) 'Houston, we have a problem ', ierr
52      endif
53      STOP
54      END
Note: See TracBrowser for help on using the repository browser.