<div dir="ltr"><div><div><div><div><div><div><br><br></div>Hi all,<br><br></div>Why i still getting this troubles : <br><br>Variable: W<br>Type: integer<br>Total Size: 13881600 bytes<br>            3470400 values<br>Number of Dimensions: 4<br>Dimensions and sizes:   [15] x [2] x [241] x [480] <span style="color:rgb(255,255,255)"><span style="background-color:rgb(255,0,0)">(Time,Le<span style="background-color:rgb(255,255,255)"><span style></span></span>vels,Latitude,Longitude)</span></span><br>Coordinates: <br>Number Of Attributes: 1<br>  _FillValue :  -32767<br>warning:Dimension (2) has not been defined<br>(0)     lonFlip: warning: last dimension is not named<br>(0)      <br>(0)     min=-2.01933   max=1.308<br>(0)      <br>(0)     min=-2.44533   max=2.15867<br>(0)     check_for_y_lat_coord: Warning: Data either does not contain a valid latitude coordinate array or doesn&#39;t contain one at all.<br>(0)     A valid latitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: <br>(0)         &#39;degrees_north&#39; &#39;degrees-north&#39; &#39;degree_north&#39; &#39;degrees north&#39; &#39;degrees_N&#39; &#39;Degrees_north&#39; &#39;degree_N&#39; &#39;degreeN&#39; &#39;degreesN&#39; &#39;deg north&#39;<br>(0)     check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn&#39;t contain one at all.<br>(0)     A valid longitude coordinate array should have a &#39;units&#39; attribute equal to one of the following values: <br>(0)         &#39;degrees_east&#39; &#39;degrees-east&#39; &#39;degree_east&#39; &#39;degrees east&#39; &#39;degrees_E&#39; &#39;Degrees_east&#39; &#39;degree_E&#39; &#39;degreeE&#39; &#39;degreesE&#39; &#39;deg east&#39;<br>warning:ContourPlotDraw: out of range coordinates encountered; standard AreaFill rendering method may be unreliable;<br> consider setting the resource trGridType to &quot;TriangularMesh&quot; if coordinates contain missing values<br><br></div>here is my script : <br></div>I want to plot a temporal average of W variable in one of levels , When i turn one <br>;   WM&amp;latitude@units=&quot;degrees_north&quot;<br>;   WM&amp;longitude@units=&quot;degrees_east&quot;<br></div>I get this :  <br>warning:Dimension (2) has not been defined<br>(0)     lonFlip: warning: last dimension is not named<br>fatal:No coordinate variable exists for dimension (latitude) in variable (WM)<br>fatal:(latitude) is not coordinate variable in variable(WM).<br>fatal:[&quot;Execute.c&quot;:8578]:Execute: Error occurred at or near line 26 in file read_w.ncl <br><br></div>I am using global ERA-INTERIM Reanalysis. <br><div><br><div><br><div>;***************************************************************************<br>; era_1.ncl<br>;<br>;***************************************************************************<br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl&quot;  <br>load &quot;$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl&quot;  <br><br>begin<br><br><br>a = addfile (&quot;<a href="http://w_jja.nc">w_jja.nc</a>&quot;, &quot;r&quot;)<br><br>W = a-&gt;w/100<br><br>printVarSummary(W)<br>lat=a-&gt;latitude<br>lon=a-&gt;longitude<br>WM=dim_avg_n(W,0)/100<br><br>WM=lonFlip(WM)<br>WM!1=&quot;latitude&quot;<br>WM!2=&quot;longitude&quot;<br><br><br><br>;   WM&amp;latitude@units=&quot;degrees_north&quot;<br>;   WM&amp;longitude@units=&quot;degrees_east&quot;<br><br><br><br>printMinMax(WM(0,:,:),True)<br>printMinMax(WM(1,:,:),True)<br><br>;*********************************************************************<br>  wks  = gsn_open_wks (&quot;png&quot;, &quot;era_djf&quot;)          ; open workstation  <br>  gsn_define_colormap (wks,&quot;gui_default&quot;)         ; choose color map<br>  <br>  res                   = True<br>  res@gsnAddCyclic = False<br>  res@mpProjection      = &quot;Mercator&quot;       ; choose projection<br>  res@mpGridAndLimbOn   = True             ; turn on lat/lon lines<br>  res@mpPerimOn         = False             ; turn off box around plot<br>  res@mpFillOn          = False<br>  res@cnLinesOn         = False <br>  res@mpOutlineOn       = True<br>  res@cnFillOn          = True              ; color plot desired<br>  res@cnLineLabelsOn    = False             ; turn off contour lines<br>   res@mpLimitMode  = &quot;LatLon&quot;<br>   res@mpMinLatF            = 15  ;5.0<br>    res@mpMaxLatF           =  85  ;35.0 <br>    res@mpMinLonF           = -180 ;105<br>    res@mpMaxLonF           = -50 ;140<br><br> res@cnLevelSelectionMode = &quot;ManualLevels&quot;  ; manual contour levels<br>  res@cnMinLevelValF       = -1           ; min level<br>  res@cnMaxLevelValF       =  0           ; max level<br>  res@cnLevelSpacingF      =  0.1           ; interval<br><br>  res@cnFillOn             = True            ; turn on color<br><br><br><br>  plot = gsn_csm_contour_map(wks,W(2,0,:,:),res)                 ; Draw original grid on map<br><br>end<br><br><div><br><br clear="all"><div><div><br clear="all"><br>-- <br><div class="gmail_signature"><div dir="ltr"><div>------------------------------</div>Cordialement,<br>Best regards,<br>Rabah Hachelaf <br></div></div>
</div></div></div></div></div></div></div>