eccodes
 All Data Structures Namespaces Files Functions Groups Pages
Public Member Functions
eccodes::codes_grib_get_data Interface Reference

Get latitude/longitude and data values. More...

Public Member Functions

subroutine codes_grib_get_data_real4 (gribid, lats, lons, values, status)
 Get latitudes/longitudes/data values (real(4)). More...
 
subroutine codes_grib_get_data_real8 (gribid, lats, lons, values, status)
 Get latitudes/longitudes/data values (real(8)). More...
 

Detailed Description

Get latitude/longitude and data values.

Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the caller and their required dimension can be obtained with codes_get_size or by getting (with codes_get) the value of the integer key "numberOfPoints".

In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
Otherwise the error message can be gathered with codes_get_error_string.

Examples: grib_get_data.f90

Parameters
[in]gribidid of the grib loaded in memory
[out]latslatitudes array with dimension "size"
[out]lonslongitudes array with dimension "size"
[out]valuesdata values array with dimension "size"

Member Function/Subroutine Documentation

subroutine codes_grib_get_data_real4 ( integer(kind=kindofint), intent(in)  gribid,
real ( kind = kindoffloat ), dimension(:), intent(out)  lats,
real ( kind = kindoffloat ), dimension(:), intent(out)  lons,
real ( kind = kindoffloat ), dimension(:), intent(out)  values,
integer(kind=kindofint), intent(out), optional  status 
)

Get latitudes/longitudes/data values (real(4)).

Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the caller and their required dimension can be obtained with codes_get_size or by getting (with codes_get) the value of the integer key "numberOfPoints".

In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
Otherwise the error message can be gathered with codes_get_error_string.

Parameters
gribidid of the grib loaded in memory
latslatitudes array with dimension "size"
lonslongitudes array with dimension "size"
valuesdata values array with dimension "size"
statusCODES_SUCCESS if OK, integer value on error
subroutine codes_grib_get_data_real8 ( integer(kind=kindofint), intent(in)  gribid,
real ( kind = kindofdouble ), dimension(:), intent(out)  lats,
real ( kind = kindofdouble ), dimension(:), intent(out)  lons,
real ( kind = kindofdouble ), dimension(:), intent(out)  values,
integer(kind=kindofint), intent(out), optional  status 
)

Get latitudes/longitudes/data values (real(8)).

Latitudes, longitudes, data values arrays are returned. They must be properly allocated by the calling program/function. Their required dimension can be obtained by getting (with codes_get) the value of the integer key "numberOfPoints". In case of error, if the status parameter (optional) is not given, the program will exit with an error message.
Otherwise the error message can be gathered with codes_get_error_string.

Parameters
gribidid of the grib loaded in memory
latslatitudes array
lonslongitudes array
valuesdata values array
statusCODES_SUCCESS if OK, integer value on error

The documentation for this interface was generated from the following file:
This website is beyond its original expiry date and the content may be out of date. The site owner has been notified and may choose to extend the expiry date and remove this banner. If you have any questions about this, please visit our support portal.