|
◆ grid_id_new()
type(grid_id) function grid_id_class::grid_id_new |
( |
type(grid_file_id), intent(inout), optional, target |
from_grid_file_id, |
|
|
character(len=*), intent(in), optional |
grib_api_template, |
|
|
integer, intent(in), optional |
grib_api_id, |
|
|
integer, intent(in), optional |
no_driver_id |
|
) |
| |
Constructor for the grid_id class.
It gets the next grid (grib message or raster band) from the file_id provided. If the file associated to the file_id provided contains no more grids, or if the argument file_id is not provided, an empty object is created; this condition can be tested with the function c_e(). Alternative ways to define the object (to be used in rare cases) are through a grib_api template file name (grib_api_template argument) or through a grib_api integer id obtained directly from grib_api calls (grib_api_id argument).
- Parametri
-
[in,out] | from_grid_file_id | file object from which grid object has to be created |
[in] | grib_api_template | grib_api template file from which grid_object has to be created |
[in] | grib_api_id | grib_api id obtained directly from a grib_get subroutine call |
Definizione alla linea 634 del file grid_id_class.F90.
634 TYPE(grid_id), INTENT(in) :: this 635 CHARACTER(len=LEN(driverlist)) :: driver 637 IF (this%driver > 0 .AND. this%driver <= SIZE(driverlist)) THEN 638 driver = driverlist(this%driver) 640 driver = driverlist(0) 643 END FUNCTION grid_id_get_driver 652 SUBROUTINE grid_id_display(this, namespace) 653 TYPE(grid_id), INTENT(in) :: this 654 CHARACTER(len=*), OPTIONAL :: namespace 656 INTEGER :: kiter, iret 657 CHARACTER(len=255) :: key, value, lnamespace 660 #ifdef HAVE_LIBGRIBAPI 661 IF (this%driver == grid_id_grib_api) THEN 663 lnamespace = optio_c(namespace,255) 664 IF (.NOT. c_e(lnamespace)) THEN 668 print*, "GRIB_API namespace:",trim(lnamespace) 670 CALL grib_keys_iterator_new(this%gaid, kiter, namespace=trim(lnamespace)) 673 CALL grib_keys_iterator_next(kiter, iret) 679 CALL grib_keys_iterator_get_name(kiter, key) 681 IF (key == 'computeStatistics') cycle 683 CALL grib_get(this%gaid, trim(key), value, iret) 685 print*, trim(key)// ' = '//trim( VALUE)
|