Project

General

Profile

What is wrong with remapnn ?

Added by Natalia Camara over 3 years ago

Dear CDO users,
I intend to extract temperature values of points (lat/long) from netCDF files . The input file hourPortC.nc is limited by lon [-9.52 -6.22] and by lat [42.12 36.92].
Something wrong is happened :
when I use lon/lat without decimals
cdo -outputtab,date,lon,lat,value -remapnn,"lon=-9.0_lat=39.0" hourPort.nc > output.csv
I am getting correct output like this:
  1. date lon lat value
    2017-01-01 -9 39 278.442
    2017-01-01 -9 39 277.92
    2017-01-01 -9 39 277.395
    2017-01-01 -9 39 276.99
    2017-01-01 -9 39 276.654
    2017-01-01 -9 39 276.29
    2017-01-01 -9 39 275.985
But when I use lon/lat with decimals
cdo -outputtab,date,lon,lat,value -remapnn,"lon=-9.43_lat=39.38" hourPort.nc > output.csv
cdo give me wrong output :
  1. date lon lat value
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    2017-01-01 -9.43 39.38 -32767
    What can be wrong?
    Many thanks.
    Natalia

Replies (1)

RE: What is wrong with remapnn ? - Added by Brendan DeTracey over 3 years ago

This looks like a cdo bug to me. Operator remapnn should extrapolate by default.

The following is a work around, but it is slow:

cdo -outputtab,date,lon,lat,value -remapnn,"lon=-9.43_lat=39.38" -setmisstonn hourPort.nc > output.csv

    (1-1/1)