<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>