[ncl-talk] warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value
Dennis Shea
shea at ucar.edu
Sat Apr 8 08:52:56 MDT 2017
As noted in the warning message:
You may want to set gsnAddCyclic to False to avoid a warning
---
[1]
res at gsnAddCyclic= False
Generally, always include a: printVarSummary( PCP)
I speculate the variable is: PCP(LAT,LON1_1441) ; (400,1441)
The 1441 would indicate that the cyclic data value has *been included* on
the file.
3B42 data have dimension sizes TRMM_3B42(400,1440).
[2] Why are you doing the following?
pcp_sum=dim_sum_n(pcp(0:8,:,:),0)
pcp_sum!0="lat"
pcp_sum!1="lon"
pcp_sum&lat=lat(0:399)
pcp_sum&lon=lon(0:1440)
printVarSummary(pcp_sum)
You should use the _Wrap version for cleaner code.
pcp_sum=dim_sum_n_Wrap(pcp(0:8,:,:),0)
printVarSummary(pcp_sum)
The named dimension 'lat,lon' are *not* necessary.
[3]
NCL 6.2.0 was released over 3 years ago. There have been many new features
and improvements. I suggest you upgrade to 6.4.0
[4]
The current release of NCL 6.4.0
http://www.ncl.ucar.edu/current_release.shtml
has an associated User Guide with many examples. I suggest that you look at
it.
http://www.ncl.ucar.edu/Document/Manuals/NCL_User_Guide/
Good Luck
On Sat, Apr 8, 2017 at 4:45 AM, grace <313695096 at qq.com> wrote:
> Hi:
> All,I have write a script to read and trmm 3B42 data ,but it appears
> warning :
>
> (0) gsn_add_cyclic: Warning: The range of your longitude coordinate
> array is at least 360.
> (0) You may want to set gsnAddCyclic to False to avoid a warning
> (0) message from the spline function.
> warning:_NhlCreateSplineCoordApprox: Attempt to create spline
> approximation for X axis failed: consider adjusting trXTensionF value
> warning:IrTransInitialize: error creating spline approximation for
> trXCoordPoints; defaulting to linear
>
> And there is no contour appeared on the plot
>
> This is my script:
> ;
> load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
> load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRFUserARW.ncl"
>
> begin
>
> a = addfile("/backup/hl/z_20min/2010.nc","r")
>
>
> ; We generate plots, but what kind do we prefer?
> ; type = "x11"
> type = "pdf"
> ; type = "ps"
> ; type = "ncgm"
> wks = gsn_open_wks(type,"trmmPrecip2010_0808")
> ; get data
> pcp = a->PCP
> lat = a->LAT
> lon = a->LON1_1441
> pcp_sum=dim_sum_n(pcp(0:8,:,:),0)
>
> pcp_sum!0="lat"
> pcp_sum!1="lon"
> pcp_sum&lat=lat(0:399)
> pcp_sum&lon=lon(0:1440)
> printVarSummary(pcp_sum)
>
> ;printVarSummary(pcp1)
>
> ; Set some basic resources
> res = True
> res at gsnDraw = False
> res at gsnFrame = False
> res at cnLinesOn = False
> res at lbLabelBarOn = False
> res at cnInfoLabelOn = False
> res at cnLineLabelsOn = False
> res at mpPerimOn = True
> res at gsnMaximize=True
> res at pmTickMarkDisplayMode = "Always"
> res at gsnDraw = False ; don't draw yet
> res at gsnFrame = False
>
> res at mpGeophysicalLineColor = "Black"
> res at mpNationalLineColor = "Black"
> res at mpDataSetName = "Earth..4"
> res at mpDataBaseVersion = "MediumRes"
> res at mpOutlineSpecifiers = ("China:states")
> res at mpNationalLineThicknessF= 0.1
> res at mpOutlineDrawOrder = "PostDraw"
> res at mpLimitMode = "LatLon" ; Limit the map view.
> res at mpMinLonF = 104.8
> res at mpMaxLonF = 112
> res at mpMinLatF = 31.9
> res at mpMaxLatF = 39.3
>
> plot=gsn_csm_contour_map(wks,pcp_sum,res)
> shp_name = "/public/home/huanglei/map/shaanxi_city_l.shp"
> lnres = True
> lnres at gsLineColor = "black"
> lnres at gsLineThicknessF = 1.5
> id = gsn_add_shapefile_polylines(wks,plot,shp_name,lnres)
>
> txres2 = True
> txres2 at txFont = 10
> txres2 at txFontHeightF =0.01
> txres2 at txFontColor = "Blue"
> txdum1 =gsn_add_text(wks, plot, "Xian", 108.93,34.27, txres2)
> draw(plot)
> frame(wks)
> delete(res)
> ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
>
>
> end
>
>
> My NCL version is 6.2.0.
> How can I slove the problem?
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> 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/20170408/b133d3d8/attachment.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 9BAF46A4 at EB530F0A.37BFE858.jpg
Type: image/jpeg
Size: 76049 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20170408/b133d3d8/attachment.jpg
More information about the ncl-talk
mailing list