libsim  Versione8.0.0

◆ grid_id_display()

subroutine, private grid_id_class::grid_id_display ( type(grid_id), intent(in)  this,
character(len=*), optional  namespace 
)
private

Display on standard output a description of the grid_id object provided.

Also the grib key names and values are printed; the set of keys returned can be controlled with the input variable namespace. Available namespaces are ls, to get the same default keys as the grib_ls command, and mars to get the keys used by mars.

Parametri
[in]thisobject to be displayed
namespacegrib_api namespace of the keys to search for, all the keys if empty, default ls

Definizione alla linea 851 del file grid_id_class.F90.

851 
852 end if
853 
854 CALL grib_get(gaid,'iScansNegatively',iscansnegatively,ierr)
855 IF (ierr /= grib_success) iscansnegatively=0
856 CALL grib_get(gaid,'jScansPositively',jscanspositively,ierr)
857 IF (ierr /= grib_success) jscanspositively=1
858 CALL grib_get(gaid,'jPointsAreConsecutive',jpointsareconsecutive,ierr)
859 IF (ierr /= grib_success) jpointsareconsecutive=0
860 
861 call grib_get(gaid,'numberOfPoints',numberofpoints)
862 
863 IF (numberofpoints /= SIZE(field)) THEN
864  CALL l4f_log(l4f_error, 'grid_id_decode_data_gribapi numberOfPoints and grid size different')
865  CALL l4f_log(l4f_error, 'grid_id_decode_data_gribapi numberOfPoints: ' &
866  //t2c(numberofpoints)//', nx,ny: '&
867  //t2c(SIZE(field,1))//','//t2c(SIZE(field,2)))
868  CALL raise_error()
869  field(:,:) = rmiss
870  RETURN
871 ENDIF
872 
873 ! get data values
874 #ifdef DEBUG
875 call grib_get(gaid,'numberOfValues',numberofvalues)
876 call l4f_log(l4f_info,'grib_api number of values: '//to_char(numberofvalues))
877 call l4f_log(l4f_info,'grib_api number of points: '//to_char(numberofpoints))
878 #endif
879 
880 CALL grib_set(gaid,'missingValue',rmiss)
881 
882 IF (iscansnegatively == 0 .AND. jscanspositively == 0 .AND. jpointsareconsecutive == 0) THEN
883 
884  fieldp(1:SIZE(field)) => field
885  CALL grib_get(gaid,'values',fieldp)
886 
887 ELSE
888 
889 CALL grib_get(gaid,'values',vector)
890 ! suspect bug in grib_api, when all field is missing it is set to zero
891 ! IF (numberOfValues == 0) vector = rmiss
892 
893 #ifdef DEBUG
894 CALL l4f_log(l4f_debug, 'grib_api, decoded field in interval: '// &

Generated with Doxygen.