libsim  Versione6.3.0

◆ gridinfo_import()

subroutine gridinfo_import ( type(gridinfo_def), intent(inout)  this)

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 886 del file gridinfo_class.F90.

886 
887 ELSE IF (editionnumber == 2) THEN
888  CALL grib_get(gaid,'productDefinitionTemplateNumber', pdtn)
889 
890  IF (this%timerange == 254) THEN ! point in time -> template 4.0
891  IF (pdtn < 0 .OR. pdtn > 7) &
892  CALL grib_set(gaid,'productDefinitionTemplateNumber', 0)
893 ! Set reasonable time unit
894  CALL timerange_v7d_to_g2(this%p1,p1,unit)
895 ! Set the native keys
896  CALL grib_set(gaid,'indicatorOfUnitOfTimeRange',unit)
897  CALL grib_set(gaid,'forecastTime',p1)
898 
899  ELSE IF (this%timerange >= 0 .AND. this%timerange < 254) THEN
900 ! statistically processed -> template 4.8
901  IF (pdtn < 8 .OR. pdtn > 14) &
902  CALL grib_set(gaid,'productDefinitionTemplateNumber', 8)
903 
904  IF (this%p1 >= this%p2) THEN ! forecast-like
905 ! Set reasonable time unit
906  CALL timerange_v7d_to_g2(this%p1-this%p2,p1,unit)
907  CALL grib_set(gaid,'indicatorOfUnitOfTimeRange',unit)
908  CALL grib_set(gaid,'forecastTime',p1)
909  CALL code_endoftimeinterval(reftime+timedelta_new(sec=this%p1))
910 ! Successive times processed have same start time of forecast,

Generated with Doxygen.