[ncl-talk] NCL Query
jingmin li
jingmin.li at uni-tuebingen.de
Thu Sep 11 06:10:43 MDT 2014
Maybe use "copy_VarCoords(var2,ccr)" instead of
"copy_VarCoords_1(var2,ccr)"
You need to do "printVarSummary(var1)" first to see your data coordinates.
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20140911/abe4ad6e/attachment.html
More information about the ncl-talk
mailing list