<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class=""></div><div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Aug 19, 2016, at 10:26 AM, Mary Haley <<a href="mailto:haley@ucar.edu" class="">haley@ucar.edu</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class="gmail_default" style="font-size:small">Hi Mark,</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">That is a little odd. You did good work debugging the problem, so missing values and nans are ruled out.</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">To further debug this, can you try plotting a very basic contour plot, without the pressure /height axes, and without any coordinate information and send the image:</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px" class=""> plot = gsn_contour (wks,uwind,res) </span><br style="font-size:12.8px" class=""></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px" class=""><br class=""></span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px" class="">The gsn_contour script ignores any coordinate arrays, which I want to make sure are not the source of the problem.</span></div><div class="gmail_default" style="font-size:small"><span style="font-size:12.8px" class=""><br class=""></span></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small"><br class=""></div><div class="gmail_default" style="font-size:small"><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Fri, Aug 19, 2016 at 10:07 AM, Mark Branson <span dir="ltr" class=""><<a href="mailto:mark@atmos.colostate.edu" target="_blank" class="">mark@atmos.colostate.edu</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Hello.<br class=""><br class="">I'm running ncl v6.2.1 and here is what I'm doing in the attached script:<br class=""><br class="">1) read in a long time series of zonal wind and surface pressure data from CAM output.<br class="">2) interpolate them to constant pressure levels using vinth2p.<br class="">3) compute long-term monthly means with clmMonTLLL.<br class="">4) compute the annual mean of the monthly means.<br class="">5) subtract off the annual mean from the monthly means.<br class="">6) select one latitude (the equator), and then take the mean of all longitudes.<br class="">6) make a color-filled height versus time cross section plot.<br class=""><br class="">I get the plot (see attached), but some of the contours near the top are white. I thought maybe it was because there were some missing or bogus values, so I inserted a check for those with the ismissing and isnan_ieee functions and it seems the data is fine.<br class=""><br class="">Any ideas?<br class=""><br class="">Thanks,<br class="">Mark Branson<br class=""><br class=""><br class="">begin<br class=""> a = addfile("/pool/mark/spcam_<wbr class="">nlev51/<a href="http://spcam_nlev51.cam.h0.0003-01.nc/" target="_blank" class="">spcam_nlev51.cam.h0.<wbr class="">0003-01.nc</a>","r")<br class=""> hyam = a->hyam<br class=""> hybm = a->hybm<br class=""><br class=""> b = addfile("/pool/mark/spcam_<wbr class="">nlev51/<a href="http://uandps.nc/" target="_blank" class="">uandps.nc</a>","r")<br class=""> u = b->U ;u = [time | 338] x [lev | 53] x [lat | 96] x [lon | 144]<br class=""> ps = b->PS ;ps = [time | 338] x [lat | 96] x [lon | 144]<br class=""> u@_FillValue = default_fillvalue("float")<br class=""><br class=""> if (any(ismissing(u))) then<br class=""> print("### original u array contains some missing data ###")<br class=""> end if<br class=""><br class="">; interpolation variables<br class=""> plvlM = (/ 30.,50.,70.,100.,150.,200.,<wbr class="">250.,300.,350.,400.,450.,500.,<wbr class="">550., \<br class=""> 600.,650.,700.,750.<wbr class="">,800.,850./)<br class=""> plvlM@units = "mb"<br class=""> nplvlM = dimsizes(plvlM)<br class=""><br class=""> p0 = 1000. ; mb required by vinth2p<br class=""> interp = 2 ; log interpolation<br class=""> extrap = False ; no extrapolation past psfc.<br class=""><br class=""> tmp = vinth2p(u,hyam,hybm,plvlM,ps,<wbr class="">interp,p0,1,extrap)<br class=""> if (typeof(tmp).eq."double") then<br class=""> uwind1 = dble2flt(tmp)<br class=""> else<br class=""> uwind1 = tmp<br class=""> end if<br class=""><br class="">; compute long-term monthly means<br class=""> uclm = clmMonTLLL(uwind1) ;uclm = [month | 12] x [lev_p | 33] x [lat | 96] x [lon | 144]<br class=""><br class="">; annual mean of monthly means<br class=""> uann = dim_avg_n_Wrap(uclm,0) ;uann = [lev_p | 33] x [lat | 96] x [lon | 144]<br class=""><br class="">; subtract off annual mean from monthly means<br class=""> do i = 0,11<br class=""> uclm(i,:,:,:) = (/ uclm(i,:,:,:) - uann(:,:,:) /)<br class=""> end do<br class=""><br class=""> uwind2 = uclm(:,:,47,:) ; select the equator for the latitude<br class=""> uwind3 = dim_avg_Wrap(uwind2) ; mean of all longitudes<br class=""> uwind = uwind3(lev_p|:,month|:) ; swap the array dimensions: month,level --> level,month<br class=""><br class=""> printMinMax(uwind,False)<br class=""><br class=""> if (any(ismissing(uwind))) then<br class=""> print("### uwind array contains some missing data ###")<br class=""> end if<br class=""> if (any(isnan_ieee(uwind))) then<br class=""> print("### uwind array contains some NaNs ###")<br class=""> end if<br class=""><br class=""> uwind@long_name = "SP-CAM, 51 levels, Monthly Means"<br class=""><br class=""> wks = gsn_open_wks ("eps", "test1") ; send graphics to EPS file<br class=""> gsn_define_colormap(wks,"<wbr class="">BlRe")<br class=""><br class=""> res = True <br class=""> res@cnFillOn = True <br class=""> res@cnLinesOn = True <br class=""> res@lbLabelBarOn = True <br class=""> res@cnInfoLabelOn = False<br class=""><br class="">; change labels for monthly mean plot<br class=""> res@tmXBMode = "Explicit"<br class=""> res@tmXBLabelFontHeightF = 0.015<br class=""> res@tmXBLabels=(/"Jan","Feb",<wbr class="">"Mar","Apr","May","Jun","Jul",<wbr class="">"Aug","Sep", \<br class=""> "Oct","Nov",<wbr class="">"Dec","Jan"/)<br class=""> res@tmXBValues = ispan(0,12,1)<br class=""><br class=""> plot = gsn_csm_pres_hgt (wks,uwind,res) <br class="">end<br class=""><br class="">** OUTPUT FROM THE SCRIPT **<br class=""><br class="">/Users/mark/mmf/SPCAM5/<wbr class="">stratosphere_gwdrag/spcam_<wbr class="">nlev51> ncl hvstime.ncl<br class="">Copyright (C) 1995-2014 - All Rights Reserved<br class="">University Corporation for Atmospheric Research<br class="">NCAR Command Language Version 6.2.1<br class="">The use of this software is governed by a License Agreement.<br class="">See <a href="http://www.ncl.ucar.edu/" target="_blank" class="">http://www.ncl.ucar.edu/</a> <wbr class="">for more details.<br class="">(0)<span style="white-space:pre-wrap" class="">        </span>min=-9.835 max=6.77056<br class=""><br class=""></div><br class=""><div style="word-wrap:break-word" class=""></div><br class="">______________________________<wbr class="">_________________<br class="">
ncl-talk mailing list<br class="">
<a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">
List instructions, subscriber options, unsubscribe:<br class="">
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank" class="">http://mailman.ucar.edu/<wbr class="">mailman/listinfo/ncl-talk</a><br class="">
<br class=""></blockquote></div><br class=""></div>
_______________________________________________<br class="">ncl-talk mailing list<br class=""><a href="mailto:ncl-talk@ucar.edu" class="">ncl-talk@ucar.edu</a><br class="">List instructions, subscriber options, unsubscribe:<br class="">http://mailman.ucar.edu/mailman/listinfo/ncl-talk<br class=""></div></blockquote></div><br class=""></div></body></html>