<div dir="ltr"><div class="gmail_default" style="font-size:small">If you don&#39;t need a lambert conformal plot, then I suggest doing a simple lat/lon plot.  Instead of </div><div class="gmail_default" style="font-size:small"><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpProjection                = &quot;LambertConformal&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpLambertParallel1F         = tlat1</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpLambertParallel2F         = tlat2</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpLambertMeridianF          = clon</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpLimitMode                 = &quot;Corners&quot;</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpLeftCornerLatF            = lat2d(20,18)</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpLeftCornerLonF            = lon2d(20,18)</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpRightCornerLatF           = lat2d(58,52)</font></div><div class="gmail_default" style=""><font face="monospace, monospace">  res@mpRightCornerLonF           = lon2d(58,52)</font></div><div class="gmail_default" style=""><font face="monospace, monospace"><br></font></div><div class="gmail_default" style=""><font face="arial, helvetica, sans-serif">I suggest:</font></div><div class="gmail_default" style=""><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default"><font face="monospace, monospace">  res@mpMinLatF                 = min(lat)<br></font></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">  res@mpMaxLatF                 = max(lat)<br></font></div><div><div class="gmail_default"><font face="monospace, monospace">  res@mpMinLonF                 = min(lon)<br></font></div></div><div><div class="gmail_default"><font face="monospace, monospace">  res@mpMaxLonF                 = max(lon)<br></font></div></div><div class="gmail_default"><font face="arial, helvetica, sans-serif"><br></font></div><div class="gmail_default"><font face="arial, helvetica, sans-serif">You can also put in whatever lat/lon values you want for the above four resources, instead of using min/max. Sometimes I like to add a little bit of a margin so I can see the plot better:</font></div><div class="gmail_default"><font face="monospace, monospace"><br></font></div><div><div class="gmail_default"><font face="monospace, monospace">  res@mpMinLatF                 = min(lat)-1<br></font></div><div class="gmail_default"><div class="gmail_default"><font face="monospace, monospace">  res@mpMaxLatF                 = max(lat)+1<br></font></div><div><div class="gmail_default"><font face="monospace, monospace">  res@mpMinLonF                 = min(lon)-1<br></font></div></div><div><div class="gmail_default"><font face="monospace, monospace">  res@mpMaxLonF                 = max(lon)+1</font></div></div></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 8, 2015 at 10:48 AM, Adv <span dir="ltr">&lt;<a href="mailto:advita6@gmail.com" target="_blank">advita6@gmail.com</a>&gt;</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>Hi, <br></div>I have been trying to modify this code <a href="https://www.ncl.ucar.edu/Applications/Scripts/station_1.ncl" target="_blank">https://www.ncl.ucar.edu/Applications/Scripts/station_1.ncl</a>  to plot data set with four states station data. I don&#39;t know how to select values for <br><pre>tlat1 = 60.0
tlat2 = 30.0
clon  = -98.5
clat  =  36.3<br></pre><pre>and also for <br>res@mpLeftCornerLatF            = lat2d(20,18)<br>  res@mpLeftCornerLonF            = lon2d(20,18)<br>  res@mpRightCornerLatF           = lat2d(58,52)<br>  res@mpRightCornerLonF           = lon2d(58,52)<br></pre><pre>I attached here a file i use to plot. <br>begin<br> strll  = asciiread(&quot;stationmac.txt&quot;, -1, &quot;string&quot;) ;<br>  print(strll)   ; STATION&quot;,&quot;STATION_NAME&quot;, &quot;LAT&quot;, &quot;LON&quot;<br>  print(&quot;=====&quot;)<br><br>sloc = str_get_field(strll , 2, &quot;,&quot;)<br>  lat  = tofloat( str_get_field(strll , 3, &quot;,&quot;)  )<br>  lon  = tofloat( str_get_field(strll , 4, &quot;,&quot;)  )<br>  print(sloc +&quot; : &quot;+lat+&quot; &quot;+lon)<br>dimsizes(lat)<br>dimsizes(lon)<br> NOBS  = 65<br>diri=&quot;/home/dailysimms/prec-obs/01/&quot;<br>z1 = asciiread(diri+&quot;PrecJan1965-2014&quot;,-1,&quot;float&quot;)<br>print(z1)<br>printVarSummary(z1)<br>;a = (/1,2,3,4,5,6,7,8/)<br>;391 rows by 50 columns<br>a0 = onedtond(z1,(/391,50/))<br>;print(a0)<br>x=dim_avg(a0)<br>print(x)<br>;<br>; This second file is not so tricky.  The 2D lat/lon data is sorted with<br>; lat values first, and then lon values.<br>;<br>  nlat     = 70<br>  nlon     = 70<br>  latlon2d = asciiread(&quot;stn_latlon.dat&quot;,(/2,nlat,nlon/),&quot;float&quot;)<br>  lat2d    = latlon2d(0,:,:)<br>  lon2d    = latlon2d(1,:,:)<br><br>  delete(latlon2d)<br><br>  tlat1 = 60.0<br>  tlat2 = 30.0<br>  clon  = -98.5<br>  clat  =  36.3<br><br>;***********************************************<br>; Plot<br>;***********************************************<br> pltDir = &quot;./&quot;<br>;  wks = gsn_open_wks(&quot;x11&quot;,pltDir+pltNam)<br>    wks = gsn_open_wks(&quot;x11&quot;,&quot;god&quot;)<br> gsn_define_colormap(wks,&quot;WhViBlGrYeOrRe&quot;)<br><br>  res                             = True<br>  res@gsnFrame                    = False   ; So we can draw markers<br>  res@gsnMaximize                 = True<br><br>res@gsnSpreadColors             = True<br>  res@gsnSpreadColorEnd           = 90<br><br>res@trGridType                  = &quot;TriangularMesh&quot;<br><br>res@cnLevelSelectionMode        = &quot;ManualLevels&quot;<br>  res@cnMinLevelValF              = 15          ; 15.25<br>  res@cnMaxLevelValF              = 20          ; 49.75<br>  res@cnLevelSpacingF             = 0.125<br><br>res@cnFillOn                    = True<br>  res@cnLinesOn                   = False<br>res@cnLineLabelsOn              = True<br>  res@cnLevelFlags                = new(139,&quot;string&quot;)<br>  res@cnLevelFlags(:)             = &quot;NoLine&quot;<br>    res@cnLevelFlags(0::20)         = &quot;LineAndLabel&quot;<br><br>res@lbLabelAutoStride           = True<br>  res@lbBoxLinesOn                = False<br>  res@tiMainString                = &quot;XX&quot;<br><br>res@sfXArray                    = lon<br>  res@sfYArray                    = lat<br><br>res@mpProjection                = &quot;LambertConformal&quot;<br>  res@mpLambertParallel1F         = tlat1<br>  res@mpLambertParallel2F         = tlat2<br>  res@mpLambertMeridianF          = clon<br><br>res@mpLimitMode                 = &quot;Corners&quot;<br>  res@mpLeftCornerLatF            = lat2d(20,18)<br>  res@mpLeftCornerLonF            = lon2d(20,18)<br>  res@mpRightCornerLatF           = lat2d(58,52)<br>  res@mpRightCornerLonF           = lon2d(58,52)<br><br>  res@mpFillOn                    = False<br>  res@mpOutlineDrawOrder          = &quot;PostDraw&quot;<br>    res@mpFillDrawOrder             = &quot;PreDraw&quot;<br>;  res@mpOutlineBoundarySets       = &quot;GeophysicalAndUSStates&quot;<br>res@mpOutlineBoundarySets= &quot;USStates&quot;<br>;  res@mpUSStateLineColor          = &quot;Gray10&quot;<br>;  res@mpUSStateLineDashPattern    = 2<br><br>  res@pmTickMarkDisplayMode       = &quot;Always&quot;<br>  map = gsn_csm_contour_map(wks,x,res)<br><br><br>  frame(wks)<br>end<br>                              <br></pre><pre>I would appreciate any help and suggestion to understand and fix this issue. <br><br></pre><pre>Thank you,<br></pre><pre>Adv <br></pre><pre><br></pre></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>