grib_api Namespace Reference

Module grib_api. More...


Data Structures

interface  grib_index_get
 Get the distinct values of the key in argument contained in the index. More...
interface  grib_index_get_size
 Get the number of distinct values of the key in argument contained in the index. More...
interface  grib_index_select
 Select the message subset with key==value. More...
interface  grib_get
 Get the value for a key from a grib message. More...
interface  grib_get_size
 Get the size of an array key. More...
interface  grib_set
 Set the value for a key in a grib message. More...
interface  grib_get_element
 Get a value of specified index from an array key. More...
interface  grib_find_nearest
 Find the nearest point/points of a given latitude/longitude point. More...
interface  grib_get_data
 Get latitude/longitude and data values. More...

Functions

subroutine grib_set_missing (gribid, key, status)
 Set as missing the value for a key in a grib message.
subroutine grib_index_create (indexid, filename, keys, status)
 Create a new index form a file.
subroutine grib_index_get_size_long (indexid, key, size, status)
 Get the number of distinct values of the key in argument contained in the index.
subroutine grib_index_get_size_int (indexid, key, size, status)
 Get the number of distinct values of the key in argument contained in the index.
subroutine grib_index_get_int (indexid, key, values, status)
 Get the distinct values of the key in argument contained in the index.
subroutine grib_index_get_long (indexid, key, values, status)
 Get the distinct values of the key in argument contained in the index.
subroutine grib_index_get_real8 (indexid, key, values, status)
 Get the distinct values of the key in argument contained in the index.
subroutine grib_index_select_int (indexid, key, value, status)
 Select the message subset with key==value.
subroutine grib_index_select_long (indexid, key, value, status)
 Select the message subset with key==value.
subroutine grib_index_select_real8 (indexid, key, value, status)
 Select the message subset with key==value.
subroutine grib_new_from_index (indexid, gribid, status)
 Create a new handle from an index after having selected the key values.
subroutine grib_index_release (indexid, status)
 Delete the index.
subroutine grib_open_file (ifile, filename, mode, status)
 Open a file according to a mode.
subroutine grib_pbopen (ifile, filename, mode, status)
 Open a file according to a mode.
subroutine grib_pbread (ifile, buffer, nbytes, status)
 Reads nbytes bytes into the buffer from a file opened with grib_open_file.
subroutine grib_close_file (ifile, status)
 Close a file.
subroutine grib_count_in_file (ifile, n, status)
 Counts the messages in a file.
subroutine grib_new_from_file (ifile, gribid, status)
 Load in memory a grib message from a file.
subroutine grib_new_from_message (gribid, message, status)
 Create a new message in memory from an integer array containting the coded message.
subroutine grib_new_from_samples (gribid, samplename, status)
 Create a new valid gribid from a sample contained in a samples directory pointed by the environment variable GRIB_SAMPLES_PATH.
subroutine grib_new_from_template (gribid, templatename, status)
 THIS FUNCTION IS DEPRECATED AND IT WILL DISAPPEAR FROM THE VERSION 2.0 Create a new valid gribid from a template.
subroutine grib_release (gribid, status)
 Free the memory for the message referred as gribid.
subroutine grib_clone (gribid_src, gribid_dest, status)
 Create a copy of a message.
subroutine grib_check (status, caller, string)
 Check the status returned by a subroutine.
subroutine grib_get_data_real4 (gribid, lats, lons, values, status)
 Get latitudes/longitudes/data values (real(4)).
subroutine grib_get_data_real8 (gribid, lats, lons, values, status)
 Get latitudes/longitudes/data values (real(8)).
subroutine grib_keys_iterator_new (gribid, iterid, namespace, status)
 Create a new iterator on the keys.
subroutine grib_keys_iterator_next (iterid, status)
 Advance to the next keys iterator value.
subroutine grib_keys_iterator_delete (iterid, status)
 Delete a keys iterator and free memory.
subroutine grib_keys_iterator_get_name (iterid, name, status)
 Get the name of a key from a keys iterator.
subroutine grib_keys_iterator_rewind (iterid, status)
 Rewind a keys iterator.
subroutine grib_dump (gribid, status)
 Dump the content of a grib message.
subroutine grib_get_error_string (error, error_message, status)
 Get the error message given an error code.
subroutine grib_get_size_int (gribid, key, size, status)
 Get the size of an array key.
subroutine grib_get_size_long (gribid, key, size, status)
 Get the size of an array key.
subroutine grib_get_int (gribid, key, value, status)
 Get the integer value of a key from a grib message.
subroutine grib_get_long (gribid, key, value, status)
 Get the integer value of a key from a grib message.
