How do I convert a.GRB2 file to a nc file?
Added by jiayan yang about 2 years ago
How to use cdo put. The GRB2 file is converted to the nc file?
Replies (6)
RE: How do I convert a.GRB2 file to a nc file? - Added by Karin Meier-Fleischer about 2 years ago
Hi Jiang,
searching the internet would be faster but here comes the answer.
In your case the file contains only one variable.
cdo -f nc -copy infile.grb2 outfile.nc
BTW, due to the fact that I don't have the appropriate parameter table the variable has lost its attributes and name (now param8.1.0).
RE: How do I convert a.GRB2 file to a nc file? - Added by jiayan yang about 2 years ago
hi,Karin:
Thanks for your patient answer.I've tried this before, but it didn't work,there is a error:cdo copy: Open failed on >Z_SURF_C_BABJ_20210719091421_P_CMPA_FRT_CHN_0P05_HOR-PRE-2021071909.GRB2<
Unsupported file type
I'm guessing it's this file that starts with '.GRB2' ends, it's a little bit different than '.grb2'. Can you take a look at it again?
RE: How do I convert a.GRB2 file to a nc file? - Added by Karin Meier-Fleischer about 2 years ago
I cannot reproduce your problem. Which cdo version ('cdo -V') do you use?
cdo -f nc -copy Z_SURF_C_BABJ_20210719001400_P_CMPA_FRT_CHN_0P05_HOR-PRE-2021071900.GRB2 o.nc cdo copy: Processed 1682601 values from 1 variable over 1 timestep [0.27s 48MB].
RE: How do I convert a.GRB2 file to a nc file? - Added by jiayan yang about 2 years ago
!!
Is it because my version is too old?
RE: How do I convert a.GRB2 file to a nc file? - Added by Karin Meier-Fleischer about 2 years ago
Uh, this is very old. The current version is 2.1.0.
RE: How do I convert a.GRB2 file to a nc file? - Added by jiayan yang about 2 years ago
Ok, thank you very much for your answer!I'll go update it!