<html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:arial, helvetica, sans-serif;font-size:12pt"><DIV>Hi,</DIV>
<DIV> </DIV>
<DIV>I want to do some calculations using the values in different files but an error message was shown :</DIV>
<DIV> </DIV>
<DIV><EM>Data Request Error: Invalid grid coordinates<BR> World coordinates convert to non-integer grid coordinates<BR> Variable = vwnd10m Dimension = 1 <BR>Operation Error: Error from ave function<BR> Error ocurred at column 32<BR>DEFINE error: Invalid expression.</EM> <BR></DIV>
<DIV> </DIV>
<DIV><U>The following are the main components of my script:</U></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV><EM>'sdfopen /home2/h08hang/redata/uwnd10m.mon.mean.nc'<BR>'set lat -90 90'<BR>'set lon 0 360'<BR>'set t 1 753'<BR>'define uwnd10m=uwnd'<BR>'close 1'</EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>'sdfopen /home2/h08hang/redata/vwnd10m.mon.mean.nc'<BR>'set lat -90 90'<BR>'set lon 0 360'<BR>'set t 1 753'<BR>'define vwnd10m=vwnd'<BR>'close 1'</EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>'sdfopen /home2/h08hang/redata/shum2m.mon.mean.nc'<BR>'set lat -90 90'<BR>'set lon 0 360'<BR>'set t 1 753'<BR>'define shum2m=shum'<BR>'close 1'</EM></DIV>
<DIV><BR><EM>'sdfopen /home2/h08hang/redata/uwnd.mon.mean.nc'</EM></DIV>
<DIV><BR><EM>'sdfopen /home2/h08hang/redata/vwnd.mon.mean.nc'</EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>'sdfopen /home2/h08hang/redata/shum.mon.mean.nc'</EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM>....</EM></DIV>
<DIV><EM> </EM></DIV>
<DIV><EM> lon1=112.5<BR> lon2=115<BR> lat1=22.5<BR> lat2=25</EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><EM> 'set lat 'lat1' 'lat2<BR> 'set lon 'lon1<BR> 'set t 'time<BR> 'set lev 'level1</EM></DIV>
<DIV><EM></EM> </DIV>
<DIV><STRONG><EM> 'define wind=(ave(uwnd.1,lat='lat1',lat='lat2')+ave(uwnd10m,lat='lat1',lat='lat2'))/2'</EM></STRONG></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>For the first three files I opened (uwnd10m,vwnd10m,shum2m), the variables are uwnd,vwnd and shum respectively. I define three new variables to store them as their varable name crash with the next three file I am going to open. I close the each file after I have defined the new variables (for the first three files)</DIV>
<DIV> </DIV>
<DIV>For the next three files I opened,<STRONG> </STRONG>they have a <STRONG>different Grids</STRONG> as shown below.<STRONG> Is this the reason why I cannot run my script, or something else?</STRONG></DIV>
<DIV><STRONG>But what I want is to use the values from different files (those with different Grids to do my calculation) How can I solve this? </STRONG></DIV>
<DIV> </DIV>
<DIV>Can anyone give me some help? Thanks a lot (and sorry for the lengthy question)</DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>File 1 : NCEP Reanalysis monthly ltm surface pressure<BR> Descriptor: /home2/h08hang/redata/pres.mon.mean.nc<BR> Binary: /home2/h08hang/redata/pres.mon.mean.nc<BR> Type = Gridded<BR><STRONG> Xsize = 144 Ysize = 73 Zsize = 1 Tsize = 756 Esize = 1<BR></STRONG> Number of Variables = 1<BR> pres 0 -103 Monthly Mean of Surface Pressure<BR></DIV>
<DIV>File 2 : monthly mean u wind<BR> Descriptor: /home2/h08hang/redata/uwnd10m.mon.mean.nc<BR> Binary: /home2/h08hang/redata/uwnd10m.mon.mean.nc<BR> Type = Gridded<BR><STRONG> Xsize = 192 Ysize = 94 Zsize = 1 Tsize = 756 Esize = 1<BR></STRONG> Number of Variables = 1<BR> uwnd 0 -103 Monthly Mean of U-Wind<BR></DIV>
<DIV>File 3 : monthly mean u wind<BR> Descriptor: /home2/h08hang/redata/vwnd10m.mon.mean.nc<BR> Binary: /home2/h08hang/redata/vwnd10m.mon.mean.nc<BR> Type = Gridded<BR><STRONG> Xsize = 192 Ysize = 94 Zsize = 1 Tsize = 756 Esize = 1<BR></STRONG> Number of Variables = 1<BR> vwnd 0 -103 Monthly Mean V wind at 10 m</DIV>
<DIV> </DIV>
<DIV>File 4 : monthly mean u wind from the NCEP Reanalysis<BR> Descriptor: /home2/h08hang/redata/uwnd.mon.mean.nc<BR> Binary: /home2/h08hang/redata/uwnd.mon.mean.nc<BR> Type = Gridded<BR><STRONG> Xsize = 144 Ysize = 73 Zsize = 17 Tsize = 751 Esize = 1<BR></STRONG> Number of Variables = 1<BR> uwnd 17 -103 Monthly mean u wind<BR></DIV>
<DIV>File 5 : monthly mean v wind from the NCEP Reanalysis<BR> Descriptor: /home2/h08hang/redata/vwnd.mon.mean.nc<BR> Binary: /home2/h08hang/redata/vwnd.mon.mean.nc<BR> Type = Gridded<BR><STRONG> Xsize = 144 Ysize = 73 Zsize = 17 Tsize = 751 Esize = 1<BR></STRONG> Number of Variables = 1<BR> vwnd 17 -103 Monthly mean v wind<BR></DIV>
<DIV>File 6 : 4x daily NMC reanalysis<BR> Descriptor: /home2/h08hang/redata/shum.mon.mean.nc<BR> Binary: /home2/h08hang/redata/shum.mon.mean.nc<BR> Type = Gridded<BR><STRONG> Xsize = 144 Ysize = 73 Zsize = 8 Tsize = 752 Esize = 1<BR></STRONG> Number of Variables = 1<BR> shum 8 -103 Monthly Mean of Specific Humidity<BR></DIV>
<DIV> </DIV>
<DIV>Best,<BR>Henry</DIV></div><br></body></html>