I am reworking the GHCNv2 data from scratch. It has been almost three years since I put together the the mean temperature graphs and meta information for every station in the GHCNv2. While starting from scratch is not recommended for software projects, when you have one off deals like this which you only look at every few years, I find it useful to see what I come up with when I start with a clean slate.
So, this time, I decided to use the named capture feature for Perl regular expressions (introduced in 5.10) instead of unpack because using regular expressions allows me to validate the assumptions I am making about the content of the data rather than blindly grabbing whatever characters exist at specific locations.
Lo and behold, my pattern failed on line 301 of v2.temperature.inv (accessed 20100416). The pattern I had used for that field was (?<elev>(?:[0-9]{1,4}|-999))
. That pattern is a little too permissive, but I figured I would be OK to use it for elevation because a comment in v2.read.inv.f stated “ielevs=station elevation in meters, missing is -999” for the description of the field.
Well, the value for Giarabub, Libya happened to be -1. I am pretty sure that is the only station with a negative elevation value in the inventory. Its grid elevation is specified as 45 meters.
So, what is up with Giarabub?