How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates
Added by xigua and summer almost 4 years ago
Dear Sir
I downloaded the snow water equivalent data from the https://www.globsnow.info/swe/archive_v3.0/L3B_monthly_SWE/NetCDF4/. This data have Lambert Azimuthal Equal Area coordinates. I only find little information to convert the Lambert Azimuthal Equal Area coordinates to geographic coordinates in CDO User Guide. Can you give some help or introduce to conduct conversion?Any suggestion is worth learning. Thanks the help from the cdo.
Replies (10)
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Karin Meier-Fleischer almost 4 years ago
Hi Xigua,
you need to use a grid description file with the proj_params settings to remap it to lonlat grid.
1. Retrieve the grid information
cdo griddes 197901_northern_hemisphere_monthly_swe_0.25grid.nc > laea_gridfile.txt
2. Edit the grid description file and add proj_params
# # gridID 1 # gridtype = projection gridsize = 519841 xsize = 721 ysize = 721 xname = x xunits = "m" yname = y yunits = "m" xfirst = -9024308.9995 xinc = 25067.525 yfirst = -9024308.9995 yinc = 25067.525 grid_mapping = crs grid_mapping_name = lambert_azimuthal_equal_area false_easting = 0 false_northing = 0 latitude_of_projection_origin = 90 longitude_of_projection_origin = 0 longitude_of_prime_meridian = 0 semi_major_axis = 6371228. inverse_flattening = 0 proj_params = "+proj=stere +lon_0=0 +lat_0=90"
3. Then remap the data file
cdo -remapbil,r360x180 -setgrid,laea_gridfile.txt 197901_northern_hemisphere_monthly_swe_0.25grid.nc out_laea.nc
-Karin
plot_lambert.png (119 KB) plot_lambert.png |
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by xigua and summer almost 4 years ago
Thanks for your timely reply and the detailed step to conversion.
Thanks for your advice!
-Xigua
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Karin Meier-Fleischer almost 4 years ago
You're welcome!
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by N Kanha over 3 years ago
Hi There,
I followed the same instructions but my output shows distorted results.
The pic on the right is the output after regridding.
Could you pls help me fixing the error?
Thanks
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Karin Meier-Fleischer over 3 years ago
Hi,
sorry, but without the data file it is not possible to help.
-Karin
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Jos de Laat almost 3 years ago
I too want to convert a LAEA dataset to geographic coordinates and followed the same recipe.
I get this a as grid information (last line added as in the recipe)
#- gridID 1
#
gridtype = projection
gridsize = 48283948
xsize = 7508
ysize = 6431
xname = x
xlongname = "x coordinate of projection"
xunits = "m"
yname = y
ylongname = "y coordinate of projection"
yunits = "m"
xfirst = -622500
xinc = 1000
yfirst = 604500
yinc = 1000
scanningMode = 64
grid_mapping = lambert_azimuthal_equal_area
grid_mapping_name = lambert_azimuthal_equal_area
false_easting = 4321000.
false_northing = 3210000.
latitude_of_projection_origin = 52.
longitude_of_projection_origin = 10.
long_name = "CRS definition"
longitude_of_prime_meridian = 0.
semi_major_axis = 6378137.
inverse_flattening = 298.257222101
spatial_ref = 'PROJCS["ETRS89-extended / LAEA Europe",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",52],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Northing",NORTH],AXIS["Easting",EAST],AUTHORITY["EPSG","3035"]]'
GeoTransform = "-623000 1000 0 7035000 0 -1000 "
proj_params = "+proj=stere +lon_0=10.0 +lat_0=52.0"
However, when I apply this to the dataset I have (European domain), although the data is gridded, the project is shifted and rotated. So I am still missing something, but what?
cdo -L -remapbil,r360x180 -setgrid,laea_gridfile.txt 2020_st_All_avg.nc 2020_st_All_avg.lonlat.nc
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Uwe Schulzweida almost 3 years ago
If proj_params is defined in the grid file, only this parameter is used to calculate the geographic coordinates. I don't know what is missing or wrong with the definition in this parameter. But if this parameter is not specified, then the geographic coordinates are calculated from the other parameters. And that looks much better.
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Moritz Wirthensohn over 2 years ago
Hey Karin,
i have a question to your first answer, because i have the same problem:
Is it possible to maintain a resolution of 0.25*0.25 degree pixel when remapping to lon/lat?
Also as far as i understood is there a interpolation while remapping right? Is it possible to convert the exact position from Lambert Azimuthal to Lon/lat values?
Thanks in advance!
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Estanislao Gavilan over 2 years ago
Hi Moritz,
I think you can specify your grid. I interpolated a curvilinear grid (orca) into a curvilinear grid(ecco). I know that you want a regular grid but I think the principle is the same. If you write your grid.txt with the lon, lat and the corners of your grid cells (ie. lon and lat), you can interpolate anything. Take a look to this webpage
https://www.climate-cryosphere.org/wiki/index.php?title=Regridding_with_CDO
RE: How to convert Lambert Azimuthal Equal Area coordinates to geographic coordinates - Added by Moritz Wirthensohn over 2 years ago
Hi,
yes i think it worked. Thanks a lot!