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