libsim Versione 7.1.11
|
◆ grid_id_new()
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).
Definizione alla linea 613 del file grid_id_class.F90. 615!! driver; 'none' is retured if the object is empty.
616FUNCTION grid_file_id_get_driver(this) RESULT(driver)
617TYPE(grid_file_id),INTENT(in) :: this
618CHARACTER(len=LEN(driverlist)) :: driver
619
620IF (this%driver > 0 .AND. this%driver <= SIZE(driverlist)) THEN
621 driver = driverlist(this%driver)
622ELSE
623 driver = driverlist(0)
624ENDIF
625
626END FUNCTION grid_file_id_get_driver
627
628
633FUNCTION grid_id_get_driver(this) RESULT(driver)
634TYPE(grid_id),INTENT(in) :: this
635CHARACTER(len=LEN(driverlist)) :: driver
636
637IF (this%driver > 0 .AND. this%driver <= SIZE(driverlist)) THEN
638 driver = driverlist(this%driver)
639ELSE
640 driver = driverlist(0)
641ENDIF
642
643END FUNCTION grid_id_get_driver
644
645
652SUBROUTINE grid_id_display(this, namespace)
653TYPE(grid_id),INTENT(in) :: this
654CHARACTER(len=*),OPTIONAL :: namespace
655
656INTEGER :: kiter, iret
657CHARACTER(len=255) :: key, value, lnamespace
658
659
660#ifdef HAVE_LIBGRIBAPI
661IF (this%driver == grid_id_grib_api) THEN
662
663 lnamespace = optio_c(namespace,255)
664 IF (.NOT.c_e(lnamespace))THEN
665 lnamespace = "ls"
666 ENDIF
667
|