Mercurial > repos > greg > validate_temperature_data
changeset 17:bcbdc7f7aa7a draft default tip
Uploaded
author | greg |
---|---|
date | Tue, 27 Nov 2018 11:02:04 -0500 |
parents | 304b46e9a34b |
children | |
files | validate_temperature_data.py |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/validate_temperature_data.py Tue Nov 27 10:57:30 2018 -0500 +++ b/validate_temperature_data.py Tue Nov 27 11:02:04 2018 -0500 @@ -115,7 +115,7 @@ # Make sure the DOY values are consecutive. try: if int(doy) != (last_doy + 1): - accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains a DOY (%s) that is not conexcutive." % (i, doy)) + accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains a DOY (%s) that is not conexcutive (previous DOY is %d)." % (i, doy, last_doy)) stop_error(accumulated_msgs) else: last_doy += 1 @@ -151,12 +151,13 @@ else: try: if int(doy) != (last_doy + 1): - accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains a DOY (%s) that is not conexcutive." % (i, doy)) + accumulated_msgs = add_error_msg(accumulated_msgs, "Line %d contains a DOY (%s) that is not conexcutive (previous DOY is %d)." % (i, doy, last_doy)) stop_error(accumulated_msgs) + else: + last_doy += 1 except Exception: # The error for an invalid integer was captured above. pass - last_doy += 1 tmin = items[4].strip() accumulated_msgs = validate_decimal(i, tmin, accumulated_msgs, "tmin") tmax = items[5].strip()