libsim Versione 7.2.0

◆ grid_id_display()

subroutine, private 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 840 del file grid_id_class.F90.

841 field(:,:) = rmiss
842 RETURN
843
844end if
845
846CALL grib_get(gaid,'iScansNegatively',iscansnegatively,ierr)
847IF (ierr /= grib_success) iscansnegatively=0
848CALL grib_get(gaid,'jScansPositively',jscanspositively,ierr)
849IF (ierr /= grib_success) jscanspositively=1
850CALL grib_get(gaid,'jPointsAreConsecutive',jpointsareconsecutive,ierr)
851IF (ierr /= grib_success) jpointsareconsecutive=0
852
853call grib_get(gaid,'numberOfPoints',numberofpoints)
854call grib_get(gaid,'numberOfValues',numberofvalues)
855
856IF (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
864ENDIF
865
866! get data values
867#ifdef DEBUG
868call l4f_log(l4f_info,'grib_api number of values: '//to_char(numberofvalues))
869call l4f_log(l4f_info,'grib_api number of points: '//to_char(numberofpoints))
870#endif
871
872CALL grib_set(gaid,'missingValue',rmiss)
873CALL grib_get(gaid,'values',vector)
874! suspect bug in grib_api, when all field is missing it is set to zero
875IF (numberofvalues == 0) vector = rmiss
876
877#ifdef DEBUG
878CALL 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))))
880CALL l4f_log(l4f_debug, 'grib_api, decoded field with number of missing: '// &
881 t2c(count(.NOT.c_e(vector))))
882#endif
883
884IF (numberofvalues /= count(c_e(vector))) THEN

Generated with Doxygen.