I have files which contains atmospheric data in 6 hrs intervals (4 files per day) in .grd format. I also have the concerned descriptor files (yyyymmddhh.ctl) . I can plot the data using using GrADS. But I need to convert these files into NetCDF format (.nc) to visualize it with the help of ferrert . Does any one know how to do it?
I would strongly suggest you to use CDO to convert files to NetCDF. When doing simple manipulation of .nc files, using CDO or NCO is almost always the best option. In my experience, CDO, when the right operator is available, is in general safer and much faster than using Python or R.
e.g.:
cdo -f nc import_binary in_grads.ctl out_ncdf.nc
You can find more on this on some topics in the CDO forums:
https://code.zmaw.de/boards/1/topics/1031
https://code.zmaw.de/boards/1/topics/213
PS: CDO hint: when chaining multiple CDO operators, use the -L option to avoid segfaults, and consider using virtual RAM space (/dev/shm on most Linux distros) for temporary files to avoid disk writes.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With