libsim Versione 7.2.6
|
◆ arrayof_gridinfo_delete()
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.
Definizione alla linea 574 del file gridinfo_class.F90. 579END SUBROUTINE gridinfo_encode_data
580
581
582! =========================================
583! grib_api driver specific code
584! could this be moved to a separate module?
585! =========================================
586#ifdef HAVE_LIBGRIBAPI
587SUBROUTINE gridinfo_import_gribapi(this, gaid)
588TYPE(gridinfo_def),INTENT(inout) :: this ! gridinfo object
589INTEGER, INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to import
590
591call time_import_gribapi(this%time, gaid)
592call timerange_import_gribapi(this%timerange,gaid)
593call level_import_gribapi(this%level, gaid)
594call var_import_gribapi(this%var, gaid)
595
596call normalize_gridinfo(this)
597
598END SUBROUTINE gridinfo_import_gribapi
599
600
601! grib_api driver
602SUBROUTINE gridinfo_export_gribapi(this, gaid)
603TYPE(gridinfo_def),INTENT(inout) :: this ! gridinfo object
604INTEGER, INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to export
605
606TYPE(conv_func) :: c_func
607REAL,ALLOCATABLE :: tmparr(:,:)
608
609! convert variable and values to the correct edition if required
610CALL volgrid6d_var_normalize(this%var, c_func, grid_id_new(grib_api_id=gaid))
611IF (this%var == volgrid6d_var_miss) THEN
612 CALL l4f_log(l4f_error, &
613 'A suitable variable has not been found in table when converting template')
614 CALL raise_error()
615ENDIF
616IF (c_func /= conv_func_miss) THEN ! convert values as well
617 tmparr = decode_gridinfo(this) ! f2003 implicit allocation
618 CALL compute(c_func, tmparr)
619 CALL encode_gridinfo(this, tmparr)
620ENDIF
621
622CALL unnormalize_gridinfo(this)
623
624CALL time_export_gribapi(this%time, gaid, this%timerange)
625CALL timerange_export_gribapi(this%timerange, gaid, this%time)
626CALL level_export_gribapi(this%level, gaid)
627CALL var_export_gribapi(this%var, gaid)
628
629END SUBROUTINE gridinfo_export_gribapi
630
|