libsim Versione 7.2.0

◆ gridinfo_export_to_file()

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

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

997INTEGER :: year, month, day, hour, minute, msec
998
999CALL getval(endtime, year=year, month=month, day=day, &
1000 hour=hour, minute=minute, msec=msec)
1001 CALL grib_set(gaid,'yearOfEndOfOverallTimeInterval',year)
1002 CALL grib_set(gaid,'monthOfEndOfOverallTimeInterval',month)
1003 CALL grib_set(gaid,'dayOfEndOfOverallTimeInterval',day)
1004 CALL grib_set(gaid,'hourOfEndOfOverallTimeInterval',hour)
1005 CALL grib_set(gaid,'minuteOfEndOfOverallTimeInterval',minute)
1006 CALL grib_set(gaid,'secondOfEndOfOverallTimeInterval',msec/1000)
1007
1008END SUBROUTINE code_endoftimeinterval
1009
1010END SUBROUTINE timerange_export_gribapi
1011
1012
1013SUBROUTINE var_import_gribapi(this, gaid)
1014TYPE(volgrid6d_var),INTENT(out) :: this ! volgrid6d_var object
1015INTEGER,INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to import
1016
1017INTEGER :: EditionNumber, centre, discipline, category, number
1018
1019call grib_get(gaid,'GRIBEditionNumber',editionnumber)
1020
1021if (editionnumber == 1) then
1022
1023 call grib_get(gaid,'centre',centre)
1024 call grib_get(gaid,'gribTablesVersionNo',category)
1025 call grib_get(gaid,'indicatorOfParameter',number)
1026
1027 call init(this, centre, category, number)
1028
1029else if (editionnumber == 2) then
1030
1031 call grib_get(gaid,'centre',centre)
1032 call grib_get(gaid,'discipline',discipline)
1033 call grib_get(gaid,'parameterCategory',category)
1034 call grib_get(gaid,'parameterNumber',number)
1035
1036 call init(this, centre, category, number, discipline)
1037
1038else
1039
1040 CALL l4f_log(l4f_error,'GribEditionNumber '//t2c(editionnumber)//' not supported')
1041 CALL raise_error()
1042
1043endif
1044
1045END SUBROUTINE var_import_gribapi
1046
1047
1048SUBROUTINE var_export_gribapi(this, gaid)
1049TYPE(volgrid6d_var),INTENT(in) :: this ! volgrid6d_var object
1050INTEGER,INTENT(in) :: gaid ! grib_api id of the grib loaded in memory to export
1051

Generated with Doxygen.