2009-07-06 17:30:46 UTC
I'm attempting to convert a "short" type to a "float" type using : ncap2 -s snod=float(snod); snod.2007.nc snod.test.nc
The ncdump -h looks like this for the original and the converted. The output set looks to the "missing value", 3.2766 plus a very small increment. The pattern of the data is there but the scaling is obviously in error. I'm new to the NCO tools and any advice would be appreciated, thanks.
Schuhman:Y2007 aschuh$ ncdump -h narr.test.nc | grep snod
float snod(time, y, x) ;
snod:_FillValue = -32767.f ;
snod:GRIB_id = 66 ;
snod:GRIB_name = "SNOWD" ;
snod:actual_range = 0.f, 3.622298f ;
snod:add_offset = 3.2766f ;
snod:coordinates = "lat lon" ;
snod:dataset = "NARR 3-hourly" ;
snod:grid_mapping = "Lambert_Conformal" ;
snod:level_desc = "Surface" ;
snod:long_name = "3-hourly Snow Depth at Surface" ;
snod:missing_value = 32766s ;
snod:parent_stat = "Other" ;
snod:precision = 4s ;
snod:scale_factor = 0.0001f ;
snod:standard_name = "surface_snow_thickness" ;
snod:statistic = "Individual Obs" ;
snod:units = "m" ;
snod:unpacked_valid_range = 0.f, 6.f ;
snod:valid_range = -32766s, 27235s ;
snod:var_desc = "snow depth" ;
:history = "Mon Jul 6 10:39:09 2009: ncap2 -s snod=float(snod); snod.2007.nc narr.test.nc\n",
Schuhman:Y2007 aschuh$ ncdump -h snod.2007.nc | grep snod
netcdf snod.2007 {
short snod(time, y, x) ;
snod:units = "m" ;
snod:long_name = "3-hourly Snow Depth at Surface" ;
snod:unpacked_valid_range = 0.f, 6.f ;
snod:precision = 4s ;
snod:actual_range = 0.f, 3.622298f ;
snod:add_offset = 3.2766f ;
snod:scale_factor = 0.0001f ;
snod:missing_value = 32766s ;
snod:valid_range = -32766s, 27235s ;
snod:_FillValue = -32767s ;
snod:GRIB_name = "SNOWD" ;
snod:GRIB_id = 66 ;
snod:var_desc = "snow depth" ;
snod:standard_name = "surface_snow_thickness" ;
snod:level_desc = "Surface" ;
snod:dataset = "NARR 3-hourly" ;
snod:statistic = "Individual Obs" ;
snod:parent_stat = "Other" ;
snod:grid_mapping = "Lambert_Conformal" ;
snod:coordinates = "lat lon" ;
Schuhman:Y2007 aschuh$