prism_error.F90

Go to the documentation of this file.
00001 !-----------------------------------------------------------------------
00002 ! Copyright 2006-2010, CERFACS, Toulouse, France.
00003 ! Copyright 2006-2010, SGI Germany, Munich, Germany.
00004 ! Copyright 2006-2010, NEC Europe Ltd., London, UK.
00005 ! All rights reserved. Use is subject to OASIS4 license terms.
00006 !-----------------------------------------------------------------------
00007 !BOP
00008 !
00009 ! !ROUTINE: PRISM_Error
00010 !
00011 ! !INTERFACE:
00012 
00013       subroutine prism_error ( ierror, error_message )
00014 !
00015 ! !USES:
00016 !
00017       use PRISM, dummy_interface => prism_error
00018 !
00019       use PSMILe
00020 
00021       implicit none
00022 !
00023 !
00024 ! !INPUT PARAMETERS:
00025 !
00026       integer, Intent (In)                :: ierror
00027 !
00028 ! !OUTPUT PARAMETERS:
00029 !
00030       character(len=*), Intent (Out)      :: error_message
00031 !
00032 ! !DESCRIPTION:
00033 !
00034 !     Subroutine "prism_error" returns a corresponding error string
00035 !
00036 !
00037 ! !REVISION HISTORY:
00038 !   Date      Programmer   Description
00039 ! ----------  ----------   -----------
00040 ! 03.05/03    R. Redler    created
00041 !
00042 !EOP
00043 !----------------------------------------------------------------------
00044 !
00045 ! $Id: prism_error.F90 2706 2010-11-04 15:33:32Z hanke $
00046 ! $Author: hanke $
00047 !
00048   Character(len=len_cvs_string), save :: mycvs = 
00049       '$Id: prism_error.F90 2706 2010-11-04 15:33:32Z hanke $'
00050 !
00051 !----------------------------------------------------------------------
00052 !
00053       select case ( ierror )
00054 
00055 !   Error in an MPI routine
00056 
00057       case ( PRISM_Success )
00058 
00059          error_message = 'No error'
00060 
00061 !   Error in an MPI routine
00062 
00063       case ( PRISM_Error_MPI )
00064 
00065          error_message = 'Error in MPI routine called from PSMILe!'
00066 
00067 !   Error in a PSMILe routine
00068 
00069       case ( PRISM_Error_Parameter )
00070 
00071          error_message = 'Error in PSMILe: Wrong parameter!'
00072 
00073       case ( PRISM_Error_Initialized )
00074 
00075          error_message = 'PRISM system is not initialized!'
00076 
00077       case ( PRISM_Error_Alloc )
00078 
00079          error_message = 'Error in PSMILe: Unable to allocate memory!'
00080 
00081       case ( PRISM_Error_Dealloc )
00082 
00083          error_message = 'Error in PSMILe: Unable to deallocate memory!'
00084 
00085       case ( PRISM_Error_Arg )
00086 
00087          error_message = 'Error in PSMILe: Wrong Argument!'
00088 
00089       case ( PRISM_Error_Invalid_Arg )
00090 
00091          error_message = 'Error in PSMILe: Invalid Argument!'
00092 
00093       case ( PRISM_Error_App )
00094 
00095          error_message = 'Error in specification of applications!'
00096 
00097       case ( PRISM_Error_Grid )
00098 
00099          error_message = 'Error in PSMILe: Error in Grid definition!'
00100 
00101       case ( PRISM_Error_Gridtype )
00102 
00103          error_message = 'Error in PSMILe: Error in Corner definition!'
00104 
00105       case ( PRISM_Error_Comp_name )
00106 
00107          error_message = 'Error in PSMILe: Error in Component name!'
00108 
00109       case ( PRISM_Error_Mask )
00110 
00111          error_message = 'Error in PSMILe: Error in Mask definition for gridless Grids!'
00112 
00113       case ( PRISM_Error_Arglist )
00114 
00115          error_message = 'Error in PSMILe: Error in Argument list!'
00116 
00117       case ( PRISM_Error_Wrong )
00118 
00119          error_message = 'Error in PSMILe: Wrong message received!'
00120 
00121       case ( PRISM_Error_Date )
00122 
00123          error_message = 'Error in PSMILe: Inconsistent date or data bounds!'
00124 
00125 !   Internal PSMILe error
00126 
00127       case (PRISM_Error_Internal )
00128 
00129          error_message = 'Internal PSMILe error!'
00130 
00131       case ( PRISM_Warn_Init )
00132 
00133          error_message = 'Warning in PSMILe: Multiple calls to PRISM_Init.'
00134 
00135       case ( PRISM_Warn_Size )
00136 
00137          error_message = 'Warning in PSMILe: Size of arrays is inconsistent.'
00138 
00139 !   Unknown error code
00140 
00141       case default
00142 
00143          error_message = 'Unknown error code!'
00144 
00145       end select
00146 
00147       end subroutine prism_error

Generated on 18 Mar 2011 for Oasis4 by  doxygen 1.6.1