Convert Gaussina Grid to Regular LatLon
Added by Ingrid Petry about 4 years ago
I'm trying to convert a NETCDF file from a Gaussian grid to regular LatLon.
Is there an easy and secure way to do taht?
Thanks
Replies (8)
RE: Convert Gaussina Grid to Regular LatLon - Added by Karin Meier-Fleischer about 4 years ago
Hi Ingrid,
if you had googled the question, you would have got the answer immediately.
cdo -setgridtype,regular infile outfile
-Karin
RE: Convert Gaussina Grid to Regular LatLon - Added by Ingrid Petry about 4 years ago
Hi Karin, thanks for your answer.
I have tried some solutions that I found on the internet, but still without sucess.
I tried your code and cdo says "There is no reduced grid". I need to convert a T126 Gaussina Grid (lat from 0 to 360) to the traditional LatLon (lat from -180 to 180).
The solution that worked was "cdo remapbil,grid_example.nc if.nc of.nc". The problem now is that my example file has a high resolution and the file I'm trying to convert changed from 500 MB to 31 GB.
Probably I need a example file with a resolution more similar to T126, or I need to change the method.
RE: Convert Gaussina Grid to Regular LatLon - Added by Karin Meier-Fleischer about 4 years ago
Can you upload the data file? One timestep is enough.
RE: Convert Gaussina Grid to Regular LatLon - Added by Ingrid Petry about 4 years ago
Of course! Its attached.
I also tried "cdo remapbil,t126 if.nc of.nc" and CDO warned "grid type spectral not suported", although when I tried "sp2gp" operator it says "No spectral data found".
gaussian.nc (291 KB) gaussian.nc | |||
example_file.nc (28.8 MB) example_file.nc |
RE: Convert Gaussina Grid to Regular LatLon - Added by Karin Meier-Fleischer about 4 years ago
What is example_file.nc?
Remap the gaussian grid to lonlat grid:
cdo -sellonlatbox,-180,180,-90,90 -remapbil,r384x192 gaussian.nc outfile_T126_lonlat.nc
RE: Convert Gaussina Grid to Regular LatLon - Added by Ingrid Petry about 4 years ago
Example_file.nc is in the type of grid I want gaussian.nc to be converted.
I need to compare their values... Starting from an specific point, same coordinate in both files.
RE: Convert Gaussina Grid to Regular LatLon - Added by Karin Meier-Fleischer about 4 years ago
Then the above information was misleading.
cdo -remapbil,example_file.nc gaussian.nc outfile_grid_of_example_file.nc
RE: Convert Gaussina Grid to Regular LatLon - Added by Ingrid Petry about 4 years ago
Thanks Karin!
Problem solved