libsim  Versione8.0.0

◆ gridinfo_import()

subroutine gridinfo_class::gridinfo_import ( type(gridinfo_def), intent(inout)  this)
private

Import grid_id information into a gridinfo object.

This method imports into the descriptors of the gridinfo object this the information carried on by the grid_id object thisgaid, previously set, typically by reading from a file with a supported driver (e.g. grib_api or gdal). An amount of information is deduced from thisgaid and stored in the descriptors of gridinfo object this.

Parametri
[in,out]thisgridinfo object

Definizione alla linea 870 del file gridinfo_class.F90.

870  CALL grib_get(gaid,'indicatorOfUnitOfTimeRange',unit)
871  CALL timerange_g1_to_v7d(tri, p1g, p2g, unit, statproc, p1, p2)
872 
873 ELSE IF (editionnumber == 2) THEN
874 
875  CALL grib_get(gaid,'forecastTime',p1g)
876  CALL grib_get(gaid,'indicatorOfUnitOfTimeRange',unit)
877  CALL g2_interval_to_second(unit, p1g, p1)
878  call grib_get(gaid,'typeOfStatisticalProcessing',statproc,status)
879 
880  IF (status == grib_success .AND. statproc >= 0 .AND. statproc < 254) THEN ! statistically processed
881  CALL grib_get(gaid,'lengthOfTimeRange',p2g)
882  CALL grib_get(gaid,'indicatorOfUnitForTimeRange',unit)
883  CALL g2_interval_to_second(unit, p2g, p2)
884 
885 ! for forecast-like timeranges p1 has to be shifted to the end of interval
886  CALL grib_get(gaid,'typeOfProcessedData',tprocdata,status)
887  CALL grib_get(gaid,'typeOfTimeIncrement',ttimeincr)
888  IF (ttimeincr == 2 .AND. tprocdata /= 0) THEN
889  p1 = p1 + p2
890  ELSE
891  IF (p1 > 0) THEN
892  CALL l4f_log(l4f_warn,'Found p1>0 in grib2 analysis data, strange things may happen')
893  ENDIF
894  ENDIF

Generated with Doxygen.