<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;">I check and both data lon is <div><br></div><div><div>Variable: CAL</div><div>Type: float</div><div>Total Size: 24480 bytes</div><div> 6120 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[lat | 85] x [lon | 72]</div><div>Coordinates:</div><div> lat: [-85..85]</div><div> <b> lon: [-180..180]</b></div><div>Number Of Attributes: 1</div><div> _FillValue :<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>ExtinctionCAL: min=0 max=0.00150543</div><div><br></div><div>Variable: CAM</div><div>Type: float</div><div>Total Size: 24480 bytes</div><div> 6120 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[LAT | 85] x [LON | 72]</div><div>Coordinates:</div><div> LAT: [-85..85]</div><div> <b>LON: [-180..180]</b></div><div>Number Of Attributes: 1</div><div> _FillValue :<span class="Apple-tab-span" style="white-space:pre">        </span>1e+20</div><div>(0)<span class="Apple-tab-span" style="white-space:pre">        </span>ExtinctionCAM: min=0.000113507 max=0.00374775</div></div><div><br></div><div>and i printed out the values in west it shows missing values -9999</div><div><div>Variable: CALCAM (subsection)</div><div>Type: float</div><div>Total Size: 168 bytes</div><div> 42 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="Apple-tab-span" style="white-space:pre">        </span>[lat | 6] x [lon | 7]</div><div>Coordinates:</div><div> lat: [-4.047619..6.071429]</div><div> lon: [-80..-50]</div><div>Number Of Attributes: 1</div><div> _FillValue :<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,0)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,1)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,2)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,3)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,4)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,5)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(0,6)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,0)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,1)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,2)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,3)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,4)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,5)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(1,6)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,0)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,1)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,2)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,3)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,4)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,5)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div>(2,6)<span class="Apple-tab-span" style="white-space:pre">        </span>-9999</div><div><br></div></div><div>I think the values changed somehow to missing values.</div><div><br></div><div>Sun-</div><div><br></div><div><br><div><div>On Jan 28, 2015, at 9:59 AM, Alan Brammer <<a href="mailto:abrammer@albany.edu">abrammer@albany.edu</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr"><span style="font-size:12.8000001907349px">lon = fspan(-180,180,72)</span><br><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">You're lon definition here is creating a cyclic in the longitude coordinate. Are the first and last longitude of your data the same or is this a mistake. The combination of this and then res@gsnAddCyclic = True is trying to do the same thing twice and NCL isn't coping. </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">I'm presuming it is a mistake as a 5.18 degree dataset would be weird. </span></div><div><span style="font-size:12.8000001907349px">When creating arrays try printing them once to check it is what you expected. </span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">It **may** be more likely to have instead have this line</span></div><div><span style="font-size:12.8000001907349px">lon = fspan(-180,175,72)</span><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px"><br></span></div><div><span style="font-size:12.8000001907349px">You would have to consult the data docs to know if this is correct. (or plot it and see). </span></div><div><br></div><div><br></div><div>~Alan </div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 28, 2015 at 12:36 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear NCL users<br>
<br>
I have problem to create plot (attached). I am trying to subtract one data to the other one.<br>
Data, I am reading, have values all over the world.<br>
<br>
I appreciate any comments and helps.<br>
Thank you in advance<br>
Sun-<br>
===========<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"<br>
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
<br>
begin<br>
<br>
f = addfile("/Users/spark/vertical/output/D_CAL_UT.nc/","r")<br>
CAL = f->extGmean<br>
CAL@_FillValue = getFillValue(CAL)<br>
<br>
print("ExtinctionCAL: min="+min(CAL)+" max="+max(CAL))<br>
<br>
f1 = addfile("/Users/spark/vertical/output/D_CAM_UT.nc/","r")<br>
CAM = f1->extGmean<br>
CAM@_FillValue = getFillValue(CAM)<br>
print("ExtinctionCAM: min="+min(CAM)+" max="+max(CAM))<br>
<br>
<br>
CALCAM = CAL-CAM<br>
CALCAM!0 ="lat"<br>
CALCAM!1 = "lon"<br>
lat = fspan(-85,85,85)<br>
lon = fspan(-180,180,72)<br>
<br>
lat@longname = "latitude"<br>
lat@units = "degrees_north"<br>
lon@longname ="longitude"<br>
lon@units = "degrees_east"<br>
<br>
CALCAM&lat = lat<br>
CALCAM&lon = lon<br>
<br>
print("Extinction: min="+min(CALCAM)+" max="+max(CALCAM))<br>
print(CALCAM(40:45,20:26))<br>
printVarSummary(CALCAM)<br>
<br>
wks = gsn_open_wks("ps","CALIPSO-CAM_UT") ; open a ps file<br>
gsn_define_colormap(wks,"gui_default") ; choose colormap<br>
<br>
res = True ; plot mods desired<br>
res@cnFillOn = True ; turn on color<br>
res@gsnSpreadColors = True ; use full color map<br>
res@cnLinesOn = False ; no contour lines<br>
res@cnLineLabelsOn = False ; no line labels<br>
<br>
res@mpMaxLatF = 85 ; choose map range<br>
res@mpMinLatF = -85<br>
<br>
res@gsnDraw = False ; don't draw yet<br>
res@gsnFrame = False ; don't advance frame yet<br>
<br>
res@gsnAddCyclic = True<br>
<br>
; res@cnLevelSelectionMode = "ManualLevels"<br>
res@cnLevelSelectionMode = "AutomaticLevels" ; AutomaticLevels<br>
; res@cnMinLevelValF = 0 ; min level<br>
; res@cnMaxLevelValF = 0.00007 ; max level<br>
; res@cnLevelSpacingF = 0.000005 ; interval<br>
<br>
res@tmXBLabelFontHeightF = 0.014 ; adjust some font heights<br>
res@tmYLLabelFontHeightF = 0.014<br>
res@tiMainFontHeightF = 0.022<br>
res@txFontHeightF = 0.017<br>
<br>
res@lbLabelBarOn = False ; turn off label bar<br>
;************************************************<br>
; create plots<br>
;************************************************<br>
plot = new(1,graphic)<br>
<br>
res@tiMainString = "CALIPSO-CAM_UT"<br>
plot(0) = gsn_csm_contour_map_ce(wks,CALCAM,res) ; create the plot<br>
<br>
;************************************************<br>
; create panel<br>
;************************************************<br>
pres = True<br>
pres@gsnPanelLabelBar = True ; common label bar<br>
gsn_panel(wks,plot,(/1,1/),pres)<br>
<br>
delete(wks)<br>
<br>
end<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>
<br></blockquote></div><br></div>
</blockquote></div><br></div></body></html>