00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011 subroutine psmile_warning ( ierror, char_string, ierrp, nerrp, &
00012 file, line )
00013
00014
00015
00016 use PRISM_constants
00017 use PSMILe, dummy_interface => PSMILe_Warning
00018
00019 implicit none
00020
00021
00022
00023 character(len=*), Intent(In) :: char_string
00024
00025
00026
00027 integer, Intent (In) :: ierror
00028
00029
00030
00031 integer, Intent (In) :: nerrp
00032
00033
00034
00035 integer, Intent (In) :: ierrp (nerrp)
00036
00037
00038
00039 character(len=*), Intent(In) :: file
00040
00041
00042
00043 integer, Intent (In) :: line
00044
00045
00046
00047
00048
00049 integer :: lenstr
00050 logical :: abort
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072 Character(len=len_cvs_string), save :: mycvs =
00073 '$Id: psmile_warning.F90 2325 2010-04-21 15:00:07Z valcke $'
00074
00075
00076
00077
00078
00079 call psmile_flushstd
00080
00081 abort = .true.
00082
00083 lenstr = len_trim (char_string)
00084
00085 write (*, 9990) trim(ch_id), file, line
00086
00087 select case ( ierror )
00088
00089 case ( PRISM_Warn_Init )
00090
00091 write (*, 1010) trim(ch_id), char_string(1:lenstr), &
00092 'Multiple calls to PRISM_Init from application', ierrp (1)
00093
00094 case ( PRISM_Warn_Size )
00095
00096 write (*, 1010) trim(ch_id), char_string(1:lenstr), &
00097 ' must be of same size for field with Id', ierrp (1)
00098
00099 case ( PRISM_Warn_Mask )
00100
00101 write (*, 1020) trim(ch_id), char_string(1:lenstr), ierrp (1)
00102
00103
00104
00105 case ( PRISM_Warn_Grid_Periodic )
00106
00107 write (*, 1170) trim(Grids(ierrp(1))%grid_name), &
00108 trim(Comps(ierrp(2))%comp_name), &
00109 ierrp (3), &
00110 char_string(1:lenstr)
00111
00112
00113
00114 case ( PRISM_Warn_Cell )
00115
00116 write (*, 1180) char_string(1:lenstr), ierrp (1), ierrp (2)
00117
00118
00119
00120
00121 case ( PRISM_Warn_NoDefVar )
00122
00123 write (*, 1190) char_string(1:lenstr)
00124
00125 case default
00126
00127
00128
00129 write (*, 9980) trim(ch_id), ierror, nerrp, char_string(1:lenstr)
00130 write (*, 9970) ierrp
00131
00132 end select
00133
00134 call psmile_flushstd
00135
00136
00137
00138
00139
00140
00141
00142 1010 format (1x, a, ': --> Warning : ', a, a, i8 )
00143 1020 format (1x, a, ': --> Warning : ', a, i8 )
00144
00145 1170 format (1x, 'Warning for Grid definition of grid ', a, &
00146 ' of comp ', a, ':' &
00147 /1x, 'Periodicity:', i7 &
00148 /1x, a)
00149
00150 1180 format (1x, 'Warning for Cell definition of grid ' &
00151 /1x, a, ' at i: ', i7, ' j: ', i7)
00152
00153 1190 format (1x, ' A transient with name ', a, ' is defined in the' &
00154 /1x, ' component SMIOC file but no corresponding call ' &
00155 /1x, ' to prism_def_var is performed by the component.' &
00156 /1x, ' Check that this is done on purpose.' )
00157
00158
00159
00160 9980 format (1x, a, ': PSMILe Unknown warning code', 1x, i6, '; nerrp', i4, &
00161 /1x, 'string: ', a)
00162 9970 format (1x, 10i7)
00163
00164 9990 format (1x, a, ': PSMILe Warning in File ', a, '; line', i6 )
00165
00166 end subroutine PSMILe_Warning