<html><head></head><body><div style="color:#000; background-color:#fff; font-family:verdana, helvetica, sans-serif;font-size:16px"><div id="yui_3_16_0_ym19_1_1513624048104_3491">Many thanks for your help. Actually I was using <b id="yui_3_16_0_ym19_1_1513624048104_3300">gsn_csm_lat_time</b> while in my mind I was using <b id="yui_3_16_0_ym19_1_1513624048104_3377">gsn_csm_time_lat</b>. And also my graphics were not nice because I had some missing values coming from the running average and the linear interpolation. I removed them and all is fine now.</div><div id="yui_3_16_0_ym19_1_1513624048104_3492">Thank you!<br></div><div id="yui_3_16_0_ym19_1_1513624048104_3204"><span></span></div><div id="yui_3_16_0_ym19_1_1513624048104_3301"> </div><div id="yui_3_16_0_ym19_1_1513624048104_3493" class="signature">-----------------------------<br>GUIGMA</div> <div class="qtdSeparateBR"><br><br></div><div style="display: block;" class="yahoo_quoted"> <div style="font-family: verdana, helvetica, sans-serif; font-size: 16px;"> <div style="font-family: HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, Sans-Serif; font-size: 16px;"> <div dir="ltr"><font size="2" face="Arial"> On Friday, 15 December 2017, 16:48, Mary Haley <haley@ucar.edu> wrote:<br></font></div>  <br><br> <div class="y_msg_container"><div id="yiv2840876510"><div><div dir="ltr">Guigma,<br clear="none"><br clear="none">You are calling <b>gsn_csm_lat_time</b>, which expects your variable to be ordered lat x time. <div class="yiv2840876510gmail_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="yiv2840876510gmail_default" style="font-size:small;display:inline;"><br clear="none"></div></div><div><div class="yiv2840876510gmail_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="yiv2840876510gmail_default" style="font-size:small;display:inline;">​ produces:​</div></div><div><div><br clear="none"></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 clear="none"></div><div><br clear="none">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 clear="none"><br clear="none">plot=gsn_csm_lat_time(wks, transpose(x_regrid_SJ), res)<br clear="none"><br clear="none"><div class="yiv2840876510gmail_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 clear="none">res@sfXArray =x_regrid_SJ&lat<br clear="none"><br clear="none">res@sfYArray =x_regrid_SJ&time<br clear="none"><br clear="none"><br clear="none"><div class="yiv2840876510gmail_default" style="font-size:small;">​--Mary</div><div class="yiv2840876510gmail_default" style="font-size:small;">​</div><br clear="none"><br clear="none"><div class="yiv2840876510yqt7325565475" id="yiv2840876510yqtfd94701"><br clear="none">On Fri, Dec 15, 2017 at 5:17 AM, Kiswendsida Hyacinthe GUIGMA <<a rel="nofollow" shape="rect" ymailto="mailto:karongseba@gmail.com" target="_blank" href="mailto:karongseba@gmail.com">karongseba@gmail.com</a>> wrote:<br clear="none">><br clear="none">> Hi!<br clear="none">> 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 clear="none">> 1-<br clear="none">> (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 clear="none">> (0)     A valid latitude coordinate array should have a 'units' attribute equal<br clear="none">> to one of the following values:<br clear="none">> (0)         'degrees_north' 'degrees-north' 'degree_north' 'degrees north' 'degrees_N' 'Degrees_north' 'degree_N' 'degreeN' 'degreesN' 'deg north'<br clear="none">> warning:cnFillPalette is not a valid resource in time_lat1996_contour at this time<br clear="none">> (0)     get_lat_values: Warning: Your latitude values do not fall between -90 and 90 inclusive.<br clear="none">> (0)     You will not get 'nice' latitude labels.<br clear="none">><br clear="none">> 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 clear="none">> 2-<br clear="none">> (0)     get_lat_values: Warning: Your latitude values do not fall between -90 and 90 inclusive.<br clear="none">> (0)     You will not get 'nice' latitude labels.<br clear="none">><br clear="none">> In addition to that, the plot doesn't fit completely with the window (see attached).<br clear="none">><br clear="none">> Attached below: my code, the plot I got and the data I used.<br clear="none">><br clear="none">> Your help is well appreciated.<br clear="none">><br clear="none">>  <br clear="none">> -----------------------------<br clear="none">> GUIGMA</div><br clear="none">><br clear="none">> _______________________________________________<br clear="none">> ncl-talk mailing list<br clear="none">> <a rel="nofollow" shape="rect" ymailto="mailto:ncl-talk@ucar.edu" target="_blank" href="mailto:ncl-talk@ucar.edu">ncl-talk@ucar.edu</a><br clear="none">> List instructions, subscriber options, unsubscribe:<br clear="none">> <a rel="nofollow" shape="rect" target="_blank" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><div class="yiv2840876510yqt7325565475" id="yiv2840876510yqtfd27240"><br clear="none">><br clear="none"></div></div></div></div></div></div></div><br><br></div>  </div> </div>  </div></div></body></html>