Project

General

Profile

netCDF file convert from rotated lat lon grid to geographic co-ordinate system

Added by netra timalsina over 10 years ago

Hei,
I have netCDF climate data (test_org.nc). I tried to open it by using CDO, but it complains " open failed on >file_name<, unsupported file type (library support not compiled in)". Then i could open the file in R and write again netCDF (test_r.nc), then i can read by CDO. Now I have to convert to geographic co-ordinate system, any idea ? The grid system of original data is attached m_np.txt.

the file is big therefore can be downloaded from http://folk.ntnu.no/netrapra/
file names is "Downloads.rar"

your input would be highly appreciated
Netra


Replies (3)

RE: netCDF file convert from rotated lat lon grid to geographic co-ordinate system - Added by Uwe Schulzweida over 10 years ago

Your original file contains compressed netCDF4 data. It seems that your CDO installation was compiled with netCDF3 support only.

You can added the coordinate information in m_np.txt to the file test_r.nc with setgrid:

  cdo setgrid,m_np.txt test_r.nc result.nc

RE: netCDF file convert from rotated lat lon grid to geographic co-ordinate system - Added by netra timalsina over 10 years ago

Dear Uwe,

Thankyou very much,

When I set the grid as you explained, the result.nc file is upside down, for example the the plot is attached.

thanks
Netra

RE: netCDF file convert from rotated lat lon grid to geographic co-ordinate system - Added by Uwe Schulzweida over 10 years ago

Dear Netra,

Try invertlat to invert the latitudes:

  cdo setgrid,m_np.txt -invertlat  test_r.nc result.nc
Cheers,
Uwe

    (1-3/3)