Re: Problem with x coordinate when using gsn_csm_contour

From: David Brown <dbrown_at_nyahnyahspammersnyahnyah>
Date: Mon Nov 04 2013 - 18:14:06 MST

Hi Xiaoming,
You data does have some discontinuities (between time steps 17 and 18, also between 36 and 37) which is why NCL is having trouble generating a continuous time axis. However, in this case, If you follow the suggestion given by the warning message, you can get it to work. I set trXTensionF to 9.0 and I got a valid plot. You might also want to set gsnXIrregularToLinear to True depending on what your goal is. If you data had bigger holes
you probably could not use trXTensionF. In that case you might need to generate some reasonably spaced intermediate pseudo coordinates values with fill values for the data values.
 -dave

On Nov 4, 2013, at 2:08 PM, xiaoming Hu <yuanfangcan@hotmail.com> wrote:

> Hello
>
> When I plot using
> "plot = gsn_csm_contour(wks, species_value(:,:), res1 ) "
> I got the following warning
> "
> 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
> "
>
> The resulted figure (attached below) is also wrong
> See:
> http://www.caps.ou.edu/micronet/ARM/915rwpwindconC1/201108/files/ARMlidartime_height_WSPD_nightCenter_0.png
> The x coordinate is supposed to be
> (0) 0.8172222222222222
> (1) 1.8175
> (2) 2.8175
> (3) 3.817777777777778
> (4) 4.818055555555556
> (5) 5.818333333333333
> (6) 6.818611111111111
> (7) 7.819166666666667
> (8) 8.819166666666666
> (9) 9.819444444444445
> (10) 10.81972222222222
> (11) 11.82
> (12) 12.82027777777778
> (13) 13.82027777777778
> (14) 14.82
> (15) 15.82
> (16) 16.82
> (17) 17.82083333333333
> (18) 25.2144444444566
> (19) 26.21277777774958
> (20) 27.21277777774958
> (21) 28.21305555553408
> (22) 29.21305555553408
> (23) 30.21305555553408
> (24) 31.21333333331859
> (25) 32.2138888888876
> (26) 33.2138888888876
> (27) 34.2141666666721
> (28) 35.2141666666721
> (29) 36.21472222224111
> (30) 37.21500000002561
> (31) 38.21500000002561
> (32) 39.21500000002561
> (33) 40.21472222224111
> (34) 41.21472222224111
> (35) 42.21500000002561
> (36) 43.21527777775191
> (37) 47.79083333333256
>
> But ncl seemed to have 0-37 as x coordinate.
>
> My script is at
> http://www.caps.ou.edu/micronet/ARM/915rwpwindconC1/201108/files/plot_timeHeight_spd_ARM_HaloLidar_nice_saved_cdf_nightcenterCST.ncl
>
> The two inputs are at
> http://www.caps.ou.edu/micronet/ARM/915rwpwindconC1/201108/files/sgpLidarwind.c1.20110802.004902.cdf
> http://www.caps.ou.edu/micronet/ARM/915rwpwindconC1/201108/files/sgpLidarwind.c1.20110803.011252.cdf
>
> Thanks a lot
> Xiaoming
>
> _______________________________________________
> 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
Received on Mon Nov 4 18:14:19 2013

This archive was generated by hypermail 2.1.8 : Mon Nov 11 2013 - 09:45:33 MST