libsim Versione 7.2.6

◆ gridinfo_export_to_file()

subroutine 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 1004 del file gridinfo_class.F90.

1005ENDIF
1006
1007CONTAINS
1008
1009! Explicitely compute and code in grib2 template 4.8 the end of
1010! overalltimeinterval which is not done automatically by grib_api
1011SUBROUTINE code_endoftimeinterval(endtime)
1012TYPE(datetime),INTENT(in) :: endtime
1013
1014INTEGER :: year, month, day, hour, minute, msec
1015
1016CALL getval(endtime, year=year, month=month, day=day, &
1017 hour=hour, minute=minute, msec=msec)
1018 CALL grib_set(gaid,'yearOfEndOfOverallTimeInterval',year)
1019 CALL grib_set(gaid,'monthOfEndOfOverallTimeInterval',month)
1020 CALL grib_set(gaid,'dayOfEndOfOverallTimeInterval',day)
1021 CALL grib_set(gaid,'hourOfEndOfOverallTimeInterval',hour)
1022 CALL grib_set(gaid,'minuteOfEndOfOverallTimeInterval',minute)
1023 CALL grib_set(gaid,'secondOfEndOfOverallTimeInterval',msec/1000)
1024
1025END SUBROUTINE code_endoftimeinterval
1026
1027END SUBROUTINE timerange_export_gribapi
1028
1029
1030SUBROUTINE var_import_gribapi(this, gaid)
1031TYPE(volgrid6d_var),INTENT(out) :: this ! volgrid6d_var object
1032INTEGER,INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to import
1033
1034INTEGER :: EditionNumber, centre, discipline, category, number
1035
1036call grib_get(gaid,'GRIBEditionNumber',editionnumber)
1037
1038if (editionnumber == 1) then
1039
1040 call grib_get(gaid,'centre',centre)
1041 call grib_get(gaid,'gribTablesVersionNo',category)
1042 call grib_get(gaid,'indicatorOfParameter',number)
1043
1044 call init(this, centre, category, number)
1045
1046else if (editionnumber == 2) then
1047
1048 call grib_get(gaid,'centre',centre)
1049 call grib_get(gaid,'discipline',discipline)
1050 call grib_get(gaid,'parameterCategory',category)
1051 call grib_get(gaid,'parameterNumber',number)
1052
1053 call init(this, centre, category, number, discipline)
1054
1055else
1056
1057 CALL l4f_log(l4f_error,'GribEditionNumber '//t2c(editionnumber)//' not supported')
1058 CALL raise_error()
1059
1060endif
1061
1062END SUBROUTINE var_import_gribapi
1063
1064
1065SUBROUTINE var_export_gribapi(this, gaid)
1066TYPE(volgrid6d_var),INTENT(in) :: this ! volgrid6d_var object
1067INTEGER,INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to export

Generated with Doxygen.