Changeset 3989 for trunk/LMDZ.COMMON/libf/evolution/stop_pem.F90
- Timestamp:
- Dec 11, 2025, 12:56:05 PM (5 weeks ago)
- File:
-
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/libf/evolution/stop_pem.F90
r3988 r3989 1 MODULE abort_pem_mod1 MODULE stop_pem 2 2 3 3 implicit none … … 7 7 !======================================================================= 8 8 9 SUBROUTINE abort_pem(modname,message,ierr) 9 !======================================================================= 10 SUBROUTINE stop_clean(modname,message,ierr) 11 ! Stop the simulation cleanly, closing files and printing various comments 12 ! Inputs: modname = name of calling program 13 ! message = stuff to print 14 ! ierr = severity of situation (= 0 normal) 10 15 11 16 #ifdef CPP_IOIPSL 12 17 use IOIPSL 13 18 #else 14 ! if not using IOIPSL, we still need to use (a local version of) getin_dump19 ! If not using IOIPSL, we still need to use (a local version of) getin_dump 15 20 use ioipsl_getincom 16 21 #endif 17 22 18 23 #ifdef CPP_XIOS 19 use wxios ! ug Pour les sorties XIOS24 use wxios ! For XIOS outputs 20 25 #endif 21 26 … … 24 29 #include "iniprint.h" 25 30 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 31 ! Arguments 32 !---------- 33 character(*), intent(in) :: modname 34 integer, intent(in) :: ierr 35 character(*), intent(in) :: message 33 36 34 !----- Code 35 write(lunout,*) 'in abort_pem' 36 37 ! Code 38 !----- 37 39 #ifdef CPP_XIOS 38 CALL wxios_close() ! Fermeture propre de XIOS40 CALL wxios_close() ! Closing XIOS properly 39 41 #endif 40 42 41 43 #ifdef CPP_IOIPSL 42 call histclo 43 call restclo 44 call histclo() 45 call restclo() 44 46 #endif 45 47 46 call getin_dump 47 write(lunout,*) ' Stopping in ', modname48 call getin_dump() 49 write(lunout,*) 'stop_pem: stopping in ', modname 48 50 write(lunout,*) 'Reason = ', message 49 51 if (ierr == 0) then 50 52 write(lunout,*) 'Everything is cool!' 51 stop53 error stop 52 54 else 53 write(lunout,*) 'Houston, we have a problem ,ierr =', ierr54 stop 155 write(lunout,*) 'Houston, we have a problem! ierr =', ierr 56 error stop 1 55 57 endif 56 58 57 END SUBROUTINE abort_pem 59 END SUBROUTINE stop_clean 60 !======================================================================= 58 61 59 END MODULE abort_pem_mod62 END MODULE stop_pem
Note: See TracChangeset
for help on using the changeset viewer.
