libsim  Versione 7.2.6

◆ arrayof_gridinfo_packarray()

subroutine, private gridinfo_class::arrayof_gridinfo_packarray ( type(arrayof_gridinfo this)
private

Method for packing the array object reducing at a minimum the memory occupation, without destroying its contents.

The value of this::overalloc remains unchanged. After the call to the method, the object can continue to be used, extended and shortened as before. If the object is empty the array is allocated to zero length.

Parametri
thisobject to be packed

Definizione alla linea 650 del file gridinfo_class.F90.

651  CALL grib_get(gaid,'typeOfProcessedData',tprocdata,status)
652  CALL grib_get(gaid,'typeOfTimeIncrement',ttimeincr,status)
653  IF (ttimeincr == 255) ttimeincr = 2 ! fix some MeteosWiss data
654 ! if analysis-like statistically processed data is encountered, the
655 ! reference time must be shifted to the end of the processing period
656  IF (status == grib_success .AND. ttimeincr == 1) THEN
657 ! old libsim convention, to be removed sometime in the future
658  CALL grib_get(gaid,'lengthOfTimeRange',p2g)
659  CALL grib_get(gaid,'indicatorOfUnitForTimeRange',unit)
660  CALL g2_interval_to_second(unit, p2g, p2)
661  this = this + timedelta_new(sec=p2)
662  ELSE IF (status == grib_success .AND. ttimeincr == 2 .AND. tprocdata == 0) THEN

Generated with Doxygen.