<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div></div><div><div><div>On Aug 8, 2014, at 6:37 AM, Mary Haley &lt;<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>&gt; wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Sun,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing the files. I consulted with Dennis offline about your hyam/hybm values, and he stated the following:</div>

<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div style="font-size:13px;font-family:arial,sans-serif">[1] These look like sigma coordinates.</div><div style="font-size:13px;font-family:arial,sans-serif">

<br></div><div style="font-size:13px;font-family:arial,sans-serif">[2] &nbsp;p(k) = A(k)*PO + B(k)*PS&nbsp;</div><div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp; k=level, A(k)=&gt;hyam=&gt;pressure coord; B(k)=&gt;sigma coord</div>

<div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp; Apparently, there are no pressure coords [ A(:)=0.0 ]</div><div style="font-size:13px;font-family:arial,sans-serif">

<br></div><div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp;p(k) = B(k)*PS = sigma(k)*PS</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif">

[3] The vinth2p function requires the hybrid coefficients and data to be</div><div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp; top-of-atmos to bottom. These coefficients are bottom-to-top.</div><div style="font-size:13px;font-family:arial,sans-serif">

<br></div><div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp;A sample hybm =&gt; sigma looks like the following.</div><div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp;Note the ordering. The fact that the #s are different is no big deal.</div>

<div style="font-size:13px;font-family:arial,sans-serif">&nbsp; &nbsp; &nbsp;Just different sigma levels:</div><div style="font-size:13px;font-family:arial,sans-serif"><br></div><div style="font-size:13px;font-family:arial,sans-serif"><p>&nbsp; &nbsp; hybm = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0196774136275053,&nbsp;</p><p>&nbsp; &nbsp; 0.062504293397069, 0.112887907773256, 0.172161616384983,&nbsp;</p><p>&nbsp; &nbsp; 0.241894043982029, 0.323930636048317, 0.420442461967468,&nbsp;</p><p>&nbsp; &nbsp; 0.524799540638924, 0.624887734651566, 0.713207691907883,&nbsp;</p><p>&nbsp; &nbsp; 0.783669710159302, 0.831102818250656, 0.864811271429062,&nbsp;</p><p>&nbsp; &nbsp; 0.896237164735794, 0.92512384057045, 0.951230525970459,&nbsp;</p><div>&nbsp; &nbsp;&nbsp;0.974335998296738, 0.992556095123291 ;&nbsp;</div><div>----------------------</div>
</div><div style="font-size:13px;font-family:arial,sans-serif"><br>
</div><div style="font-size:13px;font-family:arial,sans-serif">The fix is to reorder your hyam and hybm values. You will also need to reorder your data values in the level dimension:</div><div><p style="font-family:arial,sans-serif;font-size:13px">&nbsp; &nbsp; hyam = filenc-&gt;a(::-1)<br>&nbsp; &nbsp; hybm = filenc-&gt;b(::-1)<br>&nbsp; &nbsp; ec550aer = data(:,::-1,:,:)</p><p style="font-family:arial,sans-serif;font-size:13px">Please also review the documentation for vinth2p which talks about the ordering required for all input variables:</p><p><font face="arial, sans-serif"><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml</a></font><br>
</p><p style="font-family:arial,sans-serif;font-size:13px">--Mary</p><p style="font-family:arial,sans-serif;font-size:13px"><br></p></div></div>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 7, 2014 at 10:51 AM, Sunmin Park <span dir="ltr">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank">mireiyue@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi, Mary<div><br></div><div>I uploaded the data files (start with “ec550aer_aero_NorESM1”) and script (CMIP5_ec,ncl). I checked the&nbsp;<span style="font-size:small">FillValue which is 1e+20 I tried with and without this part but the results showed same.</span></div>
<div><span style="font-size:small"><br></span></div><div><span style="font-size:small">Thank you&nbsp;</span></div><div>Sun-</div><div><div class="h5"><br><div><div>On Aug 7, 2014, at 8:44 AM, Mary Haley &lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>&gt; wrote:</div>
<br><blockquote type="cite"><div dir="ltr"><div class="gmail_default" style="font-size:small">My first thought this looked like a _FillValue issue, but I can't tell simply from the output.</div><div class="gmail_default" style="font-size:small">
<br>
</div><div class="gmail_default" style="font-size:small">Can you provide the data file for this script? You can use our ftp:</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default">
<a href="http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP" target="_blank">http://www.ncl.ucar.edu/report_bug.shtml#HowToFTP</a><br></div><div class="gmail_default"><br></div><div class="gmail_default">Thanks,</div><div class="gmail_default">

