Due to the current gap in continued funding from the U.S. National Science Foundation (NSF), the NSF Unidata Program Center has temporarily paused most operations. See NSF Unidata Pause in Most Operations for details.

Re: [visad] Gridded2DSet Error

Hi devanshi...

Did you check this loop....



for ( j=0; j<yCoordinates; j++)
>>          {
>>               for ( i=0; i<xCoordinates; i++)
>>               {
>>                       samples[0][k] = (float) ((latarray[i]/100)-40);
>>                       samples[1][k] = (float)((lonarray[i]/100));
>>                        k++;
>>               }
>>          }

The issue is in this loop.

You are not using j variable in the loop.
For making indexes working you need to use j index.

The lat array index should be something like (j*xCoordinates+i).
I hope you understand.

I thought you might have corrected it.

regards
Ghansham



  • 2014 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: