Perform a check on the input data to make sure values are within required ranges.
416
417 class(AtsType) :: this
418
419 integer(I4B) :: n
420 write (iout, '(1x,a)') 'PROCESSING ATS INPUT'
421 do n = 1, this%maxats
422
423
424 if (this%iperats(n) < 1) then
425 write (errmsg, '(a, i0, a, i0)') &
426 'IPERATS must be greater than zero. Found ', this%iperats(n), &
427 ' for ATS PERIODDATA record ', n
428 call store_error(errmsg)
429 end if
430 if (this%iperats(n) > this%nper) then
431 write (warnmsg, '(a, i0, a, i0)') &
432 'IPERATS greater than NPER. Found ', this%iperats(n), &
433 ' for ATS PERIODDATA record ', n
434 call store_warning(warnmsg)
435 end if
436
437
438 if (this%dt0(n) < dzero) then
439 write (errmsg, '(a, g15.7, a, i0)') &
440 'DT0 must be >= zero. Found ', this%dt0(n), &
441 ' for ATS PERIODDATA record ', n
442 call store_error(errmsg)
443 end if
444
445
446 if (this%dtmin(n) <= dzero) then
447 write (errmsg, '(a, g15.7, a, i0)') &
448 'DTMIN must be > zero. Found ', this%dtmin(n), &
449 ' for ATS PERIODDATA record ', n
450 call store_error(errmsg)
451 end if
452
453
454 if (this%dtmax(n) <= dzero) then
455 write (errmsg, '(a, g15.7, a, i0)') &
456 'DTMAX must be > zero. Found ', this%dtmax(n), &
457 ' for ATS PERIODDATA record ', n
458 call store_error(errmsg)
459 end if
460
461
462 if (this%dtmin(n) > this%dtmax(n)) then
463 write (errmsg, '(a, 2g15.7, a, i0)') &
464 'DTMIN must be < dtmax. Found ', this%dtmin(n), this%dtmax(n), &
465 ' for ATS PERIODDATA record ', n
466 call store_error(errmsg)
467 end if
468
469
470 if (this%dtadj(n) .ne. dzero .and. this%dtadj(n) < done) then
471 write (errmsg, '(a, g15.7, a, i0)') &
472 'DTADJ must be 0 or >= 1.0. Found ', this%dtadj(n), &
473 ' for ATS PERIODDATA record ', n
474 call store_error(errmsg)
475 end if
476
477
478 if (this%dtfailadj(n) .ne. dzero .and. this%dtfailadj(n) < done) then
479 write (errmsg, '(a, g15.7, a, i0)') &
480 'DTFAILADJ must be 0 or >= 1.0. Found ', this%dtfailadj(n), &
481 ' for ATS PERIODDATA record ', n
482 call store_error(errmsg)
483 end if
484
485 end do
486
487
488 if (count_errors() > 0) then
489 call this%parser%StoreErrorUnit()
490 end if
491 write (iout, '(1x,a)') 'DONE PROCESSING ATS INPUT'