Project

General

Profile

Bilinear interpolation, or not?

Added by F Lapointe almost 5 years ago

Hi,

I am currently transforming a dataset from spherical projection (lat/lon on a sphere) into stereographic projection (X/Y) using attached CDO_proj on my data test2.nc. I use ' cdo remapbil,CDO_proj test2.nc test_r.nc'.

The results are really strange as I only have a partial answer shown in test_r.nc, as it was only taking partially the data without interpolation as the remainder data are 'NaN'. I thought that 'remapbil' was interpolating my current dataset into the defined projection?

What happened?!

Thank you for your help.

Best,

François


Replies (5)

RE: Bilinear interpolation, or not? - Added by F Lapointe almost 5 years ago

I have forgotten to mention that I used:

ncatted -a coordinates,delta_SL,c,c,"X Y" test2.nc

prior to remap the data...

RE: Bilinear interpolation, or not? - Added by Uwe Schulzweida almost 5 years ago

The geographical lat/lon coordinates contains confusing values.
Y is in the range of -93 to 2.35e+18 and the structure doesn't looks like latitude coordinates on a curvilinear grid.
The longitude values in X looks like latitudes.

RE: Bilinear interpolation, or not? - Added by F Lapointe almost 5 years ago

Hi,

thanks for the output Uwe. I have found out where the data were corrupted--see new attached file. The 'Y' are longitude (-93 to 15) and 'X' are latitude (55 to 85). However, the problem persists as I have got sparsely output shown in 'test_r.nc'--see first e-mail. It seems that 'remapbil' is not interpolating data for other lat/lon on which they do not previously have data from tes2.nc. Do you know what could create such sparsely output?

Thanks...

François

test2.nc (14.9 MB) test2.nc

RE: Bilinear interpolation, or not? - Added by Uwe Schulzweida almost 5 years ago

Hi François,

Here are some plots of the original file, the polar_stereographic interpolation and the interpolation back to the original grid.
The result looks correct for me.

Original input file:
ncview on inputfile test2.nc

cdo remapbil,CDO_proj test2.nc pstereo.nc
ncview on polar_stereo interpolation

cdo remapbil,test2.nc pstereo.nc regular.nc
ncview on regular lonlat interpolation

Cheers,
Uwe

test2.png (108 KB) test2.png ncview on inputfile test2.nc
polar_stereographic.png (168 KB) polar_stereographic.png ncview on polar_stereo interpolation
regular.png (72.4 KB) regular.png ncview on regular lonlat interpolation

RE: Bilinear interpolation, or not? - Added by F Lapointe almost 5 years ago

Thank you very much....

François

    (1-5/5)