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