<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) 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) A valid latitude coordinate array should have a 'units' attribute equal to one of the following values: </div><div>(0) 'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'</div><div>(0) 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) A valid longitude
coordinate array should have a 'units' attribute equal to one of the following values: </div><div>(0) '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> time = 44 ;</div><div> lat = 120 ;</div><div> lon = 260 ;</div><div><br></div><div>variables:</div><div> float a(time, lat, lon) ;</div><div> a:_FillValue = -999.f ;</div><div>
double lat(lat) ;</div><div> lat:long_name = "Latitude" ;</div><div> lat:units = "degrees_north" ;</div><div> double lon(lon) ;</div><div> lon:long_name = "Longitude" ;</div><div> lon:units = "degrees_east" ;</div><div> float time(time) ;</div><div> 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> time = 44 ;</div><div><br></div><div>variables:</div><div> float
a(time) ;</div><div> a:_FillValue = -999.f ;</div><div> double lat ;</div><div> lat:long_name = "Latitude" ;</div><div> lat:units = "degrees_north" ;</div><div> double lon ;</div><div> lon:long_name = "Longitude" ;</div><div> lon:units = "degrees_east" ;</div><div> float time(time) ;</div><div> 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> f1 = addfile("6104_pksec_06.nc","r")</div><div> f2 = addfile("6104_pk_june_avg.nc","r")</div><div> x1 = f1->a(lat|:,lon|:,time|:)</div><div> x2 = f2->a</div><div> x1!0="lat"</div><div> x1!1="lon"</div><div> x1&lat@units="degrees_north"</div><div>
x1&lon@units="degrees_east"</div><div> c = escorc(x2,x1)</div><div> printVarSummary(c)</div><div><br></div><div>;**********************************************</div><div>; Invoke resources and set limits</div><div>;*********************************************</div><div> wks = gsn_open_wks ("x11","pksec_pk_06") ; open ps file</div><div><br></div><div> gsn_define_colormap(wks,"radar")</div><div> res = True</div><div> res@gsnDraw = False</div><div> res@cnFillOn = True</div><div> res@cnLinesOn =
False</div><div><br></div><div>;*******************************************************</div><div>; create map resources with focus on domain</div><div>;*******************************************************</div><div><br></div><div> res@mpOutlineBoundarySets = "AllBoundaries"</div><div> res@mpDataBaseVersion = "MediumRes"</div><div> res@mpDataSetName = "Earth..3"</div><div> res@mpOutlineOn = True</div><div> res@mpFillOn = False</div><div> res@mpMaxLatF = 35</div><div> res@mpMinLatF = 5</div><div> res@mpMaxLonF
= 125</div><div> res@mpMinLonF = 60</div><div><br></div><div> res@cnLevelSelectionMode = "ManualLevels" ; manually set cn levels</div><div> res@cnMinLevelValF = -1. ; min level</div><div> res@cnMaxLevelValF = 1. ; max level</div><div> res@cnLevelSpacingF = .22 ; contour level spacing</div><div> res@tiMainFontHeightF = 0.03</div><div> res@gsnAddCyclic = False</div><div> plot =
gsn_csm_contour_map_ce(wks,c,res)</div><div><br></div></div></div><div style="position:fixed"></div>
</div><br>
</body></html>