<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none"><!--P{margin-top:0;margin-bottom:0;} .ms-cui-menu {background-color:#ffffff;border:1px rgb(171, 171, 171) solid;font-family:'Segoe UI WPC', 'Segoe UI', Tahoma, 'Microsoft Sans Serif', Verdana, sans-serif;font-size:11pt;color:rgb(51, 51, 51);} .ms-cui-menusection-title {display:none;} .ms-cui-ctl {vertical-align:text-top;text-decoration:none;color:rgb(51, 51, 51);} .ms-cui-ctl-on {background-color:rgb(223, 237, 250);opacity: 0.8;} .ms-cui-img-cont-float {display:inline-block;margin-top:2px} .ms-cui-smenu-inner {padding-top:0px;} .ms-owa-paste-option-icon {margin: 2px 4px 0px 4px;vertical-align:sub;padding-bottom: 2px;display:inline-block;} .ms-rtePasteFlyout-option:hover {background-color:rgb(223, 237, 250) !important;opacity:1 !important;} .ms-rtePasteFlyout-option {padding:8px 4px 8px 4px;outline:none;} .ms-cui-menusection {float:left; width:85px;height:24px;overflow:hidden}--></style>
</head>
<body>
<div style="font-size:12pt;color:#000000;background-color:#FFFFFF;font-family:Calibri,Arial,Helvetica,sans-serif;">
<p>I am trying to smooth the surface temperature&nbsp;contours on a cylindrical equidistant map of the CESM RCP 8.5 simulation for July 2020. I don't understand the documentation on the NCL webpage for the function smth9&nbsp;<a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/smth9.shtml.">http://www.ncl.ucar.edu/Document/Functions/Built-in/smth9.shtml.</a>
 It looks like I will need to use Example 2:<br>
</p>
<p style="margin: 10px 0px 20px; padding: 0px; color: #333333; font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;">
Define g(ntim, nlvl, nlat, mlon) where ntim = 50, nlvl = 30, nlat = 64, mlon = 128.</p>
<p style="margin: 10px 0px 20px; padding: 0px; color: #333333; font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;">
The rightmost dimension is to be treated as &quot;cyclic&quot;. The user should&nbsp;<em>not</em>&nbsp;add a cyclic point for the rightmost dimension; it is accounted for internally. All times and levels will be smoothed and returned in a new array<em>gsmth</em>.</p>
<p style="margin: 10px 0px 20px; padding: 0px; color: #333333; font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;">
Note:&nbsp;<em>gsmth</em>&nbsp;will not have any of the attributes or coordinate information of the input&nbsp;<em>g</em>. Note: gsmth will not have any of the attributes or coordinate information of the input g. If this is desired, use the&nbsp;<a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/smth9_Wrap.shtml" style="margin: 0px; padding: 0px; text-decoration: none; color: #852d85;"><strong style="margin: 0px; padding: 0px;">smth9_Wrap</strong></a>function
 instead.</p>
<pre style="margin-top: 0px; margin-bottom: 0px; padding: 0px; font-size: 13px; line-height: 16px; font-family: courier; border-style: solid; border-width: 0px 0px 15px; border-color: transparent; background-color: #ffffff;">  gsmth = <strong style="margin: 0px; padding: 0px;">smth9</strong>(g, 0.50,  0.25, True) ; heavy local smoothing


I am not sure what the parameters of g represent (<span style="color: #333333; font-family: verdana, sans-serif; font-size: 13px; line-height: 16px; background-color: #ffffff;">ntim, nlvl, nlat, mlon</span>), and I'm not sure what a cyclic point is. 

This is the code for my map, and I realize that the smoothing code is wrong. I just don't know what values to use.

