-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite grib implementation #2
Comments
grib_api keys seem to be documented here: http://www.cosmo-model.org/content/model/documentation/grib/pdtemplate_4.32.htm |
It looks like template 4.32 is for synthetic satellite data, and for satellite products it's template 4.31 (see http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-0.shtml ). Unfortunately, I am having a hard time implementing this using the documentation in http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_temp4-31.shtml or the one in http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_temp4-32.shtml and I'm now looking for something more comprehensive. Help is welcome. |
I'll now try to proceed by reading backwards from what is expected in grib_api definition files, and trying to cross-reference and guess from there. |
Official WMO documentation is here (linked from http://www.wmo.int/pages/prog/www/WMOCodes/WMO306_vI2/LatestVERSION/LatestVERSION.html grib2 templates); yes it is correct: templates 4.32-34 are for model-simulated satellite data, analog of 4.0, 4.1, 4.11 respectively. Real satellite data are written using template 4.31, AFAIK 4.30 is deprecated in favour of 4.31. |
Done in commit:09d7eea85da16c39a584890a91fa7520fe8e40ad. The tests of conversions from SAFH5 currently fail: since SAF test data is for derived products that do not correspond to Meteosat channels, and use non-standard channel numbers, and since 4.31 product definition templates do not store a channel number but the channel central wave numbers, I have no way to map arbitrary SAF channels to central wave numbers and back. I do not know how to solve this: currently meteosatlib exits with an error if an image with a nonstandard satellite chamber is exported to GRIB2. |
Still missing: verify if and how reflectance data can also be encoded in grib, and used when processing. |
The reflectance of channels vis006, vis008, ir1.6 and hrv seems to be computed with the source channel only. The reflectance of channel ir0.39 however also needs channels ir1.08 and ir1.34, so we need a way to tell meteosatlib all the source files involved in the computation of reflectance. I'll now try to find out how it can be done. |
One option is that I introduce a new At that point, I can implement AddBand to request adding reflectance raster bands for given channels. |
Alternatively, I can remove the hackish reflectance virtual raster bands, and implement a command that just takes source files on the command line and outputs GDAL datasets with the reflectance values. |
At this stage I have a preference for the external tool, that would simplify the GDAL side of meteosatlib by taking reflectance calculations out of it. In the future we can spend some more time thinking how to integrate it with GDAL again, if we have a need to do so. |
The virtual raster bands are used in production so I'd like to keep them... our issue is the possibility to archive (portions of) satellite data in grib using arkimet mantaining the possibility of accessing that data in a fashion similar to python "products" script. All this, possibly without having impacts on the operational procedures. Also, a pony. My 2 cents: if it's possible to mantain the possibility to compute the reflectance from vis006, vis008, ir1.6 and hrv grib data, it would be ok to compute ir 0.39 reflectance from raw data and archive it as a grib. |
Ok, I'll now think about how it can be done. The pony would probably be the easiest part. |
The def gdal_dataset(self, channel_name):
fname = "H:MSG3:%s:%s" % (
channel_name,
self.dt.strftime("%Y%m%d%H%M")
) and @property
def reflectance(self):
if self.cached_refl is None:·
self.cached_refl = self.sat.get_array(self.name + "r")
return self.cached_refl If we want to have |
I've implemented reflectance calculations for all meteosatlib-supported dataset types (those in To enable it, pass This works for all channels that have reflectance, except IR 3.9, because IR 3.9 cannot be computed from just one channel of information, and it also needs IR 10.8 and IR 13.4. Computing reflectance for IR 3.9 using channel information from all sort of formats is actually implemented in the code, you can even use IR 3.9 data from GRIB, IR 10.8 from NetCDF and IR 13.4 from HRIT. However, there is currently no user interface to enable that. Shall I create a new executable to compute reflectance for IR 3.9, and we see how it goes? |
I'm still behind in testing all this, but an executable to compute IR 3.9 reflectance sounds good |
Ho implementato il calcolo della riflettanza da dataset arbitrari via dataset GDAL virtuali. In Scrivere quel file Ora ragiono di fare un programma che genera quel |
In 885dfc0 ho aggiunto Ora, dati 3 file
E a quel punto
Ti passo la palla per fare il punto. |
Ok, quindi il giro completo diventerà: |
Rewrite grib encoding:
The text was updated successfully, but these errors were encountered: