<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't contain one at all.<br>
(0) A valid longitude coordinate array should have a
'units' attribu<br>
te equal to one of the following values: <br>
(0) 'degrees_east' 'degrees-east' 'degree_east'
'degrees east' '<br>
degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg
east'</b><br><br></div>Note the syntax "A valid longitude coordinate array should have a 'units' attribute"<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&Latitude@units = "degrees_north"
ccr&Longitude@units = "degrees_east"<br><br></span></pre><pre><span style="font-family:tahoma,sans-serif">Also, there is no need to do the following "ccr(:,:)", just stating "ccr" 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"><<a href="mailto:kunal.bali9@gmail.com" target="_blank">kunal.bali9@gmail.com</a>></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> 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> 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 & 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"><<a href="mailto:jingmin.li@uni-tuebingen.de" target="_blank">jingmin.li@uni-tuebingen.de</a>></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 "copy_VarCoords(var2,ccr)"
instead of "copy_VarCoords_1(var2,ccr)"<br>
You need to do "printVarSummary(var1)" 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't contain one at all.<br>
(0) A valid longitude coordinate array should have a
'units' attribu<br>
te equal to one of the following values: <br>
(0) 'degrees_east' 'degrees-east' 'degree_east'
'degrees east' '<br>
degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg
east'<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> load
"/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"<br>
ncl 1> load
"/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br>
ncl 2> load
"/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/contributed.ncl"<br>
ncl 3> begin<br>
ncl 4> in1 = addfile("/home/kunal/<a href="http://14-01.nc" target="_blank">14-01.nc</a>","r")<br>
ncl 5> in2 = addfile("/home/kunal/<a href="http://02-09.nc" target="_blank">02-09.nc</a>","r")<br>
ncl 6> var1 = in1->TotCH4_A<br>
ncl 7> var2 = in2->TotCH4_A <br>
ncl 8> maxlag = 1<br>
ncl 9> ccr = esccr(var1,var2,maxlag)<br>
ncl 10> copy_VarAtts(var1,ccr) <br>
ncl 11> copy_VarCoords_1(var2,ccr)<br>
ncl 12> wks = gsn_open_wks("x11","corr")<br>
ncl 13> gsn_define_colormap(wks,"ncl_default")<br>
ncl 14> res = True<br>
ncl 15> res@cnFillOn = True<br>
ncl 16> res@tiMainString = "Correlation"<br>
ncl 17> plot = gsn_csm_contour_map_ce(wks,ccr(:,:),res)<br>
ncl 18> 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 & 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>