Converting WRF lambert conformal to latlon grid
Added by Litta Arakkal 4 months ago
Hi,
I was converting WRF output for the region between latitudes -60 to 20 and longitudes -160 to 60, using bilinear interpolation at a resolution of 2 km. The conversion worked properly for domains over the US and Europe. However, I encountered issues with domains in the Southern Hemisphere.
I have attached the datasets and figures. Please check them and suggest a solution.
Output grid specification
I was converting WRF output for the region between latitudes -60 to 20 and longitudes -160 to 60, using bilinear interpolation at a resolution of 2 km. The conversion worked properly for domains over the US and Europe. However, I encountered issues with domains in the Southern Hemisphere.
I have attached the datasets and figures. Please check them and suggest a solution.
Output grid specification
- Define 0.02-degree global lat-lon grid
#grid_description = """
grid_description = """\
gridtype = lonlat
xsize = 7511
ysize = 4001
xname = lon
xlongname = "longitude"
xunits = "degrees_east"
yname = lat
ylongname = "latitude"
yunits = "degrees_north"
xfirst = -90.00000
xinc = 0.02
yfirst = -60.00000
yinc = 0.02
"""
UV10.grb2 is the original data. test.grb is the converted data
| UV10.grb2 (2.18 MB) UV10.grb2 | WRF output | ||
| Screenshot 2025-07-22 at 17.15.52.png (278 KB) Screenshot 2025-07-22 at 17.15.52.png | WRF output plot | ||
| check_wind.png (110 KB) check_wind.png | converted data plot | ||
| test.grb (24.9 MB) test.grb | Converted data |
Replies (6)
RE: Converting WRF lambert conformal to latlon grid - Added by Uwe Schulzweida 4 months ago
The orientation of the latitude parameters for the lambert projection in the southern hemisphere is unfortunately not correct with GRIB2 data. We will fix this problem in the next CDO release 2.5.3.
This problem can only be solved by setting the correct projection parameters with setprojparams:
cdo remapbil,<targetgrid> -setprojparams,'+proj=lcc +a=6371000 +lon_0=344.533984 +lat_0=-22.432 +lat_1=-22.432 +lat_2=-22.432 +x_0=7534717.40492831 +y_0=5719446.03519481' UV10.grb2 result
RE: Converting WRF lambert conformal to latlon grid - Added by Litta Arakkal 4 months ago
Thank you so much for your support!
This command is working.
| check_wind.png (134 KB) check_wind.png |
RE: Converting WRF lambert conformal to latlon grid - Added by Litta Arakkal about 2 months ago
Hi,
Thank you for your support!
I am facing same issue for converting Australian domain.
I was WRF output for the region between latitudes -45 to 8 and longitudes 100 to 170, using bilinear interpolation at a resolution of 2 km.
I am attaching my dataset (gr2 file).Please help me to solve this issue.
Thank you for your support!
I am facing same issue for converting Australian domain.
I was WRF output for the region between latitudes -45 to 8 and longitudes 100 to 170, using bilinear interpolation at a resolution of 2 km.
I am attaching my dataset (gr2 file).Please help me to solve this issue.
- Define 0.02-degree global lat-lon grid
grid_description = """
gridtype = lonlat
xsize = 3511
ysize = 2651
xname = lon
xlongname = "longitude"
xunits = "degrees_east"
yname = lat
ylongname = "latitude"
yunits = "degrees_north"
xfirst = 100.00000
xinc = 0.02
yfirst = -45.00000
yinc = 0.02
"""
| 2025091705_000.gr2 (3.74 MB) 2025091705_000.gr2 |
RE: Converting WRF lambert conformal to latlon grid - Added by Litta Arakkal about 2 months ago
Sorry. I couldn't upload the data properly.
Please check attached data
| 2025091705_000.gr2 (96.1 MB) 2025091705_000.gr2 |
RE: Converting WRF lambert conformal to latlon grid - Added by Uwe Schulzweida about 2 months ago
Here, the projection parameters must also be specified with setprojparams:
cdo remapbil,<targetgrid> -setprojparams,'+proj=lcc +a=6371000 +lon_0=133.242008 +lat_0=-30.145 +lat_1=-30.145 +lat_2=-30.145 +x_0=4230670.54711589 +y_0=1840338.2951872' infile outfile
RE: Converting WRF lambert conformal to latlon grid - Added by Litta Arakkal about 2 months ago
Thank you so much for your support!. IT is working perfectly.