<div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Hi..</div><div><br></div><div>I am trying to plot Time vs Depth section at one location(Buoy data). I see the time axis is not monotonic, and hence there are gaps along time axis. I understood that NCL can't support the non-monotonic data. Following is my script and the related errors. What could be the solution to handle this kind of data?<br></div><div><br></div><div>***********SCRIPT********<br></div><div>load "$NCARG_ROOT/lib/ncarg/nclscripts/wrf/WRF_contributed.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/contrib/time_axis_labels.ncl"<br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"<br><br>f = addfile("AD06_TS_merged.nc","r")<br>;print(f)<br><br>;------------Read Variables<br> t = f->temp<br> t_reorder = t(zax|:,time|:,latitude|:,longitude|:)<br> ;printVarSummary(t_reorder)<br><br> times = f->time(978:1011)<br> ;print(times)<br><br>;-----------Convert a mixed Julian/Gregorian date to a UT-referenced date <br> utc_date =  cd_calendar(times, 0)<br> year     =  tointeger(utc_date(:,0))<br> month    =  tointeger(utc_date(:,1))<br> day      =  tointeger(utc_date(:,2))<br> date_str =  sprinti("%0.4i-",year)+sprinti("%0.2i-", month) + \<br>            sprinti("%0.2i", day);+sprinti("%0.2i", hour)<br> ;print(utc_date)<br> ;print(date_str)<br><br>wks = gsn_open_wks("png","timeDepthSection_AD06")<br><br>  res                                    = True <br>  res@gsnAddCyclic             = False<br>  res@cnFillOn                     = True <br>  res@gsnMaximize              = True <br>  res@gsnYAxisIrregular2Linear =  True    <br>  res@trYReverse               =  True </div><div><br>  res@vpWidthF                 = 0.65 <br>  res@vpHeightF                = 0.3<br>  res@tmXTOn                   = False<br>  ;res@tmYLFormat             = "f" ; ; remove trailing ".0" <br><br>;---First method to label X-axis(Time axis)<br>  ;res@tmXBMode            = "Explicit"<br>  ;res@tmXBValues          = times(::4)<br>  ;res@tmXBLabels          = date_str(::4)<br><br>;----Second method to label X-axis(Time axis) <br>  restick                 = True <br>  restick@ttmFormat       = "%D/%c/%Y"<br>  time_axis_labels(times,res,restick)<br><br>plot = gsn_csm_contour(wks,t_reorder(:,:,0,0),res)<br></div><div><br></div><div>*********ERROR MESSAGE*********</div><div>warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value<br>warning:IrTransInitialize: error creating spline approximation for trXCoordPoints; defaulting to linear<br>warning:_NhlCreateSplineCoordApprox: Attempt to create spline approximation for X axis failed: consider adjusting trXTensionF value<br>warning:IrTransInitialize: error creating spline approximation for trXCoordPoints; defaulting to linear<br><br></div><div><u><b>This is how my data looks like:</b></u></div><div>Variable: f<br>Type: file<br>filename:    AD06_TS_merged<br>path:    AD06_TS_merged.nc<br><br>dimensions:<br>    latitude    = 1<br>    longitude    = 1<br>    time    = 1172 // unlimited<br>    zax    = 10<br><br>chunk dimensions:<br>    latitude    = 1<br>    longitude    = 1<br>    time    = 1<br>    zax    = 10<br><br>variables:<br>    Variable: latitude<br>    Type: double<br>    Total Size: 1 values<br>                8 bytes<br>    Number of Dimensions: 1<br>    Dimensions and sizes:    [ 1 <latitude> ]<br>    Coordinates:<br>                latitude: [18.48129..18.48129]<br>        Number of Attributes:        2<br>            long_name    :     latitude<br>            units    :     degrees_north<br><br>    Variable: longitude<br>    Type: double<br>    Total Size: 1 values<br>                8 bytes<br>    Number of Dimensions: 1<br>    Dimensions and sizes:    [ 1 <longitude> ]<br>    Coordinates:<br>                longitude: [67.48334..67.48334]<br>        Number of Attributes:        2<br>            long_name    :     longitude<br>            units    :     degrees_east<br><br>    Variable: time<br>    Type: double<br>    Total Size: 1172 values<br>                9376 bytes<br>    Number of Dimensions: 1<br>    Dimensions and sizes:    [ 1172 <time | unlimited> ]<br>    Chunking Info:    [ 512 <time> ]<br>    Coordinates:<br>                time: [42573..42732.12]<br>        Number of Attributes:        3<br>            units    :     days since 1900-12-31 00:00:00<br>            time_step_setting    :     auto<br>            time_step    :        0<br><br>    Variable: zax<br>    Type: double<br>    Total Size: 10 values<br>                80 bytes<br>    Number of Dimensions: 1<br>    Dimensions and sizes:    [ 10 <zax> ]<br>    Coordinates:<br>                zax: [ 1..500]<br>        Number of Attributes:        1<br>            positive    :     down<br><br>    Variable: temp<br>    Type: double<br>    Total Size: 11720 values<br>                93760 bytes<br>    Number of Dimensions: 4<br>    Dimensions and sizes:    [ 1172 <time | unlimited> x 10 <zax> x 1 <latitude> x 1 <longitude> ]<br>    Chunking Info:    [ 1 <time> x 10 <zax> x 1 <latitude> x 1 <longitude> ]<br>    Coordinates:<br>                time: [42573..42732.12]<br>                zax: [ 1..500]<br>                latitude: [18.48129..18.48129]<br>                longitude: [67.48334..67.48334]<br>        Number of Attributes:        1<br>            _FillValue    :     -9999<br><br>    Variable: salt<br>    Type: double<br>    Total Size: 11720 values<br>                93760 bytes<br>    Number of Dimensions: 4<br>    Dimensions and sizes:    [ 1172 <time | unlimited> x 10 <zax> x 1 <latitude> x 1 <longitude> ]<br>    Chunking Info:    [ 1 <time> x 10 <zax> x 1 <latitude> x 1 <longitude> ]<br>    Coordinates:<br>                time: [42573..42732.12]<br>                zax: [ 1..500]<br>                latitude: [18.48129..18.48129]<br>                longitude: [67.48334..67.48334]<br>        Number of Attributes:        1<br>            _FillValue    :     -9999<br></div><div><br></div><div><u><b>Print time</b></u><br></div><div>Variable: times<br>Type: double<br>Total Size: 272 bytes<br>            34 values<br>Number of Dimensions: 1<br>Dimensions and sizes:    [time | 34]<br>Coordinates: <br>            time: [42704..42708.75]<br>Number Of Attributes: 3<br>  units :    days since 1900-12-31 00:00:00<br>  time_step_setting :    auto<br>  time_step :       0<br>(0)    42704<br>(1)    42704.125<br>(2)    42704.25<br>(3)    42704.375<br>(4)    42704.5<br>(5)    42704.625<br>(6)    42704.75<br>(7)    42704.875<br>(8)    42705<br>(9)    42705.125<br>(10)    42705.25<br>(11)    42705.375<br>(12)    42705.625<br>(13)    42705.875<br>(14)    42706<br>(15)    42706.125<br>(16)    42706.25<br>(17)    42706.375<br>(18)    42706.5<br>(19)    42706.625<br>(20)    42707<br>(21)    42707.125<br>(22)    42707.25<br>(23)    42707.5<br>(24)    42707.625<br>(25)    42707.75<br>(26)    42707.875<br>(27)    42708<br>(28)    42708.125<br>(29)    42708.25<br>(30)    42708.375<br>(31)    42708.5<br>(32)    42708.625<br>(33)    42708.75<br></div><div><br></div><div><u><b>print variableVariable: t_reorder<br></b></u>Type: double<br>Total Size: 93760 bytes<br>            11720 values<br>Number of Dimensions: 4<br>Dimensions and sizes:    [zax | 10] x [time | 1172] x [latitude | 1] x [longitude | 1]<br>Coordinates: <br>            zax: [   1.. 500]<br>            time: [42573..42732.125]<br>            latitude: [18.481293..18.481293]<br>            longitude: [67.48333700000001..67.48333700000001]<br>Number Of Attributes: 1<br>  _FillValue :    -9999<u><b><br><br></b></u></div><div><u><b></b></u><br></div></div></div></div></div></div></div>