<div dir="ltr"><div class="gmail_default" style="font-size:small">Please post questions on NCL to <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a> and not <a href="mailto:ncl-install@ucar.edu">ncl-install@ucar.edu</a>. This email list is for people with questions about how to install NCL.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style><a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br></div><div class="gmail_default" style><br></div><div class="gmail_default" style>The issue is that your data is of type "short", and has been "packed" in the file to make the file smaller. This means that the "scale_factor" and "add_offset" attributes of "uwnd" need to be applied to the variable when you read it off the file.</div><div class="gmail_default" style><br></div><div class="gmail_default" style>The "short2flt" function can do this for you:</div><div class="gmail_default" style><br></div><div class="gmail_default" style><a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml">http://www.ncl.ucar.edu/Document/Functions/Contributed/short2flt.shtml</a><br></div><div class="gmail_default" style><font face="courier new, monospace"><br></font></div><div class="gmail_default" style><font face="courier new, monospace">fname = "<span style="font-size:13px">/media/ablaye/terabouya/Data/</span><span style="font-size:13px">2010/</span><a href="http://uwnd.2010.nc">uwnd.2010.nc</a>"</font></div><div class="gmail_default" style><font face="courier new, monospace">f = addfile(fname,"r")</font></div><div class="gmail_default" style><font face="courier new, monospace">uwnd = short2flt( f->uwnd )</font></div><div class="gmail_default" style><br></div><div class="gmail_default" style><br></div><div class="gmail_default" style>--Mary</div><div class="gmail_default" style><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 28, 2014 at 3:00 AM, Abdoulaye SY <span dir="ltr"><<a href="mailto:sy.abdoulaye3@ugb.edu.sn" target="_blank">sy.abdoulaye3@ugb.edu.sn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>When i load this data with addfile function i have values like -20591. I would know why i dont see the normal values?<br>The description of the data is :<br><br>filename: uwnd.2010<br>path: /media/ablaye/terabouya/Data/2010/<a href="http://uwnd.2010.nc" target="_blank">uwnd.2010.nc</a><br> file global attributes:<br> Conventions : COARDS<br> title : mean daily NMC reanalysis (2010)<br> history : created 2009/12 by Hoop (netCDF2.3)<br> description : Data is from NMC initialized reanalysis<br>(4x/day). It consists of most variables interpolated to<br>pressure surfaces from model (sigma) surfaces.<br> platform : Model<br> references : <a href="http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html" target="_blank">http://www.esrl.noaa.gov/psd/data/gridded/data.ncep.reanalysis.html</a><br> dimensions:<br> lon = 144<br> lat = 73<br> level = 17<br> time = 365 // unlimited<br> variables:<br> float level ( level )<br> units : millibar<br> actual_range : ( 1000, 10 )<br> long_name : Level<br> positive : down<br> GRIB_id : 100<br> GRIB_name : hPa<br> axis : Z<br><br> float lat ( lat )<br> units : degrees_north<br> actual_range : ( 90, -90 )<br> long_name : Latitude<br> standard_name : latitude<br> axis : Y<br><br> float lon ( lon )<br> units : degrees_east<br> long_name : Longitude<br> actual_range : ( 0, 357.5 )<br> standard_name : longitude<br> axis : X<br><br> double time ( time )<br> units : hours since 1-1-1 00:00:0.0<br> long_name : Time<br> actual_range : ( 17610576, 17619312 )<br> delta_t : 0000-00-01 00:00:00<br> avg_period : 0000-00-01 00:00:00<br> standard_name : time<br> axis : T<br><br> short uwnd ( time, level, lat, lon )<br> long_name : mean Daily U-wind<br> unpacked_valid_range : ( -125, 160 )<br> actual_range : ( -107.08, 115 )<br> units : m/s<br> add_offset : 202.66<br> scale_factor : 0.01<br> missing_value : 32766<br> precision : 2<br> least_significant_digit : 1<br> GRIB_id : 33<br> GRIB_name : UGRD<br> var_desc : u-wind<br> dataset : NCEP Reanalysis Daily Averages<br> level_desc : Multiple levels<br> statistic : Mean<br> parent_stat : Individual Obs<br> valid_range : ( -32766, -4266 )<br> _FillValue : 32766<br><br></div>
<br>_______________________________________________<br>
ncl-install mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-install" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-install</a><br>
<br></blockquote></div><br></div>