Last change
on this file since 3296 was
3076,
checked in by jbclement, 14 months ago
|
PEM:
Big cleaning/improvements of the PEM:
- Conversion of "abort_pem.F" and "soil_settings_PEM.F" into Fortran 90;
- Transformation of every PEM subroutines into module;
- Rewriting of many subroutines with modern Fortran syntax;
- Correction of a bug in "pem.F90" when calling 'recomp_tend_co2_slope'. The arguments were given in disorder and emissivity was missing;
- Update of "launch_pem.sh" in deftank.
JBC
|
File size:
1.3 KB
|
Line | |
---|
1 | MODULE abort_pem_mod |
---|
2 | |
---|
3 | implicit none |
---|
4 | |
---|
5 | !======================================================================= |
---|
6 | contains |
---|
7 | !======================================================================= |
---|
8 | |
---|
9 | SUBROUTINE abort_pem(modname,message,ierr) |
---|
10 | |
---|
11 | #ifdef CPP_IOIPSL |
---|
12 | use IOIPSL |
---|
13 | #else |
---|
14 | ! if not using IOIPSL, we still need to use (a local version of) getin_dump |
---|
15 | use ioipsl_getincom |
---|
16 | #endif |
---|
17 | |
---|
18 | #ifdef CPP_XIOS |
---|
19 | use wxios ! ug Pour les sorties XIOS |
---|
20 | #endif |
---|
21 | |
---|
22 | implicit none |
---|
23 | |
---|
24 | #include "iniprint.h" |
---|
25 | |
---|
26 | ! Stop the simulation cleanly, closing files and printing various comments |
---|
27 | ! Input: modname = name of calling program |
---|
28 | ! message = stuff to print |
---|
29 | ! ierr = severity of situation (= 0 normal) |
---|
30 | character(len = *), intent(in) :: modname |
---|
31 | integer, intent(in) :: ierr |
---|
32 | character(len = *), intent(in) :: message |
---|
33 | |
---|
34 | !----- Code |
---|
35 | write(lunout,*) 'in abort_pem' |
---|
36 | |
---|
37 | #ifdef CPP_XIOS |
---|
38 | CALL wxios_close() ! Fermeture propre de XIOS |
---|
39 | #endif |
---|
40 | |
---|
41 | #ifdef CPP_IOIPSL |
---|
42 | call histclo |
---|
43 | call restclo |
---|
44 | #endif |
---|
45 | |
---|
46 | call getin_dump |
---|
47 | write(lunout,*) 'Stopping in ', modname |
---|
48 | write(lunout,*) 'Reason = ', message |
---|
49 | if (ierr == 0) then |
---|
50 | write(lunout,*) 'Everything is cool' |
---|
51 | stop |
---|
52 | else |
---|
53 | write(lunout,*) 'Houston, we have a problem ', ierr |
---|
54 | stop 1 |
---|
55 | endif |
---|
56 | |
---|
57 | END SUBROUTINE abort_pem |
---|
58 | |
---|
59 | END MODULE abort_pem_mod |
---|
Note: See
TracBrowser
for help on using the repository browser.