Hi Andrea
I did not find any attached script. I did not have any problem.
I downloaded and unzipped
ncl 0> f = addfile ("QS_XWGRD3_2000001.20070371658.hdf", "r")
ncl 1> q = f->asc_time_frac
ncl 2> print(q)
ncl 3> print("min(q)="+min(q)) ; ===> 0
ncl 4> print("max(q)="+max(q)) ; ===> 28078
ncl 6> print(q*q_at_scale_factor) ; q_at_scale_factor ===> 2e-05
ncl 7> qq = q*q_at_scale_factor
ncl 8> print("min(qq)="+min(qq)) ; 0
ncl 9> print("max(qq)="+max(qq)) ; 0.56156
=========================================================
Please note for future reference.
netCDF: The COARDS and CF convention for scale_factor and add_offset
xFloat = xShort*scale_factor + add_offset
See:
http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-20010629.htm#pack
NCL:
http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml
HDF: The NASA/HDF conventions seems to be:
xFloat = (xShort- add_offset)*scale_factor
NCL:
http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt_hdf.shtml
Andrea Hahmann wrote:
> Hi!
>
> I am having some troubles reading a QuikSCAT hdf file using ncl. I
> read a couple of "16-bit unsigned integers" fields from an HDF4 file:
> "asc_avg_wind_speed" and "asc_time_frac". asc_avg_wind_speed has all
> positive values between 0. and 50., as it should, being wind speed.
> But when I read asc_time_frac it contains both positive and negative
> values. According to the "guide document" this field should be
> between 0. and 1.
>
> My script is attached. Files can be obtained from:
> ftp://podaac.jpl.nasa.gov/pub/ocean_wind/quikscat/L3/data/2000/
>
> Any help will be appreciated!
> Thanks,
> Andrea
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon May 05 2008 - 15:31:22 MDT
This archive was generated by hypermail 2.2.0 : Mon May 05 2008 - 15:33:17 MDT