|
◆ arrayof_gridinfo_delete()
subroutine arrayof_gridinfo_delete |
( |
type(arrayof_gridinfo) |
this, |
|
|
logical, intent(in), optional |
nodestroy, |
|
|
logical, intent(in), optional |
nodealloc |
|
) |
| |
Destructor for finalizing an array object.
If defined, calls the destructor for every element of the array object; finally it deallocates all the space occupied.
- Parametri
-
| this | array object to be destroyed |
| this | if provided and .TRUE. , the destructor possibily defined for the TYPE(gridinfo_def) is not called for every deleted object, may be useful if the objects to be deleted have been copied to another instance of arrayof_gridinfo and continue their life there |
[in] | nodealloc | if provided and .TRUE. , the space reserved for the array is not deallocated, thus the values are retained, while the array pointer is nullified, this means that the caller must have previously assigned the pointer contents thisarray to another pointer to prevent memory leaks |
Definizione alla linea 605 del file gridinfo_class.F90.
605 CALL encode_gridinfo(this, tmparr) 608 CALL unnormalize_gridinfo(this) 610 CALL time_export_gribapi(this%time, gaid, this%timerange) 611 CALL timerange_export_gribapi(this%timerange, gaid, this%time) 612 CALL level_export_gribapi(this%level, gaid) 613 CALL var_export_gribapi(this%var, gaid) 615 END SUBROUTINE gridinfo_export_gribapi 618 SUBROUTINE time_import_gribapi(this,gaid) 619 TYPE(datetime), INTENT(out) :: this 620 INTEGER, INTENT(in) :: gaid 622 INTEGER :: EditionNumber, ttimeincr, p2g, p2, unit, status 623 CHARACTER(len=9) :: date 624 CHARACTER(len=10) :: time 626 call grib_get(gaid, 'GRIBEditionNumber',editionnumber) 628 IF (editionnumber == 1 .OR. editionnumber == 2) THEN 630 call grib_get(gaid, 'dataDate',date ) 631 call grib_get(gaid, 'dataTime',time(:5) ) 633 call init(this,simpledate=date(:8)//time(:4)) 635 IF (editionnumber == 2) THEN 637 CALL grib_get(gaid, 'typeOfTimeIncrement',ttimeincr,status) 640 IF (status == grib_success .AND. ttimeincr == 1) THEN 641 CALL grib_get(gaid, 'lengthOfTimeRange',p2g) 642 CALL grib_get(gaid, 'indicatorOfUnitForTimeRange',unit) 643 CALL g2_interval_to_second(unit, p2g, p2) 644 this = this + timedelta_new(sec=p2) 645 ELSE IF ((status == grib_success .AND. ttimeincr == 2) .OR. & 646 status /= grib_success) THEN 649 CALL l4f_log(l4f_error, 'typeOfTimeIncrement '// t2c(ttimeincr)// & 656 CALL l4f_log(l4f_error, 'GribEditionNumber '// t2c(editionnumber)// ' not supported') Functions that return a trimmed CHARACTER representation of the input variable.
Costruttori per le classi datetime e timedelta.
|