<div dir="ltr">Guigma,<br><br>You are calling <b>gsn_csm_lat_time</b>, which expects your variable to be ordered lat x time. <div class="gmail_default" style="font-size:small;display:inline">​Your variable is ordered time x lat, so you need to call <b>gsn_csm_time_lat</b>.</div><div><div class="gmail_default" style="font-size:small;display:inline"><br></div></div><div><div class="gmail_default" style="font-size:small;display:inline">You should *always* look at your variables with printVarSummary before you try to plot them, to make sure they have the correct dimensions.  Here's what</div> printVarSummary(x_regrid_sj)<div class="gmail_default" style="font-size:small;display:inline">​ produces:​</div></div><div><div><br></div><div><div>Variable: x_regrid_SJ</div><div>Type: float</div><div>Total Size: 8096 bytes</div><div>            2024 values</div><div>Number of Dimensions: 2</div><div>Dimensions and sizes:<span style="white-space:pre">      </span>[time | 92] x [lat | 22]</div><div>Coordinates: </div><div>            time: [1996.748657226562..1996.997314453125]</div><div>            lat: [21..0]</div><div>Number Of Attributes: 8</div><div>  _FillValue :<span style="white-space:pre">  </span>-99999</div><div>  standard_name :<span style="white-space:pre">      </span>precipitation</div><div>  long_name :<span style="white-space:pre">   </span>precipitation</div><div>  units :<span style="white-space:pre">       </span>mm/day</div><div>  dataset :<span style="white-space:pre">    </span>GPCP 1DD V1.2 Combined Data Sets</div><div>  runave_op_ncl :<span style="white-space:pre">    </span>runave_n: nave=10</div><div>  average_op_ncl :<span style="white-space:pre">  </span>dim_avg_n over dimension(s): lon</div><div>  missing_value :<span style="white-space:pre">    </span>-99999</div><div>(0)<span style="white-space:pre">     </span>Latitude (degrees_north) : min=0   max=21</div><div><br></div><div><br>If you want lat on the Y axis, then you need to transpose the array before you call <b>gsn_csm_lat_time</b>:<br><br>plot=gsn_csm_lat_time(wks, transpose(x_regrid_SJ), res)<br><br><div class="gmail_default" style="font-size:small">​Second, the following two lines should be removed, beca​use both gsn_csm_lat_time and gsn_csm_time_lat will automatically check x_regrid_SJ for coordinate arrays:</div><br>res@sfXArray =x_regrid_SJ&lat<br><br>res@sfYArray =x_regrid_SJ&time<br><br><br><div class="gmail_default" style="font-size:small">​--Mary</div><div class="gmail_default" style="font-size:small">​</div><br><br><br>On Fri, Dec 15, 2017 at 5:17 AM, Kiswendsida Hyacinthe GUIGMA <<a href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>> wrote:<br>><br>> Hi!<br>> I am trying to make a time-latitude plot of rainfall using NCL. From a NetCDF that covers the region comprise between 0-20N and 10W-10E, I averaged over the longitudes and so my data became 2D (time,lat). As my original data are from GPCP where coordinates are n.5,(n+1).5 ... while me I want my data on n, n+1 ... I interpolated grids using linint1_n_Wrap function. But the problem is when I use the gsn_csm_lat_time function to plot I first got this error:<br>> 1-<br>> (0)     check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn't contain one at all.<br>> (0)     A valid latitude coordinate array should have a 'units' attribute equal<br>> to one of the following values:<br>> (0)         'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br>> warning:cnFillPalette is not a valid resource in time_lat1996_contour at this time<br>> (0)     get_lat_values: Warning: Your latitude values do not fall between -90 and 90 inclusive.<br>> (0)     You will not get 'nice' latitude labels.<br>><br>> Then after reading answers to similar problems in NCL-TALK I modified my code to include sfXArray and sfYArray and also to have exactly the same MetaData as in the original file for the latitude coordinate. Then the error changed a bit and become:<br>> 2-<br>> (0)     get_lat_values: Warning: Your latitude values do not fall between -90 and 90 inclusive.<br>> (0)     You will not get 'nice' latitude labels.<br>><br>> In addition to that, the plot doesn't fit completely with the window (see attached).<br>><br>> Attached below: my code, the plot I got and the data I used.<br>><br>> Your help is well appreciated.<br>><br>>  <br>> -----------------------------<br>> GUIGMA<br>><br>> _______________________________________________<br>> ncl-talk mailing list<br>> <a href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br>> List instructions, subscriber options, unsubscribe:<br>> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>><br></div></div></div></div>