libsim Versione 7.2.6
|
◆ 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 607 del file grid_id_class.F90. 609END FUNCTION grid_id_c_e_v
610
611
612!> Return a character representation of the driver associated
613!! with the object \a this. The result is a string with constant
614!! length and blank-padded at the end, representing the name of the
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
629!> Return a character representation of the driver associated
630!! with the object \a this. The result is a string with constant
631!! length and blank-padded at the end, representing the name of the
632!! driver; 'none' is retured if the object is empty.
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
646!> Display on standard output a description of the \a grid_id object
647!! provided. Also the grib key names and values are printed; the set
648!! of keys returned can be controlled with the input variable
649!! namespace. Available namespaces are \c ls, to get the same default
650!! keys as the \a grib_ls command, and \c mars to get the keys used by
651!! mars.
652SUBROUTINE grid_id_display(this, namespace)
653TYPE(grid_id),INTENT(in) :: this !< object to be displayed
654CHARACTER(len=*),OPTIONAL :: namespace !< grib_api namespace of the keys to search for, all the keys if empty, default \c ls
655
656INTEGER :: kiter, iret
657CHARACTER(len=255) :: key, value, lnamespace
658
659
660#ifdef HAVE_LIBGRIBAPI
661IF (this%driver == grid_id_grib_api) THEN
|