[ncl-talk] problem in creating coordinate variable

Ipsita Putatunda ipsita.putatunda at gmail.com
Wed Nov 26 20:28:10 MST 2014


The lat lon value 108 and 500 etc is giving the index of lat lon not the
exact lat lon in degrees; there are actually 360 *720 lat lon points and
for testing purpose I have selected a part of the file.

I want to create a 2D variable say Var(lat,lon) where for each grid point
there must be  a single value of the variable. But the ascii file contains
lat, lon,var in three different column.

Say for example the third row I want Var(lat,lon)=0.06 which should
corresponds to the grid where lat=108 and lon=523.
Hope I am able to make it clear what I want.

Thanks,
Ipsita




On Wed, Nov 26, 2014 at 9:46 PM, Mary Haley <haley at ucar.edu> wrote:

> Ipsita,
>
> You are creating an 18 x 18 2D array to hold your data, but you only have
> a 1D array of 18 values.
>
> Also, I don't know what you mean by "2-dimensional coordinate variable".
>
> What you have is a collection of 18 random points, each with a lat/lon
> point associated with it.  This cannot be represented by a 2D array with
> lat/lon coordinate arrays.
>
> Also, the latitude values all have a value of "108", and the longitude
> values are all greater than 500. Are you sure these values are actually
> lat/lon?
>
> --Mary
>
>
> On Wed, Nov 26, 2014 at 3:54 AM, Ipsita Putatunda <
> ipsita.putatunda at gmail.com> wrote:
>
>> Dear NCL users,
>>   I have an ASCII file (tt.txt) with data in 3 columns for latitude
>> longitude and variable respectively. Am reading this data using asciiread
>> and trying to create a 2 dimensional coordinate variable with  the same lat
>> lon and variable values.But the output is giving all undefined values. Any
>> help in this issues will be appreciated. My script is attached herewith.
>>
>> Thanks,
>> Ipsita
>>
>> _______________________________________________
>> ncl-talk mailing list
>> List instructions, subscriber options, unsubscribe:
>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20141127/ce906fbb/attachment.html 


More information about the ncl-talk mailing list