Definition at line 2 of file suews_ctrl_error.f95.
References defaultnotused::errorchoice, data_in::suppresswarnings, and defaultnotused::warningchoice.
Referenced by resist_module::aerodynamicresistance(), anohm_module::anohm(), anemsn_module::anthropogenicemissions(), atmmoiststab_module::cal_atmmoist(), atmmoiststab_module::cal_stab(), bluews_module::cbl(), bluews_module::cbl_initial(), bluews_module::cbl_readinputdata(), checkinitial(), codematchanthropogenic(), codematchbiogen(), codematchconductance(), codematchdist(), codematchestm(), codematchestm_class(), codematchirrigation(), codematchnonveg(), codematchohm(), codematchprof(), codematchsnow(), codematchsoil(), codematchveg(), codematchwater(), bluews_module::diff(), metdisagg::disagg_lin(), metdisagg::disaggp_amongn(), metdisagg::disaggp_amongnmult(), metdisagg::disaggregateestm(), metdisagg::disaggregatemet(), waterdist_module::drainage(), initialstate(), inputheadercheck(), meteo::lat_vap(), metread(), bluews_module::nbl(), nextinitial(), numberrows(), ohm(), overallruncontrol(), meteo::psyc_const(), meteo::qsatf(), readcoeff(), meteo::sat_vap_press_x(), meteo::sat_vap_pressice(), skipheader(), narp_module::smithlambda(), waterdist_module::soilstore(), bluews_module::sonde(), meteo::spec_heat_beer(), suews_driver::suews_cal_anthropogenicemission(), resist_module::suews_cal_roughnessparameters(), waterdist_module::suews_cal_soilstate(), suews_calculations(), estm_module::suews_getestmdata(), suews_driver::suews_init_qh(), suews_initializemetdata(), suews_program(), suews_translate(), and resist_module::surfaceresistance().
23 REAL(KIND(1d0))::
VALUE, value2
25 CHARACTER(len=*)::problemfile
26 CHARACTER(len=150)::text1
28 INTEGER:: errh, valuei, valuei2
29 INTEGER,
DIMENSION(80):: errhcount = 0
32 CHARACTER(len=1024) :: message
34 CHARACTER(len=1024) :: errmessage
35 CHARACTER(len=1024) :: stopmessage
40 LOGICAL:: v1, v2, v3, v4, v5, v6, v7, v8
43 text1 =
'unknown problem' 67 text1 =
'Check value in SUEWS_SiteSelect.txt.' 69 ELSEIF (errh == 2)
THEN 70 text1 =
'Cannot perform disaggregation.' 72 ELSEIF (errh == 3)
THEN 73 text1 =
'Met forcing file should contain only 1 year of data.' 75 ELSEIF (errh == 4)
THEN 76 text1 =
'Rainfall in original met forcing file exceeds intensity threshold.' 80 ELSEIF (errh == 6)
THEN 81 text1 =
'Value obtained exceeds permitted range, setting to +/-9999 in output file.' 84 ELSEIF (errh == 7)
THEN 85 text1 =
'RA value obtained exceeds permitted range.' 88 ELSEIF (errh == 8)
THEN 89 text1 =
'Check values in SUEWS_WithinGridWaterDist.txt.' 91 ELSEIF (errh == 9)
THEN 92 text1 =
'Check ToRunoff and ToSoilStore values in SUEWS_WithinGridWaterDist.txt.' 94 ELSEIF (errh == 10)
THEN 95 text1 =
'Check values in SUEWS_SiteSelect.txt.' 97 ELSEIF (errh == 11)
THEN 98 text1 =
'File not found.' 101 ELSEIF (errh == 13)
THEN 102 text1 =
'Check met forcing file.' 104 ELSEIF (errh == 14)
THEN 105 text1 =
'Inappropriate value calculated.' 107 ELSEIF (errh == 15)
THEN 108 text1 =
'Check H_Bldgs, H_EveTr and H_DecTr in SUEWS_SiteSelect.txt' 112 ELSEIF (errh == 17)
THEN 113 text1 =
'Problem with (z-zd) and/or z0.' 115 ELSEIF (errh == 18)
THEN 116 text1 =
'Check soil depth relative to soil moisture and capacity.' 118 ELSEIF (errh == 19)
THEN 119 text1 =
'Caution - check range.' 122 ELSEIF (errh == 20)
THEN 123 text1 =
' skip lines, ios_out.' 125 ELSEIF (errh == 21)
THEN 126 text1 =
'Bad input for OHM/AnOHM storage heat flux calculation. Check qn, qn_Sn, qf for issues.' 128 ELSEIF (errh == 22)
THEN 129 text1 =
' QH_observed, QE_observed, QH_choice: ' 132 ELSEIF (errh == 23)
THEN 133 text1 =
'CBL-sonde -need to increase size of izm:zmax,izm' 135 ELSEIF (errh == 24)
THEN 136 text1 =
'CBL file problem - opening' 138 ELSEIF (errh == 25)
THEN 139 text1 =
'CBL file problem -- reading sonde data, line:' 141 ELSEIF (errh == 26)
THEN 142 text1 =
'Check that FileCode, FileInputPath and FileOutputPath are specified correctly in RunControl.nml.' 144 ELSEIF (errh == 27)
THEN 145 text1 =
'Problems with Met data -forcing data: variable value, dectime' 147 ELSEIF (errh == 28)
THEN 148 text1 =
'Processing in subroutine indicated has a problem, variables' 151 ELSEIF (errh == 29)
THEN 152 text1 =
'Processing in subroutine indicated has a problem, time, variables' 155 ELSEIF (errh == 30)
THEN 156 text1 =
'Processing in subroutine indicated has a problem, time, variables' 159 ELSEIF (errh == 31)
THEN 160 text1 =
'Processing in subroutine indicated has a problem, time, variables' 163 ELSEIF (errh == 32)
THEN 164 text1 =
'Model applicable to local scale, z<z0d' 166 ELSEIF (errh == 33)
THEN 167 text1 =
'Number of snow layers too large.' 169 ELSEIF (errh == 34)
THEN 170 text1 =
'Air temperature > 55 C -- will keep running' 173 ELSEIF (errh == 35)
THEN 174 text1 =
'Problems with Met data -forcing data: doy, dectime' 176 ELSEIF (errh == 36)
THEN 177 text1 =
'Problem found in InitialConditions file!' 179 ELSEIF (errh == 37)
THEN 180 text1 =
'Check inputs in InitialConditions file!' 183 ELSEIF (errh == 38)
THEN 184 text1 =
'H=(qn*0.2)/(avdens*avcp)' 187 ELSEIF (errh == 39)
THEN 188 text1 =
'Different value of TSTEP needed (300 s recommended). Resolution of forcing data must match TSTEP set in RunControl.' 190 ELSEIF (errh == 40)
THEN 191 text1 =
'SOLWEIG file problem - opening' 193 ELSEIF (errh == 41)
THEN 194 text1 =
' addwaterbody= Error1-- but watersurf= Error 2' 196 ELSEIF (errh == 42)
THEN 197 text1 = .OR..OR.
'abs(rho_d)<0.001000abs(rho_v)<0.001000abs(rho_d+rho_v)<0.001000) rho_v,rho_d, T' 200 ELSEIF (errh == 43)
THEN 201 text1 =
'Switching Years - will keep running' 204 ELSEIF (errh == 44)
THEN 205 text1 =
'Initial File Name - will keep going' 208 ELSEIF (errh == 45)
THEN 209 text1 =
'Pressure < 900 hPa, Loop Number' 212 ELSEIF (errh == 46)
THEN 213 text1 =
'Pressure < 900 hPa' 216 ELSEIF (errh == 47)
THEN 217 text1 =
'File missing' 219 ELSEIF (errh == 48)
THEN 220 text1 =
'Something wrong in the rows of the file' 222 ELSEIF (errh == 49)
THEN 223 text1 =
'Problems in saving to InitialConditionsYYYY.nml' 224 ELSEIF (errh == 50)
THEN 225 text1 =
'Wrong number of lines read: nsurf, [-1 EOF; -2 EOR]' 227 ELSEIF (errh == 51)
THEN 228 text1 =
'Problems in opening the file' 229 WRITE (*, *) problemfile
230 ELSEIF (errh == 52)
THEN 231 text1 =
'Problems opening the output file.' 232 ELSEIF (errh == 53)
THEN 233 text1 = .and..and.
'AH_min=0Ah_slope=0T_Critic=0, AnthropHeatMethod=' 236 ELSEIF (errh == 54)
THEN 237 text1 = .and..and.
'QF_A=0QF_B=0QF_C=0, AnthropHeatMethod=' 240 ELSEIF (errh == 55)
THEN 241 text1 =
'InputmetFormat=' 244 ELSEIF (errh == 56)
THEN 245 text1 =
'Check input files against manual (N.B. Case sensitive).' 247 ELSEIF (errh == 57)
THEN 248 text1 =
'not found. Check input files.' 250 ELSEIF (errh == 58)
THEN 251 text1 =
'File header not specified in model code.' 253 ELSEIF (errh == 59)
THEN 254 text1 =
'not found. Check SUEWS_SiteSelect.txt.' 256 ELSEIF (errh == 60)
THEN 257 text1 =
'non-unique code.' 259 ELSEIF (errh == 61)
THEN 260 text1 =
'Check coefficients and drainage equation specified in input files.' 263 ELSEIF (errh == 62)
THEN 264 text1 =
'Problem with soil moisture calculation.' 266 ELSEIF (errh == 63)
THEN 267 text1 =
'Problem with calculation.' 269 ELSEIF (errh == 64)
THEN 270 text1 =
'SUEWS cannot currently handle this many grids.' 272 ELSEIF (errh == 65)
THEN 273 text1 =
'Negative gs calculated! Check suitability of parameters in SUEWS_Conductance.txt.' 276 ELSEIF (errh == 66)
THEN 277 text1 =
'Different number of lines in ESTM forcing and Met forcing files.' 279 ELSEIF (errh == 67)
THEN 280 text1 =
'ESTMClass1 automatically set to 100%.' 283 ELSEIF (errh == 68)
THEN 284 text1 =
'Initial Bowen ratio automatically set to 1.' 287 ELSEIF (errh == 69)
THEN 288 text1 =
'Setting QF_traff to zero. Check input data.' 291 ELSEIF (errh == 70)
THEN 292 text1 =
'Specify profile values between 1 (night) and 2 (day).' 294 ELSEIF (errh == 71)
THEN 295 text1 =
'Check input file SUEWS_Conductance.txt.' 297 ELSEIF (errh == 72)
THEN 298 text1 =
'RunControl.nml: ResolutionFilesOut must be an integer multiple of TSTEP' 300 ELSEIF (errh == 73)
THEN 301 text1 =
'Iteration loop stopped for too stable conditions.' 304 ELSEIF (errh == 74)
THEN 305 text1 =
'Iteration loop stopped for too unstable conditions.' 310 errhcount(errh) = errhcount(errh) + 1
316 WRITE (errmessage,
'(a,f9.4)')
' Value: ',
VALUE 318 WRITE (errmessage,
'(a,2f9.4)')
' Values: ',
VALUE, value2
320 WRITE (errmessage,
'(a,i10)')
' Value: ', valuei
322 WRITE (errmessage,
'(a,2f9.4,i10)')
' Values: ',
VALUE, value2, valuei
324 WRITE (errmessage,
'(a,f9.4,i10)')
' Values: ',
VALUE, valuei
327 WRITE (errmessage,
'(a,2i10)')
' Values: ', valuei, valuei2
329 valuei2 = int(value2)
330 WRITE (errmessage,
'(a,f9.4,2i10)')
' Values: ',
VALUE, valuei2, valuei
339 WRITE (message, *)
'Warning: ', trim(problemfile)
340 CALL wrf_debug(100, message)
341 WRITE (message, *) trim(text1)
342 CALL wrf_debug(100, message)
343 CALL wrf_debug(100, errmessage)
344 WRITE (message,
'(a,i14)')
' Count: ', errhcount(errh)
345 CALL wrf_debug(100, message)
348 OPEN (501, file=
'warnings.txt')
349 WRITE (*, *)
'>>> See warnings.txt for possible issues in the run <<<' 352 OPEN (501, file=
'warnings.txt', position=
"append")
356 WRITE (501, *)
'Warning: ', trim(problemfile)
359 WRITE (501, *) trim(text1)
362 WRITE (501, *) trim(errmessage)
364 WRITE (501,
'(a,i14)')
' Count: ', errhcount(errh)
372 WRITE (message, *)
'Problem: ', trim(problemfile)
373 CALL wrf_debug(100, message)
374 WRITE (message, *)
'ERROR! Program stopped: ', trim(text1)
375 CALL wrf_debug(100, message)
376 CALL wrf_debug(100, errmessage)
377 WRITE (message,
'(i3)') errh
378 CALL wrf_debug(100, message)
379 WRITE (message, *)
'ERROR! SUEWS run stopped.' 380 CALL wrf_debug(100, message)
381 WRITE (message, *)
'fatal error in SUEWS:', trim(text1)
382 CALL wrf_error_fatal(message)
385 OPEN (500, file=
'problems.txt')
386 WRITE (*, *)
'>>> See problems.txt for serious issues in the run <<<' 389 OPEN (500, file=
'problems.txt', position=
"append")
393 WRITE (500, *)
'Problem: ', trim(problemfile)
395 WRITE (500, *)
'ERROR! Program stopped: ', trim(text1)
398 WRITE (500, *) trim(errmessage)
400 WRITE (500,
'(i3)') errh
401 WRITE (*, *)
'ERROR! SUEWS run stopped.' 404 WRITE (*, *)
'problem: ', trim(problemfile)
405 WRITE (*, *)
'See problems.txt for more info.' 406 WRITE (stopmessage, *)
'fatal error in SUEWS:'//new_line(
'A')//trim(text1)
407 stop
'Fatal error in SUEWS!'