Project

General

Profile

remap from WGS_1984 to Lambert_Conformal_Conic

Added by Edgar Espitia over 1 year ago

Hi all,

I am new working with CDO,

I'm currently working on with two data sets, the first pr_lcc.nc in Lambert_Conformal_Conic projection, and the other pr_wgs84.nc in WGS84, I required to transform to Lambert Conformal Conic , so I tried the command:

cdo -L remapbil,pr_lcc.nc pr_wgs84.nc pr_wgs84_to_lcc.nc

Everything seems to be fine, but I got one warning, and the output file is empty, this is the message that I got:

pj_obj_create: /sw/spack-levante/proj-8.1.0-i6a6ah/share/proj/proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 1 whereas a number >= 2 is expected. It comes from another PROJ installation.
pj_obj_create: /sw/spack-levante/proj-8.1.0-i6a6ah/share/proj/proj.db contains DATABASE.LAYOUT.VERSION.MINOR = 1 whereas a number >= 2 is expected. It comes from another PROJ installation.
cdo    remapbil (Warning) : Source grid cell center latitudes out of range (min=1.3e+03/max=4.14e+03)!
cdo    remapbil: Bilinear weights from projection (4530x2970) to curvilinear (1200x1100) grid, with source mask (7446075)
cdo    remapbil: Processed 13454100 values from 1 variable over 1 timestep [7.49s 2250MB].

I tried to transform from Lambert Conformal Conic to WGS84 using the same command, and it works fine.

Any suggestion on how to do the transformation to Lambert Conformal Conic?

Thanks you


Replies (2)

RE: remap from WGS_1984 to Lambert_Conformal_Conic - Added by Uwe Schulzweida over 1 year ago

The combination of the attributes

pr:grid_mapping = "wgs_1984" 
wgs_1984:proj4_params = "+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs
leads to the fact that the existing coordinates are transformed over the proj library into geographical coordinates.
Since the available coordinates are already geographic lon/lat coordinates, this procedure is here rather not meaningful.
You can deactivate the transformation by deleting the attribute pr:grid_mapping, then it works:
ncatted -a grid_mapping,pr,d,,, pr_wgs84.nc result.nc
cdo -L remapbil,pr_lcc.nc result.nc pr_wgs84_to_lcc.nc

RE: remap from WGS_1984 to Lambert_Conformal_Conic - Added by Edgar Espitia over 1 year ago

It works well.
Thank you very much!

    (1-2/2)