2

I'm in trouble to read NetCDF file data. Basically NetCDF file contains Ocean current data. How do you convert a NetCDF file to a Grib2 or Grib file? I already have procedure to read data from Grib2 file using OpenGrads version 2.0. What I need overall is to generate image for ocean current components available in netCDF and display on map.

Can anyone direct/correct me how to accomplish this task.

1

GRIB is more limited than NetCDF. You can use a tool like the NetCDF-Java library to read both NetCDF and GRIB1 and GRIB2 files: https://www.unidata.ucar.edu/software/thredds/current/netcdf-java/documentation.htm However, it can write only NetCDF files.

If you use Matlab, the https://github.com/nctoolbox/nctoolbox can read and plot both.

0

What is the problem when you try to read a netcdf file in grads?

The command in grads to read netcdf file is

sdfopen filename.nc

Verify the content with

q file 1

From this point the procesure is pretty much the same of a grib file.

[]

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.