subroutine grib_get_real4 (gribid, key, value, status)
 Get the real(4) value of a key from a grib message.
subroutine grib_get_real8 (gribid, key, value, status)
 Get the real(8) value of a key from a grib message.
subroutine grib_get_string (gribid, key, value, status)
 Get the character value of a key from a grib message.
subroutine grib_get_int_array (gribid, key, value, status)
 Get the integer array of values for a key from a grib message.
subroutine grib_get_long_array (gribid, key, value, status)
 Get the integer array of values for a key from a grib message.
subroutine grib_get_real4_array (gribid, key, value, status)
 Get the real(4) array of values for a key from a grib message.
subroutine grib_get_real8_array (gribid, key, value, status)
 Get the real(8) array of values for a key from a grib message.
subroutine grib_get_real4_element (gribid, key, index, value, status)
 Get a real(4) value of specified index from an array key.
subroutine grib_get_real8_element (gribid, key, index, value, status)
 Get a real(8) value of specified index from an array key.
subroutine grib_get_real4_elements (gribid, key, index, value, status)
 Get the real(4) values whose indexes are stored in the array "index" from an array key.
subroutine grib_get_real8_elements (gribid, key, index, value, status)
 Get the real(8) values whose indexes are stored in the array "index" from an array key.
subroutine grib_set_int (gribid, key, value, status)
 Set the integer value for a key in a grib message.
subroutine grib_set_long (gribid, key, value, status)
 Set the integer value for a key in a grib message.
subroutine grib_set_real4 (gribid, key, value, status)
 Set the real(4) value for a key in a grib message.
subroutine grib_set_real8 (gribid, key, value, status)
 Set the real(8) value for a key in a grib message.
subroutine grib_set_int_array (gribid, key, value, status)
 Set the integers values for an array key in a grib message.
subroutine grib_set_long_array (gribid, key, value, status)
 Set the integers values for an array key in a grib message.
subroutine grib_set_real4_array (gribid, key, value, status)
 Set the real(4) values for an array key in a grib message.
subroutine grib_set_real8_array (gribid, key, value, status)
 Set the real(8) values for an array key in a grib message.
subroutine grib_set_string (gribid, key, value, status)
 Set the character value for a string key in a grib message.
subroutine grib_get_message_size (gribid, byte_size, status)
 Get the size of a coded message.
subroutine grib_copy_message (gribid, message, status)
 Copy the coded message into an integer array.
subroutine grib_write (gribid, ifile, status)
 Write the coded message to a file.
subroutine grib_multi_write (multigribid, ifile, status)
 Write a multi field message to a file.
subroutine grib_multi_append (ingribid, startsection, multigribid, status)
 Append a single field grib message to a multi field grib message.
subroutine grib_find_nearest_multiple (gribid, is_lsm, inlats, inlons, outlats, outlons, values, distances, indexes, status)
 Find the nearest point of a given latitude/longitude point.
subroutine grib_find_nearest_single (gribid, is_lsm, inlat, inlon, outlat, outlon, value, distance, index, status)
 Find the nearest point of a given latitude/longitude point.
subroutine grib_find_nearest_four_single (gribid, is_lsm, inlat, inlon, outlat, outlon, value, distance, index, status)
 Find the nearest point of a given latitude/longitude point.
subroutine grib_multi_support_on (status)
 Turn on the support for multiple fields in a single message.
subroutine grib_multi_support_off (status)
 Turn off the support for multiple fields in a single message.
subroutine grib_gribex_mode_on (status)
 Turn on the compatibility mode with gribex.
subroutine grib_gribex_mode_off (status)
 Turn off the compatibility mode with gribex.
subroutine grib_skip_computed (iterid, status)
 Skip the computed keys in a keys iterator.
subroutine grib_skip_coded (iterid, status)
 Skip the coded keys in a keys iterator.
subroutine grib_skip_duplicates (iterid, status)
 Skip the duplicated keys in a keys iterator.
subroutine grib_skip_read_only (iterid, status)
 Skip the read_only keys in a keys iterator.


Detailed Description

Module grib_api.

The grib_api module provides the Fortran 90 interface of the GRIB API.


Function Documentation

subroutine grib_api::grib_check ( integer,intent(in)  status,
character(len=*),intent(in)  caller,
character(len=*),intent(in)  string 
)

Check the status returned by a subroutine.

In case of error it stops the program, returns the error code to the shell and prints the error message.

Parameters:
status the status to be checked
caller name of the caller soubroutine
string a string variable from the caller routine (e.g. key,filename)

subroutine grib_api::grib_clone ( integer(kind=kindOfInt),intent(in)  gribid_src,
integer(kind=kindOfInt),intent(out)  gribid_dest,
integer(kind=kindOfInt),intent(out),optional  status 
)

