[ncl-talk] NCL coordinates erroe

Alan Brammer abrammer at albany.edu
Wed Oct 15 11:14:58 MDT 2014


printVarSummary(VAR&lat)

The line I typed explicitly states to only print the summary of the lat
coordinate. ** Please read the documentation and understand what it is
you're copying.  **

  units :    degrees
This is the cause of your problems. Again read the coordinate documentation
this is all already explained for you.  Degrees is not really a unit. Ncl
doesn't know whether its north, east, celcius, Fahrenheit etc. Hence
changing it to "degrees_north" for latitude.

These are trivial problems that can be solved by taking an afternoon to
read the documentation on the website. It'll save you time in the short and
long term.

On 15 Oct 2014 01:41, "Kunal Bali" <kunal.bali9 at gmail.com> wrote:

> After editing the scripts according to you , the dimensions size not
> showing [lon | 421] ??
>
> How to fix it ??
>
> its shows like
>
> *Variable: lat (coordinate)*
> Type: float
> Total Size: 1252 bytes
>             313 values
> Number of Dimensions: 1
> Dimensions and sizes:    [lat | 313]
> Coordinates:
> Number Of Attributes: 9
>   scale :    0
>   stride :    0.08333334
>   gridReference :    edge
>   standard_name :    latitude
>   endValue :    26
>   units :    degrees
>   scaleType :    linear
>   startValue :    -0.08333065
>   size :    313
>
>
> Kunal Bali
> Research Scholar
> Radio & Atmospheric Science Division
> CSIR - National Physical Laboratory
> New Delhi - 110012
>
>
>
>
>
>
> On Wed, Oct 15, 2014 at 10:50 AM, Alan Brammer <abrammer at albany.edu>
> wrote:
>
>> Kunal,
>>
>> Coordinates:
>>             G3fakeDim0: [-0.04166399..25.95834]
>>             G3fakeDim1: [59.95834..94.95834]
>> Are these coordinates correct with respect to the data?   NCL map
>> routines expect coordinates to have lat/lon relative units .e.g
>> "degrees_north".
>> Therefore if the data is expect to span 0 to 25N and 60 to 94E, you could
>> first rename the coordinates so they are a litle more user friendly, then
>> attach the respective units to both lat and lon coordinates.
>>
>>
>> !!!!  This is untested psuedo-code it  may not work directly but should
>> show the general idea to be applied. Please edit appropriately !!!!
>>
>> VAR!0 = "lat"
>> VAR!1 = "lon"
>>
>> printVarSummary(VAR&lat)
>>
>> VAR&lat at units = "degrees_north"
>> VAR&lon at units = "degrees_east"
>>
>> printVarSummary(VAR&lat)
>>
>> On Wed, Oct 15, 2014 at 12:50 AM, Kunal Bali <kunal.bali9 at gmail.com>
>> wrote:
>>
>>> Dear NCL users
>>>
>>> printVarSummary(VAR) shows the
>>>
>>> Variable: VAR
>>> Type: float
>>> Total Size: 527092 bytes
>>>             131773 values
>>> Number of Dimensions: 2
>>> Dimensions and sizes:    [G3fakeDim0 | 313] x [G3fakeDim1 | 421]
>>> Coordinates:
>>>             G3fakeDim0: [-0.04166399..25.95834]
>>>             G3fakeDim1: [59.95834..94.95834]
>>> Number Of Attributes: 11
>>>   Scaling :    linear
>>>   Slope :    0.000717185
>>>   Scaling_Equation :    (Slope*l3m_data) + Intercept = Parameter value
>>>   Intercept :    -2
>>>   Fill :    65535
>>>   _FillValue :    65535
>>>   structureType :    Grid
>>>   unitsCategory :    science
>>>   units :    C
>>>   scale_factor :     1
>>>   add_offset :     0
>>>
>>>
>>>
>>> Kunal Bali
>>> Research Scholar
>>> Radio & Atmospheric Science Division
>>> CSIR - National Physical Laboratory
>>> New Delhi - 110012
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Wed, Oct 15, 2014 at 2:40 AM, Maria Gehne - NOAA Affiliate <
>>> maria.gehne at noaa.gov> wrote:
>>>
>>>> Hi Kunal,
>>>>
>>>> most likely your data does not have coordinate variables attached to
>>>> it. What does the printVarSummary(VAR) return? That should tell you if your
>>>> data has lat/lon coordinates. If it doesn't then you need to attach those
>>>> prior to plotting. You seem to know what the latitudes  and longitudes of
>>>> your data are supposed to be so you could generate the two arrays for lat
>>>> and lon yourself if they are not in the file.
>>>>
>>>> Hope this helps. Replies to NCL-talk only please.
>>>>
>>>> Maria
>>>>
>>>> On Tue, Oct 14, 2014 at 11:53 AM, Kunal Bali <kunal.bali9 at gmail.com>
>>>> wrote:
>>>>
>>>>> Dear NCL users
>>>>>
>>>>> I tried to plot SST.nc attached file through NCL . Actually the SST.nc
>>>>> file have the coordinates from lat - 0 26 and lon - 60 95
>>>>>
>>>>> But when i run the scripts so its showing data all over the world not
>>>>> on my coordinates, see the SST.pdf file
>>>>>
>>>>> How to fix it ??
>>>>>
>>>>> Kunal Bali
>>>>> Research Scholar
>>>>> Radio & Atmospheric Science Division
>>>>> CSIR - National Physical Laboratory
>>>>> New Delhi - 110012
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> ncl-talk mailing list
>>>>> List instructions, subscriber options, unsubscribe:
>>>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>>>
>>>>>
>>>>
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> List instructions, subscriber options, unsubscribe:
>>> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>>
>>
>
> _______________________________________________
> 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/20141015/9201ba73/attachment.html 


More information about the ncl-talk mailing list