Abstract
Notes on the interpretation of GRIB and HDF5 file formats for EOS.
Grid Data
Our files are mostly grids which means they represents data points taken at some point in time and contains a set of projection equations. Although we do not care that much about the different type of projection used (Mercartor, for example) due to libraries that do the hard work for us. However, we are interested in how to extract the actual value taken along with the relevant latitude and longitude. I try to explain what I did with the files in order not to forget in the future.
Basics
There are three important features of a grid file: data fields, dimensions, and the projection. The data fields are rectilinear arrays of two or more dimensions and are related to each other by common geolocation.
Dimensions are used to relate data fields to each other and to the geolocation information. To be interpreted properly, each data field must make use of two predefined dimensions "XDim" and "YDim".
Projections are used to encode and interpret. It provides with a convenient way to encode geolocation information as a set of math equations capable of transforming earth coordinates to x-y coordinates on a sheet of paper.
Most sources of data files are websites like Giovanni and provide with GRIB or HDF-EOS file formats. We use those file formats to extract the values we are interested: average surface temperature.
Extracting Values
Thanks to libraries like pygrib we are able to read the GRIB files and extract:
- lat,lng
- measurement
The files that we are currently processing are taken at 3 hours intervals so we just have to take the first measurement and iterate forward. The date is given by the file name.
You can read the "headers" of the file that will tell you which index to use to extract the measurement of interest.
Notes on the interpretation of GRIB and HDF5 file formats for EOS.
Grid Data
Our files are mostly grids which means they represents data points taken at some point in time and contains a set of projection equations. Although we do not care that much about the different type of projection used (Mercartor, for example) due to libraries that do the hard work for us. However, we are interested in how to extract the actual value taken along with the relevant latitude and longitude. I try to explain what I did with the files in order not to forget in the future.
Basics
There are three important features of a grid file: data fields, dimensions, and the projection. The data fields are rectilinear arrays of two or more dimensions and are related to each other by common geolocation.
Dimensions are used to relate data fields to each other and to the geolocation information. To be interpreted properly, each data field must make use of two predefined dimensions "XDim" and "YDim".
Projections are used to encode and interpret. It provides with a convenient way to encode geolocation information as a set of math equations capable of transforming earth coordinates to x-y coordinates on a sheet of paper.
Most sources of data files are websites like Giovanni and provide with GRIB or HDF-EOS file formats. We use those file formats to extract the values we are interested: average surface temperature.
Extracting Values
Thanks to libraries like pygrib we are able to read the GRIB files and extract:
- lat,lng
- measurement
The files that we are currently processing are taken at 3 hours intervals so we just have to take the first measurement and iterate forward. The date is given by the file name.
You can read the "headers" of the file that will tell you which index to use to extract the measurement of interest.
No hay comentarios:
Publicar un comentario