[ncl-talk] NCL Query

Karin Meier-Fleischer meier-fleischer at dkrz.de
Thu Sep 11 06:03:46 MDT 2014


Hi Kunal,

because not knowing your data, please take a look at:

https://www.ncl.ucar.edu/Document/Graphics/error_msg.shtml*
*
go to  ' Coordinate Variables do not have correct units attribute*'

* or just search (google) the first part of your error message. It will 
give
you the important links straight forward.

Bye,
Karin

*
*
Am 11.09.14 13:31, schrieb Kunal Bali:
> Dear NCL
>
> I am trying to plot the correlation map, But showing an error like
>
> *check_for_lon_coord: Warning: Data either does not contain a val
> id longitude coordinate array or doesn't contain one at all.
> (0)    A valid longitude coordinate array should have a 'units' attribu
> te equal to one of the following values:
> (0)        'degrees_east' 'degrees-east' 'degree_east' 'degrees east' '
> degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'
> *
>
> Could you please tell how to give valid longitude coordinates ??
>
> The script i used is below.
> ncl 0> load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> ncl 1> load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
> ncl 2> load "/usr/local/lib/ncl/lib/ncarg/nclscripts/csm/contributed.ncl"
> ncl 3> begin
> ncl 4> in1 = addfile("/home/kunal/14-01.nc <http://14-01.nc>","r")
> ncl 5> in2 = addfile("/home/kunal/02-09.nc <http://02-09.nc>","r")
> ncl 6> var1 = in1->TotCH4_A
> ncl 7> var2 = in2->TotCH4_A
> ncl 8> maxlag = 1
> ncl 9> ccr = esccr(var1,var2,maxlag)
> ncl 10> copy_VarAtts(var1,ccr)
> ncl 11> copy_VarCoords_1(var2,ccr)
> ncl 12> wks = gsn_open_wks("x11","corr")
> ncl 13> gsn_define_colormap(wks,"ncl_default")
> ncl 14> res = True
> ncl 15> res at cnFillOn = True
> ncl 16> res at tiMainString = "Correlation"
> ncl 17> plot = gsn_csm_contour_map_ce(wks,ccr(:,:),res)
> ncl 18> end
>
>
>
>
>
>
>
> 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

-- 
Dipl. Geophys. Karin Meier-Fleischer
Visualization
Application Support

Deutsches Klimarechenzentrum GmbH (DKRZ)
Bundesstrasse 45a - D20146 Hamburg - Germany

Phone:    +49 (0)40 460094 126
Fax:      +49 (0)40 460094 270
E-Mail:   meier-fleischer at dkrz.de
URL:      www.dkrz.de

Geschäftsführer: Prof. Dr. Thomas Ludwig
Sitz der Gesellschaft: Hamburg
Amtsgericht Hamburg HRB 39784

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140911/0a44042d/attachment.html 


More information about the ncl-talk mailing list