|
◆ 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 613 del file grid_id_class.F90.
616 FUNCTION grid_file_id_get_driver(this) RESULT(driver)
617 TYPE(grid_file_id), INTENT(in) :: this
618 CHARACTER(len=LEN(driverlist)) :: driver
620 IF (this%driver > 0 .AND. this%driver <= SIZE(driverlist)) THEN
621 driver = driverlist(this%driver)
623 driver = driverlist(0)
626 END FUNCTION grid_file_id_get_driver
633 FUNCTION grid_id_get_driver(this) RESULT(driver)
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
|