<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:'times new roman', 'new york', times, serif;font-size:12pt"><div><div>Hi,</div><div><br></div><div>I want to calculate cross-correlation at 0 lag. Getting following error:</div><div><br></div><div><div>(0) &nbsp; &nbsp; check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.</div><div>(0) &nbsp; &nbsp; A valid latitude coordinate array should have a 'units' attribute equal to one of the following values:&nbsp;</div><div>(0) &nbsp; &nbsp; &nbsp; &nbsp; 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'</div><div>(0) &nbsp; &nbsp; check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.</div><div>(0) &nbsp; &nbsp; A valid longitude
 coordinate array should have a 'units' attribute equal to one of the following values:&nbsp;</div><div>(0) &nbsp; &nbsp; &nbsp; &nbsp; 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'</div><div><br></div></div><div>Script below addressed this issue as described in mini graphics manual but error still persists. Kindly help to rectify this.</div><div>Thanks.</div><div><br></div><div><b>Header of file1 is as follow:</b></div><div><br></div><div><div>netcdf 6104_pksec_06 {</div><div>dimensions:</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;time = 44 ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;lat = 120 ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;lon = 260 ;</div><div><br></div><div>variables:</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;float a(time, lat, lon) ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a:_FillValue = -999.f ;</div><div>&nbsp;&nbsp;
 &nbsp; &nbsp; &nbsp;double lat(lat) ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:long_name = "Latitude" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:units = "degrees_north" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;double lon(lon) ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:long_name = "Longitude" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:units = "degrees_east" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;float time(time) ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;time:units = "months since 1961-01-01" ;</div><div><br></div><div><b>Header of file 2 is as follow:</b></div><div><br></div><div><div><div>netcdf 6104_pk_june_avg {</div><div>dimensions:</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;time = 44 ;</div><div><br></div><div>variables:</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;float
 a(time) ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;a:_FillValue = -999.f ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;double lat ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:long_name = "Latitude" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lat:units = "degrees_north" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;double lon ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:long_name = "Longitude" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;lon:units = "degrees_east" ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;float time(time) ;</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;time:units = "months since 1961-01-01" ;</div><div><br></div></div><div><br></div><div><b>and the script for calculation is as follows:</b></div><div><br></div></div></div><div><div>load
 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"</div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"</div><div><br></div><div>;**********************************************</div><div>; Reading Data and correlation function</div><div>;**********************************************</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;f1 = addfile("6104_pksec_06.nc","r")</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;f2 = addfile("6104_pk_june_avg.nc","r")</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;x1 = f1-&gt;a(lat|:,lon|:,time|:)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;x2 = f2-&gt;a</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;x1!0="lat"</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;x1!1="lon"</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;x1&amp;lat@units="degrees_north"</div><div>&nbsp;&nbsp; &nbsp; &nbsp;
 &nbsp;x1&amp;lon@units="degrees_east"</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;c &nbsp;= escorc(x2,x1)</div><div>&nbsp;&nbsp; &nbsp; &nbsp; &nbsp;printVarSummary(c)</div><div><br></div><div>;**********************************************</div><div>; Invoke resources and set limits</div><div>;*********************************************</div><div>&nbsp;&nbsp;wks &nbsp; = gsn_open_wks ("x11","pksec_pk_06") &nbsp; &nbsp; &nbsp;; open ps file</div><div><br></div><div>&nbsp;&nbsp;gsn_define_colormap(wks,"radar")</div><div>&nbsp;&nbsp;res &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div>&nbsp;&nbsp;res@gsnDraw &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = False</div><div>&nbsp;&nbsp;res@cnFillOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= True</div><div>&nbsp;&nbsp;res@cnLinesOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; =
 False</div><div><br></div><div>;*******************************************************</div><div>; create map resources with focus on domain</div><div>;*******************************************************</div><div><br></div><div>&nbsp;&nbsp;res@mpOutlineBoundarySets &nbsp; &nbsp; = "AllBoundaries"</div><div>&nbsp;&nbsp;res@mpDataBaseVersion &nbsp; &nbsp; &nbsp; &nbsp; = "MediumRes"</div><div>&nbsp;&nbsp;res@mpDataSetName &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = "Earth..3"</div><div>&nbsp;&nbsp;res@mpOutlineOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = True</div><div>&nbsp;&nbsp;res@mpFillOn &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False</div><div>&nbsp;&nbsp;res@mpMaxLatF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 35</div><div>&nbsp;&nbsp;res@mpMinLatF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 5</div><div>&nbsp;&nbsp;res@mpMaxLonF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
 &nbsp; = 125</div><div>&nbsp;&nbsp;res@mpMinLonF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = 60</div><div><br></div><div>&nbsp;&nbsp;res@cnLevelSelectionMode &nbsp; &nbsp; &nbsp;= "ManualLevels" ; manually set cn levels</div><div>&nbsp;&nbsp;res@cnMinLevelValF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= -1. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; min level</div><div>&nbsp;&nbsp;res@cnMaxLevelValF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= &nbsp;1. &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; max level</div><div>&nbsp;&nbsp;res@cnLevelSpacingF &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; = .22 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ; contour level spacing</div><div>&nbsp;&nbsp;res@tiMainFontHeightF &nbsp; &nbsp; &nbsp; &nbsp; = 0.03</div><div>&nbsp;&nbsp;res@gsnAddCyclic &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;= False</div><div>&nbsp;&nbsp;plot =
 gsn_csm_contour_map_ce(wks,c,res)</div><div><br></div></div></div><div style="position:fixed"></div>


</div><br>

      </body></html>