<div dir="ltr"><div class="gmail_default" style="font-size:small">Ipsita,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks for providing your code and data.</div>

<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I&#39;m a bit confused by the code, because the &quot;LH4&quot; variable purposely has all the metadata stripped off by this command:</div>

<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default"><div class="gmail_default" style="font-size:small">  LH4=(/L3*24/)</div><div style="font-size:small"><div><div><br>You want to preserve metadata, especially coordinate arrays, if you are going to be plotting and/or overlaying variables.</div>

<div><br></div><div><div>   LH4=L3</div><div>   LH4=L3*24    ; preserve metadata</div></div><div><br></div></div><div>You also want to do this for &quot;wscale&quot;:</div><div><div><br>
   wscale=W   <span style="white-space:pre-wrap">        </span>     ; Trick for copying metadata                                                                  </div><div>   wscale=W*scale</div></div><div><br></div><div>The above two lines could also be done like this:</div>

<div><br></div><div><div>   wscale=W*scale</div><div>   copy_VarMeta(W,wscale)      ; Copy all metadata from W to wscale</div></div><div><br></div><div>Another issue is you are plotting LH4 using &quot;gsn_contour&quot; instead of &quot;gsn_csm_contour&quot;. You want to use &quot;gsn_csm_xxxx&quot; scripts where possible, because they examine your variable to check for metadata, and will use that metadata, including coordinate arrays, to correctly plot it.<br>

</div></div><div style="font-size:small"><br></div><div style="font-size:small">Even with these corrections, the overlay is not going to work properly because your &quot;lev&quot; coordinate array is different in for your LH4 variable than it is for your wscale/U variables.  In order for &quot;overlay&quot; to work, your X/Y coordinate arrays must be in the same data space.</div>
<div style="font-size:small"><br></div><div style="font-size:small">For LH4, note that the &quot;lev&quot; values go from 0 to 14:</div><div style="font-size:small"><br></div><div style><div style>Variable: LH4</div><div style>
Type: float</div><div style>Total Size: 164160 bytes</div><div style>            41040 values</div><div style>Number of Dimensions: 2</div><div style>Dimensions and sizes:<span class="" style="white-space:pre">        </span>[lev | 57] x [lon | 720]</div>
<div style>Coordinates: </div><div style>            lev: [   0..  14]</div><div style>            lon: [-179.75..179.75]</div><div style><br></div><div style>For wscale &quot;levels&quot; looks like this:</div><div style>
<br></div><div style><div>Variable: wscale</div><div>Type: float</div><div>Total Size: 72000 bytes</div><div>            18000 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span class="" style="white-space:pre">        </span>[levels | 25] x [lon | 720]</div>
<div>Coordinates: </div><div>            levels: [1000.. 100]</div><div>            lon: [-180..179.5]</div><div><br></div><div>Finally, you are calling &quot;draw()&quot;, but you need to also call &quot;frame(wks)&quot; after the &quot;draw&quot; command so that the graphic is ended properly.</div>
<div><br></div><div>Please fix these issues and post to ncl-talk if you continue to have problems.</div><div><br></div><div>--Mary</div><div><br></div></div><div style><br></div></div></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Aug 18, 2014 at 11:12 PM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@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><div><div><div>Hi Mary,<br></div>     I have tried as per your suggestion to first overlay the plots and then to attach, but it is not doing as per my requirements. As my data is from -179 to 179 longitude wise and I want to plot from -30 to -30 that is why am attaching two plots from -30 to 179  and 179 to -30 longitude. I finally want to over lay one vector plot and one contour plot. My script with data files are attached herewith.<br>

</div>Any help will be appreciated.<br><br></div>Thanks,<br></div>Ipsita​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1">

<a href="https://docs.google.com/file/d/0B438RTfd8A-Nc1NXeHNzMHZHekE/edit?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:medium none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">GLOBAL_SON.nc</span></a></div>

​​<br><div class="gmail_chip gmail_drive_chip" style="width:396px;min-height:18px;max-height:18px;background-color:#f5f5f5;padding:5px;color:#222;font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid #ddd;line-height:1">

<a href="https://docs.google.com/file/d/0B438RTfd8A-NSGR3XzJGbHo3OHc/edit?usp=drive_web" style="display:inline-block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:medium none;width:100%" target="_blank"><img style="vertical-align:bottom;border:none" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:#15c;text-decoration:none;vertical-align:bottom">MERRA_regrid.nc</span></a></div>

​<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Aug 14, 2014 at 9:03 PM, Mary Haley <span dir="ltr">&lt;<a href="mailto:haley@ucar.edu" target="_blank">haley@ucar.edu</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-size:small">Ipsita,</div><div class="gmail_default" style="font-size:small">

<br></div><div class="gmail_default" style="font-size:small">I&#39;m not exactly sure how you want your final plot to look, but the &quot;overlay&quot; procedure really is meant to be used to do simply overlays of say, contours on a map, or vectors on contours on a map, etc.</div>


<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">It looks like you are trying to attach some plots via X and/or Y axes, and then try to use these as overlays, which won&#39;t work. The gsn_attach_plots (which is perhaps poorly named) is simply meant to join several plots together along a given axis.</div>


<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">My suggestion is to overlay the plots *before* you call gsn_attach_plots.</div><div class="gmail_default" style="font-size:small">


<br></div><div class="gmail_default" style="font-size:small">If you continue to have problems, please describe your desired result in more detail, and what you are currently getting of your script that isn&#39;t correct. </div>


<div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">As always, it helps if you can provide a full script and your data so we can run the script here.</div><div class="gmail_default" style="font-size:small">


<br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">--Mary</div><div class="gmail_default" style="font-size:small">


<br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote"><div><div>On Wed, Aug 13, 2014 at 1:18 PM, Ipsita Putatunda <span dir="ltr">&lt;<a href="mailto:ipsita.putatunda@gmail.com" target="_blank">ipsita.putatunda@gmail.com</a>&gt;</span> wrote:<br>


</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hi,<div>  I want to get an overlay plot of two plots which are created by attached plot. I have tried with overlay function which is not giving my desired plot. I tried with setting vpXF, vpYF for each plot also, but still am not getting overlaid plot. Is attaching plots before overlaying is causing the problem? Plotting part of my script is attached herewith.</div>



<div>Please help me to solve this issue.</div><div><br></div><div>Thanks,</div><div>Ipsita</div></div>
<br></div></div>_______________________________________________<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>
</blockquote></div><br></div>
</blockquote></div><br></div>