Problem converting ctl file to netcdf via import_binary: missing variables
Added by Lyndon Mark Olaguera about 5 years ago
Dear CDO experts,
Although I am not encountering an error when converting a GrADS ctl file to netcdf, there are some missing variables in the output netcdf file.
I uploaded the files here:
(ctl file) https://www.dropbox.com/s/v69krzs6bryajxb/pres_G3D_Thompson_ACM2_120s_usgs_do1_janHRF.ctl?dl=0
(dat file) https://www.dropbox.com/s/dntcjkif64nkezr/pres_G3D_Thompson_ACM2_120s_usgs_do1_janHRF.dat?dl=0
I use the following commands:
cdo -f nc import_binary ifile ofile
Another problem when I ncdump the output file, there are three levels? See below the dimension of the output netcdf file.
netcdf test {
dimensions:
time = UNLIMITED ; // (25 currently)
lon = 99 ;
lat = 99 ;
lev = 1 ;
lev_2 = 20 ;
lev_3 = 4 ;
I'll appreciate any help on this.
Sincerely,
Lyndz
Replies (2)
RE: Problem converting ctl file to netcdf via import_binary: missing variables - Added by Karin Meier-Fleischer about 5 years ago
Hi Lyndz,
the data descriptor file is not correct. If the variables are not on a pre-projected grid the units entry
has to be 99. Variables not depending on levels has to have the level 0 not 1. See attached ctl file.
You will get two level variables lev and lev_2 because some variables are depending on 20 leveles and
other only on 4 levels.
See also: http://cola.gmu.edu/grads/gadoc/descriptorfile.html#VARS
-Karin
RE: Problem converting ctl file to netcdf via import_binary: missing variables - Added by Lyndon Mark Olaguera about 5 years ago
Hi Karin,
Thank you so much for this!
Sincerely,
Lyndz