Project

General

Profile

Time Interpolation Problem

Added by Nathanael Harwood almost 7 years ago

Interpolation between time steps - which has worked for me fine with 6hourly -> 1hourly data - is not working for weekly -> daily data.

cdo inttime,2015-12-28,00:00:00,1day NOAA_Snow_Cover_Jan2016.nc JANSNOWDAILY.nc
Warning (cdfScanVarAttributes) : NetCDF: Variable not found - coord_system

Is returned, despite the .nc file having a coordinate system.

The resulting (interpolated) file does have 29 time steps, but the data is still weekly as far as I can tell in Panoply. Does anyone know why this wouldn't work? I'm using CDO 1.6.4 for windows, and the (small) example file is below:

Many thanks!

NOAA_Snow_Cover_Jan2016.nc (163 KB) NOAA_Snow_Cover_Jan2016.nc NOAA Snow Cover data Jan 2016

Replies (2)

RE: Time Interpolation Problem - Added by Uwe Schulzweida almost 7 years ago

Your NetCDF dataset contains masked data with the values 0 and 1. This data is stored with the data type 8-bit Integer. The Interpolation produces values between 0 and 1. These values can't be stored in 8-bit Integer. Therefor the result is rounded to the nearest integer value, which is again 0 or 1. You have to change the output datatype to floating point to solve the problem:

cdo -b F32 inttime,2015-12-28,00:00:00,1day NOAA_Snow_Cover_Jan2016.nc JANSNOWDAILY.nc

RE: Time Interpolation Problem - Added by Nathanael Harwood almost 7 years ago

Uwe - you're a hero

Thanks for the code AND explanation. The above code seems to have done the trick, as far as I can tell in Panoply.

    (1-2/2)