powered by kaggle

Completed • $220,000 • 33 teams

Flight Quest 2: Flight Optimization, Final Phase

Sun 19 Jan 2014
– Sun 23 Feb 2014 (10 months ago)

So I based my GRIB2 parser on Ben Hamner's

https://github.com/benhamner/GribDotNet

and today I discovered that it fails to read data from January 31, 2014, because "Exception: System.ArgumentOutOfRangeException: Year, Month, and Day parameters describe an un-representable DateTime."

Is it OK to patch the parser at this stage, or should I just shoot myself? (I don't think shooting Ben for giving away free code would be entirely fair.)

Edit: In case anyone else has this problem, all you need to do is comment out the "+1" on line 43 of IdentificationSection.fs. Yes, the one preceding the comment "it looks like the days may have been 0-based, need to check this" :D

Thanks for the suggestion on how to fix the problem. Just to be sure: does the edit change anything in what is produced in days other than January 31st?

It just affects a date field in the file header. I guess most of us don't even use the field in which case it doesn't change anything. If you do use the date field you might get your wind predictions a day shifted compared to how it was before the fix.

I'm using Ben Hamner's parser which apparently uses the date field. But, as I understand it, if I parse for example a certain .grib2 file for January 19th, the result should be data for January 19th, even if the parser thinks it's parsing January 20th. Am I right?

Gabriele Seppi wrote:

I'm using Ben Hamner's parser which apparently uses the date field. But, as I understand it, if I parse for example a certain .grib2 file for January 19th, the result should be data for January 19th, even if the parser thinks it's parsing January 20th. Am I right?

As far as I can see that is indeed the case.

Yes, the date for the file was derived from the filename (as opposed to the data in the file), so everything should be correct outside of throwing an error on the 31.

Correcting this is perfectly fine (and I prefer states of the world where I don't get shot).

TecS - thanks for pointing this issue out. I'm surprised that it's the first time it's come up.

Ben Hamner wrote:

I'm surprised that it's the first time it's come up.

I guess everybody worked on forecasts on September days during the main competition and, if I understand the problem correctly, the bug appears only on day 31 on any month. Thus probably no one tried August 31st ;)

Reply

Flag alert Flagging is a way of notifying administrators that this message contents inappropriate or abusive content. Are you sure this forum post qualifies?