libsim  Versione 7.2.6

◆ grid_id_display()

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

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 850 del file grid_id_class.F90.

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

Generated with Doxygen.