NetCDF Packed Byte data
M.Mahakur
mmahakur at TROPMET.RES.IN
Sat Nov 4 14:39:49 EST 2006
Respected GrADS users:
How can I open the packed netcdf byte data (ncdumped headers of a single
file I am pasting here)? I could display the variable 'sst_foundation'
using sdfopen. I guess GrADS is taking care of off_set and scale_factor.
But I could not do for the other variables (i.e.. analysis_error, bias,
sea_ice_fraction and mask), which are packed bytes.
Secondly, variable 'sea_ice_fraction' is getting truncated to
'sea_ice_fractio'!!
Thanks in advance.
With Regards,
M. Mahakur
---------------------------------------------------
ga-> q file
File 1 : OSTIA Sea Surface Temperature Analysis
Descriptor: 20060101-UKMO-L4UHfnd-GLOB-v01.nc
Binary: 20060101-UKMO-L4UHfnd-GLOB-v01.nc
Type = Gridded
Xsize = 7200 Ysize = 3600 Zsize = 1 Tsize = 1
Number of Variables = 5
sst_foundation 0 -999 foundation sea surface temperature
analysis_error 0 -999 error estimate from the analysis
bias 0 -999 analysis error bias
sea_ice_fractio 0 -999 sea ice fraction
mask 0 -999 mask
---------Headers from ncdump------------------------------------
netcdf 20060101-UKMO-L4UHfnd-GLOB-v01 {
dimensions:
lon = 7200 ;
lat = 3600 ;
time = 1 ;
variables:
int time(time) ;
time:long_name = "reference time of sst field" ;
time:units = "seconds since 1981-01-01 00:00:00" ;
float lat(lat) ;
lat:long_name = "latitude" ;
lat:units = "degrees_north" ;
float lon(lon) ;
lon:long_name = "longitude" ;
lon:units = "degrees_east" ;
short sst_foundation(time, lat, lon) ;
sst_foundation:long_name = "foundation sea surface
temperature" ;
sst_foundation:units = "kelvin" ;
sst_foundation:_FillValue = -32768s ;
sst_foundation:add_offset = 273.15f ;
sst_foundation:scale_factor = 0.01f ;
sst_foundation:valid_min = -32767s ;
sst_foundation:valid_max = 32767s ;
sst_foundation:standard_name = "sea_surface_temperature" ;
byte analysis_error(time, lat, lon) ;
analysis_error:long_name = "error estimate from the
analysis" ;
analysis_error:units = "kelvin" ;
analysis_error:_FillValue = -128b ;
analysis_error:add_offset = 0.f ;
analysis_error:scale_factor = 0.05f ;
analysis_error:valid_min = -127b ;
analysis_error:valid_max = 127b ;
byte bias(time, lat, lon) ;
bias:long_name = "analysis error bias" ;
bias:units = "kelvin" ;
bias:_FillValue = -128b ;
bias:add_offset = 0.f ;
bias:scale_factor = 0.01f ;
bias:valid_min = -127b ;
bias:valid_max = 127b ;
byte sea_ice_fraction(time, lat, lon) ;
sea_ice_fraction:long_name = "sea ice fraction" ;
sea_ice_fraction:units = "1" ;
sea_ice_fraction:_FillValue = -128b ;
sea_ice_fraction:add_offset = 0.f ;
sea_ice_fraction:scale_factor = 0.01f ;
sea_ice_fraction:valid_min = -127b ;
sea_ice_fraction:valid_max = 127b ;
sea_ice_fraction:standard_name = "sea_ice_area_fraction" ;
sea_ice_fraction:comment = "Data derived from OSI-SAF
sea ice product" ;
byte mask(time, lat, lon) ;
mask:long_name = "mask" ;
mask:comment = "b0: 1=sea ; b1: 1=land ; b2: 1=lakes ;
b3: 1=ice" ;
// global attributes:
:Conventions = "CF-1.0" ;
:title = "OSTIA Sea Surface Temperature Analysis" ;
:DSD_entry_id = "UKMO-TSANAL-v01-GLOB" ;
:references = "None" ;
:institution = "UK Met Office" ;
:contact = "john.stark at metoffice.gov.uk" ;
:GDS_version_id = "v1.0-rev1.5" ;
:netcdf_version_id = "3.6.0-p1 of Jul 4 2005 16:41:16 $" ;
:creation_date = "2006-01-02 14:00 UTC" ;
:product_version = "0.1" ;
:history = "Created from sst:temperature from
/data/local/frhn/OSTIA/analysis/20060102_UKMO_L4UHfnd_GLOB_v01.nc;
error:; bias:; sea ice:" ;
:grid_resolution = " 0.05000 degree" ;
:comment = "WARNING Some applications are unable to
properly handle signed byte values. If values are encountered > 127,
please substract 256 from this reported value" ;
:start_date = "2006-01-01 UTC" ;
:start_time = "00:00:00 UTC" ;
:stop_date = "2006-01-02 UTC" ;
:stop_time = "00:00:00 UTC" ;
:southernmost_latitude = -90.f ;
:northernmost_latitude = 90.f ;
:westernmost_longitude = -180.f ;
:easternmost_longitude = 180.f ;
:file_quality_index = "0" ;
data:
time = 788961600 ;
lat = -89.975, -89.925, -89.875, -89.825, -89.775, -89.725, -89.675,
-89.625, -89.575, -89.525, -89.475, -89.425, -89.375, -89.325, -89.275,
More information about the gradsusr
mailing list