<div dir="ltr">[1]<br>The 'golen-rule' od data processing is look at your data.<br>Did you look at the variable?<br><br><div style="font-size:14px">file = "<a href="http://dox_mean_2010_05x05.nc/" target="_blank">dox_mean_2010_05x05.nc</a>"</div><div style="font-size:14px">a = addfile(file,"r")<br></div><div style="font-size:14px">dox = a->ozone ;720x360x24<br><br>do i=0,2 ; 23<div> printMinMax(dox(:,:,i), 0)</div><div>end do</div><br></div><div style="font-size:14px">Maybe the values are all _FillValue.<br><br>[2]<br></div><div style="font-size:14px">Please read the NCL documenttion. Upon import ...<br><br><div style="font-size:14px">a = addfile(file,"r")<br></div>dox = a->ozone <br></div><div style="font-size:14px">printVarSummary(dox)<br><br></div><div style="font-size:14px">As you can see ... all the appropriate meta data is automatically associated with the variable. As a result, none of this is necessary:<br><br>at_pts = a->lat(:)<div style="font-size:14px">lon_pts = a->lon(:)<br></div><div style="font-size:14px"><br></div><div style="font-size:14px">;======================================</div><div style="font-size:14px">dox!0="lat"</div><div style="font-size:14px">dox!1="lon" </div><div style="font-size:14px">dox&lat = lat_pts</div><div style="font-size:14px">dox&lon = lon_pts </div><div style="font-size:14px">dox&lat@units="degrees_north" </div><div style="font-size:14px">dox&lon@units="degrees_east"</div><br><br>[3] <br>dox = a->ozone<br><br></div><div style="font-size:14px">is more efficient than <br><br>dox = a->ozone(:,:,:)<br></div><div style="font-size:14px"><br></div><div style="font-size:14px"><br></div><div style="font-size:14px"><br></div><div style="font-size:14px"><br><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Jun 16, 2016 at 9:25 AM, Ciao Kai Liang <span dir="ltr"><<a href="mailto:ciaokailiang@gmail.com" target="_blank">ciaokailiang@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 dir="ltr"><div><span style="font-size:14px">Hi </span><div style="font-size:14px"><br></div><div style="font-size:14px">I have a metric dox(720,360,24). It is 24 different ozone concentration across globe. I try to use gsn_panel to plot them at one single sheet but I don't know why my first three plot (see attached) couldn't show properly and the below message pops out. </div><div style="font-size:14px"><br></div><div style="font-size:14px">warning:ContourPlotInitialize: no valid values in scalar field; ContourPlot not possible:[errno=1101]<br></div><div style="font-size:14px"><br></div><div style="font-size:14px">;dox====================================</div><div style="font-size:14px">below is dox for details</div><div style="font-size:14px"><div>Variable: dox</div><div>Type: float</div><div>Total Size: 24883200 bytes</div><div> 6220800 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes: [lat | 360] x [lon | 720] x [24]</div><div>Coordinates:</div><div> lat: [-89.75..89.75]</div><div> lon: [-179.75..179.75]</div><div>Number Of Attributes: 1</div><div> _FillValue : 9.96921e+36</div></div><div style="font-size:14px"><br></div><div style="font-size:14px"><br></div><div style="font-size:14px">;source code============================</div><div style="font-size:14px">file = "<a href="http://dox_mean_2010_05x05.nc/" target="_blank">dox_mean_2010_05x05.nc</a>"</div><div style="font-size:14px">a = addfile(file,"r")<br></div><div style="font-size:14px">lat_pts = a->lat(:)</div><div style="font-size:14px">lon_pts = a->lon(:)<br></div><div style="font-size:14px">dox = a->ozone(:,:,:) ;720x360x24<br></div><div style="font-size:14px">;======================================</div><div style="font-size:14px">dox!0="lat"</div><div style="font-size:14px">dox!1="lon" </div><div style="font-size:14px">dox&lat = lat_pts</div><div style="font-size:14px">dox&lon = lon_pts </div><div style="font-size:14px">dox&lat@units="degrees_north" </div><div style="font-size:14px">dox&lon@units="degrees_east"</div><div style="font-size:14px">;=====================================</div><div style="font-size:14px"><div>plots = new(24,graphic)</div><div>wks_type = "pdf"</div><div>wks_name = "htap2_dox_panel"</div><div>wks_type@wkPaperSize = "A4"</div><div>wks = gsn_open_wks(wks_type,wks_name) ; send graphics to PDF file</div><div><br></div><div> res = True</div><div> res@gsnMaximize = True ;If set to True, plot will be maximized</div><div> res@gsnDraw = False ; don't draw</div><div> res@gsnFrame = False ; don't advance frame</div><div><br></div><div> res@cnLevelSelectionMode = "ManualLevels" ; set manual contour levels</div><div> res@cnMinLevelValF = -5. ; set min contour level</div><div> res@cnMaxLevelValF = 5. ; set max contour level</div></div><div style="font-size:14px"><br></div><div style="font-size:14px"><div>res@cnFillOn = True</div><div> res@cnLinesOn = False</div><div> res@cnLineLabelsOn = False</div><div> res@lbLabelBarOn = False</div><div> res@cnFillPalette = "BlWhRe" ; Blue-Red colormap</div><div> res@gsnRightString = "ppb" ; "~" is txFuncCode</div></div><div style="font-size:14px"><br></div><div style="font-size:14px"><div>do i=0,23</div><div> plots(i) = gsn_csm_contour_map_ce(wks,dox(:,:,i),res)</div><div> end do</div><div><br></div><div>pnlres = True</div><div>pnlres@txString = ""</div><div>pnlres@gsnPanelLabelBar = True</div><div>pnlres@lbLabelAutoStride = True</div><div><br></div><div> gsn_panel(wks,plots,(/6,4/),pnlres)</div><div><br></div><div>end</div></div><div style="font-size:14px"><br></div><div style="font-size:14px"><br></div><div style="font-size:14px"><div>Joe</div><div data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div>University of North Carolina, Gillings School of Global Public Health<br>170 Rosenau Hall, CB #7400 | 135 Dauer Drive | Chapel Hill, NC 27599-7400</div></div></div></div></div>
</div>
<br>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>