<div dir="ltr"><div><div><div>Hi Kunal,<br></div>As you noted the error message states the following:<br><b>check_for_lon_coord: Warning: Data either does not contain a
          val<br>
          id longitude coordinate array or doesn&#39;t contain one at all.<br>
          (0)    A valid longitude coordinate array should have a
          &#39;units&#39; attribu<br>
          te equal to one of the following values: <br>
          (0)        &#39;degrees_east&#39; &#39;degrees-east&#39; &#39;degree_east&#39;
          &#39;degrees east&#39; &#39;<br>
          degrees_E&#39; &#39;Degrees_east&#39; &#39;degree_E&#39; &#39;degreeE&#39; &#39;degreesE&#39; &#39;deg
          east&#39;</b><br><br></div>Note the syntax &quot;A valid longitude coordinate array should have a &#39;units&#39; attribute&quot;<br><br></div>I am guessing your Longitude and Latitude arrays do not have units attributes. Try adding the following:<br><pre><span style="font-family:tahoma,sans-serif">  ccr&amp;Latitude@units = &quot;degrees_north&quot;
  ccr&amp;Longitude@units = &quot;degrees_east&quot;<br><br></span></pre><pre><span style="font-family:tahoma,sans-serif">Also, there is no need to do the following &quot;ccr(:,:)&quot;, just stating &quot;ccr&quot; will do <br>the same thing.<br></span></pre><pre><span style="font-family:tahoma,sans-serif">Adam<br></span></pre><br><div><br><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Sep 11, 2014 at 6:16 AM, Kunal Bali <span dir="ltr">&lt;<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@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>Hello Jingmin<br><br></div>the coordinates are the same <br>ncl 42&gt; printVarSummary(var1)                           <br><br><b>Variable: var1</b><br>Type: float<br>Total Size: 259200 bytes<br>            64800 values<br>Number of Dimensions: 2<br>Dimensions and sizes:    [Latitude | 180] x [Longitude | 360]<br>Coordinates: <br>            Latitude: [89.5..-89.5]<br>            Longitude: [-179.5..179.5]<br>Number Of Attributes: 1<br>  _FillValue :    -9999<br>ncl 43&gt; printVarSummary(var2) <br><br><b>Variable: var2</b><br>Type: float<br>Total Size: 259200 bytes<br>            64800 values<br>Number of Dimensions: 2<br>Dimensions and sizes:    [Latitude | 180] x [Longitude | 360]<br>Coordinates: <br>            Latitude: [89.5..-89.5]<br>            Longitude: [-179.5..179.5]<br>Number Of Attributes: 1<br>  _FillValue :    -9999<br><br></div><div class="gmail_extra"><br clear="all"><div><div dir="ltr"><div>Kunal Bali<br></div><div>Research Scholar <br></div><div>Radio &amp; Atmospheric Science Division <br></div><div>CSIR - National Physical Laboratory<br></div><div>New Delhi - 110012<br><br></div><div><br></div><div><br></div><div><br></div><div><p style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br></font></p></div></div></div>
<br><div class="gmail_quote">On Thu, Sep 11, 2014 at 5:40 PM, jingmin li <span dir="ltr">&lt;<a href="mailto:jingmin.li@uni-tuebingen.de" target="_blank">jingmin.li@uni-tuebingen.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <div>Maybe use  &quot;copy_VarCoords(var2,ccr)&quot;
      instead of &quot;copy_VarCoords_1(var2,ccr)&quot;<br>
      You need to do   &quot;printVarSummary(var1)&quot; first to see your data
      coordinates.<br>
      <br>
      <br>
      Am 11/09/14 13:31, schrieb Kunal Bali:<br>
    </div>
    <blockquote type="cite"><div><div>
      <div dir="ltr">
        <div>Dear NCL <br>
          <br>
        </div>
        I am trying to plot the correlation map, But showing an error
        like<br>
        <br>
        <b>check_for_lon_coord: Warning: Data either does not contain a
          val<br>
          id longitude coordinate array or doesn&#39;t contain one at all.<br>
          (0)    A valid longitude coordinate array should have a
          &#39;units&#39; attribu<br>
          te equal to one of the following values: <br>
          (0)        &#39;degrees_east&#39; &#39;degrees-east&#39; &#39;degree_east&#39;
          &#39;degrees east&#39; &#39;<br>
          degrees_E&#39; &#39;Degrees_east&#39; &#39;degree_E&#39; &#39;degreeE&#39; &#39;degreesE&#39; &#39;deg
          east&#39;<br>
        </b><br>
        <br>
        Could you please tell how to give valid longitude coordinates ??<br>
         <br>
        <div>The script i used is below. <br>
          ncl 0&gt; load
          &quot;/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;<br>
          ncl 1&gt; load
          &quot;/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot; <br>
          ncl 2&gt; load
          &quot;/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/contributed.ncl&quot;<br>
          ncl 3&gt; begin<br>
          ncl 4&gt; in1 = addfile(&quot;/home/kunal/<a href="http://14-01.nc" target="_blank">14-01.nc</a>&quot;,&quot;r&quot;)<br>
          ncl 5&gt; in2 = addfile(&quot;/home/kunal/<a href="http://02-09.nc" target="_blank">02-09.nc</a>&quot;,&quot;r&quot;)<br>
          ncl 6&gt; var1 = in1-&gt;TotCH4_A<br>
          ncl 7&gt; var2 = in2-&gt;TotCH4_A <br>
          ncl 8&gt; maxlag = 1<br>
          ncl 9&gt; ccr = esccr(var1,var2,maxlag)<br>
          ncl 10&gt; copy_VarAtts(var1,ccr)                           <br>
          ncl 11&gt; copy_VarCoords_1(var2,ccr)<br>
          ncl 12&gt; wks = gsn_open_wks(&quot;x11&quot;,&quot;corr&quot;)<br>
          ncl 13&gt; gsn_define_colormap(wks,&quot;ncl_default&quot;)<br>
          ncl 14&gt; res = True<br>
          ncl 15&gt; res@cnFillOn = True<br>
          ncl 16&gt; res@tiMainString = &quot;Correlation&quot;<br>
          ncl 17&gt; plot = gsn_csm_contour_map_ce(wks,ccr(:,:),res)<br>
          ncl 18&gt; end<br>
          <br>
           <br>
        </div>
        <div><br>
          <br>
          <br>
          <br>
          <br clear="all">
          <div>
            <div>
              <div dir="ltr">
                <div>Kunal Bali<br>
                </div>
                <div>Research Scholar <br>
                </div>
                <div>Radio &amp; Atmospheric Science Division <br>
                </div>
                <div>CSIR - National Physical Laboratory<br>
                </div>
                <div>New Delhi - 110012<br>
                  <br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div><br>
                </div>
                <div>
                  <p style="margin:0px;border-collapse:collapse;font-family:Tahoma,Verdana;font-size:12px"><font color="#1F497D"><br>
                    </font></p>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <br>
      <fieldset></fieldset>
      <br>
      </div></div><span><pre>_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a>
</pre>
    </span></blockquote>
    <br>
    <br>
  </div>

</blockquote></div><br></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><br clear="all"><br>-- <br><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist,  </font></span><span><font color="#888888">Climate and Global Dynamics Division, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a>   </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div>
</div>