Some grib_pi improvements