Create a copy of a message.

Create a copy of a given message (gribid_src) giving a new
message in memory (gribid_dest) exactly identical to the original one.

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 grib_get_error_string.

Examples: clone.f90

Parameters:
gribid_src grib to be cloned
gribid_dest new grib returned
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_close_file ( integer(kind=kindOfInt),intent(in)  ifile,
integer(kind=kindOfInt),intent(out),optional  status 
)

Close a file.

If the fileid does not refer to an opened file an error code is returned in status.

Examples: get.f90

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 grib_get_error_string.

Parameters:
ifile is the id of the file to be closed.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_copy_message ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=1),dimension(:),intent(out)  message,
integer(kind=kindOfInt),intent(out),optional  status 
)

Copy the coded message into an integer array.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
message integer array containing the coded message to be copied
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_count_in_file ( integer(kind=kindOfInt),intent(in)  ifile,
integer(kind=kindOfInt),intent(out)  n,
integer(kind=kindOfInt),intent(out),optional  status 
)

Counts the messages in a file.

Examples: count_messages.f90

Parameters:
ifile id of the file opened with grib_open_file
n number of messages in the file
status GRIB_SUCCESS if OK or error code

subroutine grib_api::grib_dump ( integer(kind=kindOfInt),intent(in)  gribid,
integer(kind=kindOfInt),intent(out),optional  status 
)

Dump the content of a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_find_nearest_four_single ( integer(kind=kindOfInt),intent(in)  gribid,
logical,intent(in)  is_lsm,
real(kind = kindOfDouble),intent(in)  inlat,
real(kind = kindOfDouble),intent(in)  inlon,
real(kind = kindOfDouble),dimension(4),intent(out)  outlat,
real(kind = kindOfDouble),dimension(4),intent(out)  outlon,
real(kind = kindOfDouble),dimension(4),intent(out)  value,
real(kind = kindOfDouble),dimension(4),intent(out)  distance,
integer(kind = kindOfInt),dimension(4),intent(out)  index,
integer(kind=kindOfInt),intent(out),optional  status 
)

Find the nearest point of a given latitude/longitude point.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
is_lsm .true. if the nearest land point is required otherwise .false.
inlat latitude of the point
inlon longitudes of the point
outlat latitude of the nearest point
outlon longitude of the nearest point
distance distance between the given point and its nearest
index zero based index
value value of the field in the nearest point
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_find_nearest_multiple ( integer(kind=kindOfInt),intent(in)  gribid,
logical,intent(in)  is_lsm,
real(kind = kindOfDouble),dimension(:),intent(in)  inlats,
real(kind = kindOfDouble),dimension(:),intent(in)  inlons,
real(kind = kindOfDouble),dimension(:),intent(out)  outlats,
real(kind = kindOfDouble),dimension(:),intent(out)  outlons,
real(kind = kindOfDouble),dimension(:),intent(out)  values,
real(kind = kindOfDouble),dimension(:),intent(out)  distances,
integer(kind = kindOfInt),dimension(:),intent(out)  indexes,
integer(kind=kindOfInt),intent(out),optional  status 
)

Find the nearest point of a given latitude/longitude point.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
is_lsm .true. if the nearest land point is required otherwise .false.
inlats input real(8) array of the latitudes of the points
inlons input real(8) array of the longitudes of the points
outlats output real(8) array of the latitudes of the nearest points
outlons output real(8) array of the longitudes of the nearest points
distances output real(8) array of the distances
indexes output integer(4) array of the zero based indexes
values output real(8) array of the values
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_find_nearest_single ( integer(kind=kindOfInt),intent(in)  gribid,
logical,intent(in)  is_lsm,
real(kind = kindOfDouble),intent(in)  inlat,
real(kind = kindOfDouble),intent(in)  inlon,
real(kind = kindOfDouble),intent(out)  outlat,
real(kind = kindOfDouble),intent(out)  outlon,
real(kind = kindOfDouble),intent(out)  value,
real(kind = kindOfDouble),intent(out)  distance,
integer(kind = kindOfInt),intent(out)  index,
integer(kind=kindOfInt),intent(out),optional  status 
)

