<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 <<a href="mailto:haley@ucar.edu">haley@ucar.edu</a>> 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] p(k) = A(k)*PO + B(k)*PS </div><div style="font-size:13px;font-family:arial,sans-serif"> k=level, A(k)=>hyam=>pressure coord; B(k)=>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"> 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"> 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"> 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"> A sample hybm => sigma looks like the following.</div><div style="font-size:13px;font-family:arial,sans-serif"> 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"> 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> hybm = 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0196774136275053, </p><p> 0.062504293397069, 0.112887907773256, 0.172161616384983, </p><p> 0.241894043982029, 0.323930636048317, 0.420442461967468, </p><p> 0.524799540638924, 0.624887734651566, 0.713207691907883, </p><p> 0.783669710159302, 0.831102818250656, 0.864811271429062, </p><p> 0.896237164735794, 0.92512384057045, 0.951230525970459, </p><div> 0.974335998296738, 0.992556095123291 ; </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"> hyam = filenc->a(::-1)<br> hybm = filenc->b(::-1)<br> 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"><<a href="mailto:mireiyue@gmail.com" target="_blank">mireiyue@gmail.com</a>></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 <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 </span></div><div>Sun-</div><div><div class="h5"><br><div><div>On Aug 7, 2014, at 8:44 AM, Mary Haley <<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</a>> 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"><<a href="mailto:mireiyue@gmail.com" target="_blank">mireiyue@gmail.com</a>></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) Ambient Aerosol Extinction at 550 nm: min=0 max=0.00242234 “<br>
But after interpolation the values are<br>
"(0) min=-2.58212e+22 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>
fili = "ec550aer_aero_NorESM1-M_historicalExt_r1i1p1_200601-201212.nc"<br>
; fili = "ec550aer_aero_NorESM1-M_historicalExt_"+version(ii)+"<a href="http://i1p1_200601-201212.nc/" target="_blank">i1p1_200601-201212.nc</a>"<br>
varname = "ec550aer"<br>
varname1 = "a"<br>
varname2 = "b"<br>
varname3 = "ps"<br>
varname4 = "p0"<br>
filenc = addfile (diri+fili+".nc", "r") ; entire file<br>
; printMinMax(varname,0)<br>
; print(varname1)<br>
; print(varname2)<br>
; print(varname3)<br>
; print(varname4)<br>
; print (filenc)<br>
; return<br>
<br>
data = filenc->$varname$ ; (time, ver, lat, lon)<br>
; print (dimsizes(data))<br>
time =filenc->time<br>
lev =filenc->lev<br>
lat =filenc->lat<br>
printMinMax(data,0)<br>
printVarSummary(data)<br>
;return<br>
lon =filenc->lon<br>
; print(time)<br>
; print(lev)<br>
; print(lat)<br>
; print(lon)<br>
; data@_FillValue=1e+20<br>
; newlev =lev*1000<br>
; print(newlev)<br>
<br>
;return<br>
<br>
;############Converting from hybrid levels to standard pressure levels######################################<br>
hyam = filenc->a<br>
hybm = filenc->b<br>
plev0 = (/1000,925,850,700,600,500,400,300,250,200,150,100,70,50,30,20,10/)<br>
psfc = filenc->ps<br>
p0=1000.<br>
<br>
;printVarSummary(psfc)<br>
;printVarSummary(hyam)<br>
<br>
ec550aer = data;filenc->ec550aer ; 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) Ambient Aerosol Extinction at 550 nm: min=0 max=0.00242234<br>
<br>
Variable: data<br>
Type: float<br>
Total Size: 120766464 bytes<br>
30191616 values<br>
Number of Dimensions: 4<br>
Dimensions and sizes: [time | 84] x [lev | 26] x [lat | 96] x [lon | 144]<br>
Coordinates:<br>
time: [15.5..2539.5]<br>
lev: [0.9925560999999998..0.00354463800000001]<br>
lat: [ -90.. 90]<br>
lon: [ 0..357.5]<br>
Number Of Attributes: 12<br>
standard_name : volume_extinction_coefficient_in_air_due_to_ambient_aerosol<br>
long_name : Ambient Aerosol Extinction at 550 nm<br>
comment : """ambient"" means ""wetted"". "<br>
units : m-1<br>
original_name : BAK<br>
original_units : 1/km<br>
<br>
<br>
Variable: ec550aer<br>
Type: float<br>
Total Size: 78962688 bytes<br>
19740672 values<br>
Number of Dimensions: 4<br>
Dimensions and sizes: [time | 84] x [lev_p | 17] x [lat | 96] x [lon | 144]<br>
Coordinates:<br>
time: [15.5..2539.5]<br>
lev_p: [1000..10]<br>
lat: [ -90.. 90]<br>
lon: [ 0..357.5]<br>
Number Of Attributes: 1<br>
_FillValue : 1e+20<br>
(0) min=-2.58212e+22 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>