libsim  Versione 7.2.4

◆ gridinfo_export_to_file()

subroutine gridinfo_class::gridinfo_export_to_file ( type(arrayof_gridinfo this,
character(len=*), intent(in)  filename,
character(len=*), intent(in), optional  categoryappend 
)
private

Export an arrayof_gridinfo object to a file.

It receives an arrayof_gridinfo object which will be exported to the given file. The driver for writing to file is chosen according to the gaid associated to the first gridinfo element, and it must be the same for all the elements.

Parametri
thisarray of gridinfo objects which will be written to file
[in]filenamename of file to open and import, in the form [driver:]pathname
[in]categoryappendappend this suffix to log4fortran namespace category

Definizione alla linea 1006 del file gridinfo_class.F90.

1007  CALL grib_set(gaid,'secondOfEndOfOverallTimeInterval',msec/1000)
1008 
1009 END SUBROUTINE code_endoftimeinterval
1010 
1011 END SUBROUTINE timerange_export_gribapi
1012 
1013 
1014 SUBROUTINE var_import_gribapi(this, gaid)
1015 TYPE(volgrid6d_var),INTENT(out) :: this ! volgrid6d_var object
1016 INTEGER,INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to import
1017 
1018 INTEGER :: EditionNumber, centre, discipline, category, number
1019 
1020 call grib_get(gaid,'GRIBEditionNumber',editionnumber)
1021 
1022 if (editionnumber == 1) then
1023 
1024  call grib_get(gaid,'centre',centre)
1025  call grib_get(gaid,'gribTablesVersionNo',category)
1026  call grib_get(gaid,'indicatorOfParameter',number)
1027 
1028  call init(this, centre, category, number)
1029 
1030 else if (editionnumber == 2) then
1031 
1032  call grib_get(gaid,'centre',centre)
1033  call grib_get(gaid,'discipline',discipline)
1034  call grib_get(gaid,'parameterCategory',category)
1035  call grib_get(gaid,'parameterNumber',number)
1036 
1037  call init(this, centre, category, number, discipline)
1038 
1039 else
1040 
1041  CALL l4f_log(l4f_error,'GribEditionNumber '//t2c(editionnumber)//' not supported')
1042  CALL raise_error()
1043 
1044 endif
1045 
1046 END SUBROUTINE var_import_gribapi
1047 
1048 
1049 SUBROUTINE var_export_gribapi(this, gaid)
1050 TYPE(volgrid6d_var),INTENT(in) :: this ! volgrid6d_var object
1051 INTEGER,INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to export
1052 
1053 INTEGER ::EditionNumber
1054 
1055 call grib_get(gaid,'GRIBEditionNumber',editionnumber)
1056 
1057 if (editionnumber == 1) then
1058 
1059  IF (this%centre /= 255) & ! if centre missing (coming from bufr), keep template
1060  CALL grib_set(gaid,'centre',this%centre)
1061  CALL grib_set(gaid,'gribTablesVersionNo',this%category)

Generated with Doxygen.