Find the nearest point of a given latitude/longitude point.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
is_lsm .true. if the nearest land point is required otherwise .false.
inlat latitude of the point
inlon longitudes of the point
outlat latitude of the nearest point
outlon longitude of the nearest point
distance distance between the given point and its nearest
index zero based index
value value of the field in the nearest point
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::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 grib_get_size or by getting (with grib_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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
lats latitudes array with dimension "size"
lons longitudes array with dimension "size"
values data values array with dimension "size"
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::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 grib_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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
lats latitudes array
lons longitudes array
values data values array
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_error_string ( integer(kind=kindOfInt),intent(in)  error,
character(len=*),intent(out)  error_message,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the error message given an error code.

Parameters:
error error code
error_message error message
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_int ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind = kindOfInt),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the integer value of a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value the integer(4) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_int_array ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),dimension(:),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the integer array of values for a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value integer(4) array value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_long ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind = kindOfLong),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the integer value of a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value the integer(4) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_long_array ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfLong),dimension(:),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the integer array of values for a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value integer(4) array value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_message_size ( integer(kind=kindOfInt),intent(in)  gribid,
integer(kind=kindOfSize_t),intent(out)  byte_size,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the size of a coded message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
byte_size size in bytes of the message
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real4 ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
real(kind = kindOfFloat),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the real(4) value of a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value the real(4) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real4_array ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
real(kind = kindOfFloat),dimension(:),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the real(4) array of values for a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value real(4) array value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real4_element ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),intent(in)  index,
real(kind = kindOfFloat),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get a real(4) value of specified index from an array key.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
index integer(4) index
value real(4) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real4_elements ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),dimension(:),intent(in)  index,
real(kind = kindOfFloat),dimension(:),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the real(4) values whose indexes are stored in the array "index" from an array key.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
index integer(4) array indexes
value real(4) array value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real8 ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
real(kind = kindOfDouble),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the real(8) value of a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value the real(8) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real8_array ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
real(kind = kindOfDouble),dimension(:),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the real(8) array of values for a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value real(8) array value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real8_element ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),intent(in)  index,
real(kind = kindOfDouble),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get a real(8) value of specified index from an array key.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
index integer(4) index
value real(8) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_real8_elements ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),dimension(:),intent(in)  index,
real(kind = kindOfDouble),dimension(:),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the real(8) values whose indexes are stored in the array "index" from an array key.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
index integer(4) array index
value real(8) array value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_size_int ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),intent(out)  size,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the size of an array key.

To get the size of a key representing an array.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key name of the key
size size of the array key
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_size_long ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
integer(kind=kindOfLong),intent(out)  size,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the size of an array key.

To get the size of a key representing an array.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key name of the key
size size of the array key
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_get_string ( integer(kind=kindOfInt),intent(in)  gribid,
character(len=*),intent(in)  key,
character(len=*),intent(out)  value,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the character value of a key from a grib message.

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 grib_get_error_string.

Parameters:
gribid id of the grib loaded in memory
key key name
value the real(8) value
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_gribex_mode_off ( integer(kind=kindOfInt),intent(out),optional  status  ) 

Turn off the compatibility mode with gribex.

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 grib_get_error_string.

Parameters:
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_gribex_mode_on ( integer(kind=kindOfInt),intent(out),optional  status  ) 

Turn on the compatibility mode with gribex.

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 grib_get_error_string.

Parameters:
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_create ( integer(kind=kindOfInt),intent(inout)  indexid,
character(len=*),intent(in)  filename,
character(len=*),intent(in)  keys,
integer(kind=kindOfInt),intent(out),optional  status 
)

Create a new index form a file.

The file is indexed with the keys in argument.

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 grib_get_error_string.

Examples: index.f90

Parameters:
indexid id of the newly created index
filename name of the file of messages to be indexed
keys : comma separated list of keys for the index. The type of the key can be explicitly declared appending :l for long, :d for double, :s for string to the key name. If the type is not declared explicitly, the native type is assumed.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_int ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
integer(kind=kindOfInt),dimension(:),intent(out)  values,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the distinct values of the key in argument contained in the index.

The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

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 grib_get_error_string.

Examples: index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_long ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
integer(kind=kindOfLong),dimension(:),intent(out)  values,
integer(kind=kindOfInt),intent(out),optional  status 
)

Get the distinct values of the key in argument contained in the index.

The key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

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 grib_get_error_string.

Examples: index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,
real(kind=kindOfDouble),dimension(:),intent(out)  valueThe key must belong to the index. This function is used when the type of the key was explicitly defined as long or when the native type of the key is long.

In case of error, if the status parameter (optional) is not given, the program will exit with an er href="index_8f90-example.html">index.f90

Parameters:
indexid id of an index created from a file. The index must have been created with the key in argument.
key key for wich the values are returned
values array of values. The array must be allocated before entering this function and its size must be enough to contain all the values.
status GRIB_SUCCESS if OK, integer value on error

subroutine grib_api::grib_index_get_real8 ( integer(kind=kindOfInt),intent(in)  indexid,
character(len=*),intent(in)  key,