<div dir="ltr"><div class="gmail_default" style="font-size:small">If you don&#39;t know the map projection, I suggest using the default cylindrical equidistant projection (also know as a lat/lon projection). You don&#39;t need to set mpProjection for this.</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Then, I suggest using the &quot;LatLon&quot; limit mode instead of &quot;Corners&quot; (also the default, so no need to set mpLimitMode), and then set these four resources:</div>
<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small"><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">res@mpMinLatF      = min(lat2d)</div>
<div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><div>res@mpMaxLatF      = max(lat2d)</div><div><div>res@mpMinLonF      = min(lon2d)</div><div>res@mpMaxLonF      = max(lon2d)</div></div></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">
<br></div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px">--Mary</div><div style="font-family:arial,sans-serif;font-size:12.800000190734863px"><br></div></div></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Tue, Aug 12, 2014 at 12:23 PM, Erik Noble <span dir="ltr">&lt;<a href="mailto:erik.u.noble@gmail.com" target="_blank">erik.u.noble@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 class="gmail_default" style="font-family:georgia,serif;font-size:small;color:rgb(0,0,0)"><div class="gmail_default">Dear NCL, </div><div class="gmail_default">How can I plot a model variable on a grid without knowing the native grid&#39;s particular map projection? I would like to see an image similar to what &quot;ncview&quot; does when I look at the file (image attached). NCVIEW seems to just know what to plot.</div>

<div class="gmail_default">Although I am able to extract the variable, I can&#39;t seem to plot it correctly at all. How do I show a decent map?</div><div class="gmail_default">Thank you, </div></div><div>- Erik - <br><br>

</div><div><br></div><div><div><img src="cid:ii_147cb75873b89784" alt="Inline image 2" width="454" height="301"><img src="cid:ii_147cb7585697f7bd" alt="Inline image 1" width="454" height="310"><br></div><div><br></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>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl&quot;</div>

<div><span style="white-space:pre-wrap">                                                                        </span>; Get file</div><div>a=addfile(&quot;<a href="http://ICE.2012.01-12.f06.nc" target="_blank">ICE.2012.01-12.f06.nc</a>&quot;,&quot;r&quot;)</div><div><span style="white-space:pre-wrap">                                                                        </span>; Get variable </div>

<div><span style="white-space:pre-wrap">                                                                        </span>; and lat-lons (2D)</div><div>s1=a-&gt;SHF</div><div>printVarSummary(s1)<span style="white-space:pre-wrap">                                        </span>; display variable</div><div>lat2d    = a-&gt;LAT</div>

<div>lon2d    = a-&gt;LON</div><div>s1@lat2d=lat2d</div><div>s1@lon2d=lon2d</div><div>printVarSummary(s1)<span style="white-space:pre-wrap">                                        </span>; display variable again</div><div><br></div><div><span style="white-space:pre-wrap">                                                                        </span>; plot paramaters</div>

<div>res = True</div><div>wks = gsn_open_wks(&quot;x11&quot;  ,&quot;x_static&quot;)</div><div>res@pmTickMarkDisplayMode = &quot;Always&quot;         ; turn on lat / lon labeling</div><div>;************************************************</div>

<div>; set map limits</div><div>;************************************************</div><div>dimll = dimsizes(lat2d)</div><div>nlat  = dimll(0)</div><div>mlon  = dimll(1)</div><div>; res@mpProjection          = ??? I HAVE NO IDEA???</div>

<div>res@mpLimitMode           = &quot;Corners&quot;</div><div>res@mpLeftCornerLatF      = lat2d(0,0)</div><div>res@mpLeftCornerLonF      = lon2d(0,0)</div><div>res@mpRightCornerLatF     = lat2d(nlat-1,mlon-1)</div><div>
res@mpRightCornerLonF     = lon2d(nlat-1,mlon-1)</div>
<div>res@tfDoNDCOverlay        = True             ; True only for &#39;native&#39; grid</div><div>res@gsnAddCyclic          = False  ; data are not cyclic</div><div>; res@lbLabelAutoStride     = True ; let NCL determine label bar spacing</div>

<div>plot = gsn_csm_contour_map (wks,s1(0,:,:),res)</div><div><br></div><div>; TERMINAL OUTPUT</div><div><br></div><div>erikmbp:MAR_3.2 enoble$ ncl test_plot_080714.ncl </div><div> Copyright (C) 1995-2014 - All Rights Reserved</div>

<div> University Corporation for Atmospheric Research</div><div> NCAR Command Language Version 6.2.0</div><div> The use of this software is governed by a License Agreement.</div><div> See <a href="http://www.ncl.ucar.edu/" target="_blank">http://www.ncl.ucar.edu/</a> for more details.</div>

<div><br></div><div>Variable: s1</div><div>Type: float</div><div>Total Size: 9662400 bytes</div><div>            2415600 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[TIME | 366] x [Y18_127 | 110] x [X10_69 | 60]</div>

<div>Coordinates: </div><div>            TIME: [972672.0625..981432]</div><div>            Y18_127: [-1200.000091097248..1525.000107494753]</div><div>            X10_69: [-775.0000471284118..700.0000440380242]</div><div>
Number Of Attributes: 3</div>
<div>  units :<span style="white-space:pre-wrap">        </span>W/m2</div><div>  long_name :<span style="white-space:pre-wrap">        </span>Sensible Heat Flux</div><div>  history :<span style="white-space:pre-wrap">        </span>From ICE.j06.2012.01.01-15</div>

<div><br></div><div>Variable: s1</div><div>Type: float</div><div>Total Size: 9662400 bytes</div><div>            2415600 values</div><div>Number of Dimensions: 3</div><div>Dimensions and sizes:<span style="white-space:pre-wrap">        </span>[TIME | 366] x [Y18_127 | 110] x [X10_69 | 60]</div>

<div>Coordinates: </div><div>            TIME: [972672.0625..981432]</div><div>            Y18_127: [-1200.000091097248..1525.000107494753]</div><div>            X10_69: [-775.0000471284118..700.0000440380242]</div><div>
Number Of Attributes: 5</div>
<div>  lon2d :<span style="white-space:pre-wrap">        </span>&lt;ARRAY of 6600 elements&gt;</div><div>  lat2d :<span style="white-space:pre-wrap">        </span>&lt;ARRAY of 6600 elements&gt;</div><div>  units :<span style="white-space:pre-wrap">        </span>W/m2</div>

<div>  long_name :<span style="white-space:pre-wrap">        </span>Sensible Heat Flux</div><div>  history :<span style="white-space:pre-wrap">        </span>From ICE.j06.2012.01.01-15</div></div>
</div>
<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>