[ncl-talk] NCL Query
Kunal Bali
kunal.bali9 at gmail.com
Thu Sep 11 06:16:02 MDT 2014
Hello Jingmin
the coordinates are the same
ncl 42> printVarSummary(var1)
*Variable: var1*
Type: float
Total Size: 259200 bytes
64800 values
Number of Dimensions: 2
Dimensions and sizes: [Latitude | 180] x [Longitude | 360]
Coordinates:
Latitude: [89.5..-89.5]
Longitude: [-179.5..179.5]
Number Of Attributes: 1
_FillValue : -9999
ncl 43> printVarSummary(var2)
*Variable: var2*
Type: float
Total Size: 259200 bytes
64800 values
Number of Dimensions: 2
Dimensions and sizes: [Latitude | 180] x [Longitude | 360]
Coordinates:
Latitude: [89.5..-89.5]
Longitude: [-179.5..179.5]
Number Of Attributes: 1
_FillValue : -9999
Kunal Bali
Research Scholar
Radio & Atmospheric Science Division
CSIR - National Physical Laboratory
New Delhi - 110012
On Thu, Sep 11, 2014 at 5:40 PM, jingmin li <jingmin.li at uni-tuebingen.de>
wrote:
> 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","r")
> ncl 5> in2 = addfile("/home/kunal/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/c6aaea4a/attachment.html
More information about the ncl-talk
mailing list