<div>; RCP 8.5 Surface Temperature Plot for year 2020</div><div>; July Monthly Average</div><div>; Cylindrical Equidistant Map</div><div><br></div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;</div><div>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;</div><div><span class="Apple-tab-span" style="white-space: pre;">        </span></div><div>begin</div><div><br></div><div>&nbsp;fname = addfile (&quot;b40.rcp8_5.1deg.007.cam2.h0.2020-07.nc&quot;, &quot;r&quot;)<span class="Apple-tab-span" style="white-space: pre;">        </span>; read in file from path&nbsp;</div><div>&nbsp; st = fname -&gt;TS</div><div><br></div><div>&nbsp; wks = gsn_open_wks(&quot;ps&quot;,&quot;RCP8.5_ST_2020_Map&quot;)</div><div><br></div><div>&nbsp; gsn_define_colormap(wks,&quot;BlAqGrYeOrRe&quot;) &nbsp; &nbsp; &nbsp; &nbsp;; choose colormap</div><div><br></div><div>&nbsp; res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True &nbsp; &nbsp; ; plot mods desired</div><div>&nbsp;&nbsp;</div><div>&nbsp; res@mpFillOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span>= False &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">                </span> &nbsp; &nbsp; &nbsp; &nbsp;; turn off gray fill</div><div>&nbsp; res@mpOutlineBoundarySets &nbsp; &nbsp; = &quot;geophysicalandusstates&quot;<span class="Apple-tab-span" style="white-space: pre;">        </span>; turn on countries and US states</div><div>&nbsp; &nbsp;&nbsp;</div><div>&nbsp; res@cnFillOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">        </span> &nbsp;= True &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space: pre;">                        </span>; turn on color fill</div><div>&nbsp; res@cnLinesOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span class="Apple-tab-span" style="white-space: pre;">        </span> &nbsp;= False &nbsp; <span class="Apple-tab-span" style="white-space: pre;">                        </span>; turn off contour lines</div><div>&nbsp; res@cnLevelSelectionMode &nbsp; &nbsp; &nbsp; &nbsp;= &quot;ManualLevels&quot;<span class="Apple-tab-span" style="white-space: pre;">                </span>; set label bar manually</div><div>&nbsp; res@cnMinLevelValF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 290 <span class="Apple-tab-span" style="white-space: pre;">                                </span>; sets min temp on label bar &nbsp; &nbsp;&nbsp;</div><div>&nbsp; res@cnMaxLevelValF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= 310<span class="Apple-tab-span" style="white-space: pre;">                                        </span>; sets max temp on label bar</div><div>&nbsp; res@cnLevelSpacingF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 0.5<span class="Apple-tab-span" style="white-space: pre;">                                </span> &nbsp; &nbsp;; label bar interval</div><div>&nbsp; res@lbLabelStride <span class="Apple-tab-span" style="white-space: pre;">                        </span> &nbsp;= 10</div><div>&nbsp; res@lbBoxLinesOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True<span class="Apple-tab-span" style="white-space: pre;">                                </span>; draw outline around individual colors</div><div>&nbsp; res@gsnSpreadColors<span class="Apple-tab-span" style="white-space: pre;">                        </span> &nbsp;= True<span class="Apple-tab-span" style="white-space: pre;">                                </span>; use full range of colormap</div><div><br></div><div>&nbsp; res@pmTickMarkDisplayMode = &quot;Always&quot;; use NCL default lat/lon labels</div><div><br></div><div>&nbsp; res@gsnAddCyclic &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False &nbsp; &nbsp;; data already has cyclic point</div><div><span class="Apple-tab-span" style="white-space: pre;">                                </span> &nbsp; &nbsp; &nbsp;<span class="Apple-tab-span" style="white-space: pre;">                                </span> &nbsp; ; this must also be set for any zoom</div><div><br></div><div>; note that the gsn_csm_*map_ce templates automatically set&nbsp;</div><div>; res@mpLimitMode=&quot;LatLon&quot; for you. If you are plotting a different projection,</div><div>; you may have to set this resource.</div><div><br></div><div>&nbsp; res@mpMinLatF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;20 &nbsp; &nbsp; ; range to zoom in on</div><div>&nbsp; res@mpMaxLatF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;40</div><div>&nbsp; res@mpMinLonF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;250</div><div>&nbsp; res@mpMaxLonF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;270</div><div>&nbsp; res@mpCenterLonF <span class="Apple-tab-span" style="white-space: pre;">                </span> &nbsp; = &nbsp;260</div><div>&nbsp;&nbsp;</div><div>&nbsp; g(ntim, nlvl, nlat, mlon)</div><div>&nbsp; gsmth = smth9(g, 0.50, &nbsp;0.25, True) ; heavy local smoothing</div><div><br></div><div>&nbsp; plot = gsn_csm_contour_map_ce(wks,st(0,{15:45},{250:270}), res)</div><div><br></div><div>end&nbsp;</div><div><br></div><div><br></div><div>-Brandi<br>&#8203;<br></div><br></pre>
<p><br>
</p>
</div>
</body>
</html>