<br></div><div class="gmail_default">--Mary</div><div class="gmail_default"><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Aug 6, 2014 at 3:16 PM, Sunmin Park <span dir="ltr">&lt;<a href="mailto:mireiyue@gmail.com" target="_blank">mireiyue@gmail.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Dear NCL users,<br>
<br>
I have a problem to do interpolation using NorESM1 model results. I am using extinction coefficient values and when I read the data from the files, the MIN and MAX values are<br>
"(0) &nbsp; &nbsp;Ambient Aerosol Extinction at 550 nm: min=0 &nbsp; max=0.00242234 “<br>
But after interpolation the values are<br>
"(0) &nbsp; &nbsp;min=-2.58212e+22 &nbsp; max=0.0127834”<br>
<br>
I do not understand why the values are changing and the MIN value shows minus. How can I fix it?<br>
<br>
Thank you for any help!!<br>
<br>
Sun-<br>
<br>
; ==============================================================<br>
; Open the file:<br>
; ==============================================================<br>
&nbsp; fili &nbsp; &nbsp;= "ec550aer_aero_NorESM1-M_historicalExt_r1i1p1_200601-201212.nc"<br>
; &nbsp;fili &nbsp; &nbsp;= "ec550aer_aero_NorESM1-M_historicalExt_"+version(ii)+"<a href="http://i1p1_200601-201212.nc/" target="_blank">i1p1_200601-201212.nc</a>"<br>
&nbsp; varname = "ec550aer"<br>
&nbsp; varname1 = "a"<br>
&nbsp; varname2 = "b"<br>
&nbsp; varname3 = "ps"<br>
&nbsp; varname4 = "p0"<br>
&nbsp; filenc &nbsp; &nbsp; &nbsp; = addfile (diri+fili+".nc", "r") &nbsp; &nbsp; &nbsp;; entire file<br>
; &nbsp;printMinMax(varname,0)<br>
; &nbsp;print(varname1)<br>
; &nbsp;print(varname2)<br>
; &nbsp;print(varname3)<br>
; &nbsp;print(varname4)<br>
; &nbsp;print (filenc)<br>
; &nbsp;return<br>
<br>
&nbsp; data &nbsp; = filenc-&gt;$varname$ &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; (time, ver, lat, lon)<br>
; &nbsp;print (dimsizes(data))<br>
&nbsp; time =filenc-&gt;time<br>
&nbsp; lev =filenc-&gt;lev<br>
&nbsp; lat =filenc-&gt;lat<br>
&nbsp; printMinMax(data,0)<br>
&nbsp; printVarSummary(data)<br>
;return<br>
&nbsp; lon =filenc-&gt;lon<br>
; &nbsp;print(time)<br>
; &nbsp;print(lev)<br>
; &nbsp;print(lat)<br>
; &nbsp;print(lon)<br>
; &nbsp;data@_FillValue=1e+20<br>
; &nbsp;newlev =lev*1000<br>
; &nbsp;print(newlev)<br>
<br>
;return<br>
<br>
;############Converting from hybrid levels to standard pressure levels######################################<br>
hyam = filenc-&gt;a<br>
hybm = filenc-&gt;b<br>
plev0 = (/1000,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10/)<br>
psfc = filenc-&gt;ps<br>
p0=1000.<br>
<br>
;printVarSummary(psfc)<br>
;printVarSummary(hyam)<br>
<br>
ec550aer = data;filenc-&gt;ec550aer &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;; read ec550aer from all files<br>
ec550aerNEW=vinth2p(ec550aer,hyam,hybm,plev0,psfc,1,p0,1,True)<br>
delete(ec550aer)<br>
ec550aer=ec550aerNEW<br>
delete(ec550aerNEW)<br>
printVarSummary(ec550aer)<br>
printMinMax(ec550aer,0)<br>
return<br>
;###################################################################################<br>
<br>
<br>
RESULTS<br>
<br>
(0) &nbsp; &nbsp; Ambient Aerosol Extinction at 550 nm: min=0 &nbsp; max=0.00242234<br>
<br>
Variable: data<br>
Type: float<br>
Total Size: 120766464 bytes<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 30191616 values<br>
Number of Dimensions: 4<br>
Dimensions and sizes: &nbsp; [time | 84] x [lev | 26] x [lat | 96] x [lon | 144]<br>
Coordinates:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time: [15.5..2539.5]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lev: [0.9925560999999998..0.00354463800000001]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lat: [ -90.. &nbsp;90]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lon: [ &nbsp; 0..357.5]<br>
Number Of Attributes: 12<br>
&nbsp; standard_name : &nbsp; &nbsp; &nbsp; volume_extinction_coefficient_in_air_due_to_ambient_aerosol<br>
&nbsp; long_name : &nbsp; Ambient Aerosol Extinction at 550 nm<br>
&nbsp; comment : &nbsp; &nbsp; """ambient"" means ""wetted"". &nbsp;"<br>
&nbsp; units : &nbsp; &nbsp; &nbsp; m-1<br>
&nbsp; original_name : &nbsp; &nbsp; &nbsp; BAK<br>
&nbsp; original_units : &nbsp; &nbsp; &nbsp;1/km<br>
<br>
<br>
Variable: ec550aer<br>
Type: float<br>
Total Size: 78962688 bytes<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 19740672 values<br>
Number of Dimensions: 4<br>
Dimensions and sizes: &nbsp; [time | 84] x [lev_p | 17] x [lat | 96] x [lon | 144]<br>
Coordinates:<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; time: [15.5..2539.5]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lev_p: [1000..10]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lat: [ -90.. &nbsp;90]<br>
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lon: [ &nbsp; 0..357.5]<br>
Number Of Attributes: 1<br>
&nbsp; _FillValue : &nbsp;1e+20<br>
(0) &nbsp; &nbsp; min=-2.58212e+22 &nbsp; max=0.0127834<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br></div>
</blockquote></div><br></div></div></div></blockquote></div><br></div>
</blockquote></div><br></div></body></html>