[R] Converting .grib to excel file
javad bayat
j@b@y@t194 @end|ng |rom gm@||@com
Mon Jun 24 13:55:20 CEST 2024
Dear all;
I have downloaded meteorology data from "
https://cds.climate.copernicus.eu/cdsapp#!/dataset/reanalysis-era5-single-levels?tab=form"
as .grib format. It has hourly data of a complete year (every hour of every
day of 12 months) and has 6 meteorology parameters. The file has been
attached.
I am trying to convert it to an excel file that puts every parameter in a
separated column. For instance, the first col represents Date, 2nd
represents Temperature and so on.
Is there any way to do it?
I used these codes but did not work:
# install.packages("rNOMADS")
library(rNOMADS)
# Read GRIB data
grib_data <- ReadGrib("C:/Users/admin/Downloads/Met.grib")
# Convert to a data frame
grib_df <- as.data.frame(grib_data)
# Write the data frame to a CSV file
write.csv(grib_df, file = "output.csv")
I would be more than happy if anyone could help me.
Sincerely
--
Best Regards
Javad Bayat
M.Sc. Environment Engineering
Alternative Mail: bayat194 using yahoo.com
More information about the R-help
mailing list