Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

Meteorological Data Format


New member
Hi, I downloaded meterological data in csv fromat , how to conver it into grib2 so that "ungrib.exe" can read it .
I have tried :
import pandas as pd
import cfgrib

data = pd.read_csv('your_csv_data.csv')
xarray_data = data.to_xarray()
cfgrib.to_grib(xarray_data, 'out2.grib')

its not working (erro: cfgrid not found ) even after doing "pip install cfgrid " in pwd.
I'm not sure how to convert from .csv format to gribbed format. An alternative option would be to convert the data to intermediate format, skipping the ungrib process. Again, I'm not exactly sure how to do this when starting with .csv format, but it's possible someone else on the forum may know how to help, if you aren't able to figure it out.