<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't contain one at all.<br>(0) A valid latitude coordinate array should have a 'units' attribute equal 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>(0) check_for_lon_coord: Warning: Data either does not contain a valid longitude coordinate array or doesn't contain one at all.<br>(0) A valid longitude coordinate array should have a 'units' attribute equal to one of the following values: <br>(0) 'degrees_east' 'degrees-east' 'degree_east' 'degrees east' 'degrees_E' 'Degrees_east' 'degree_E' 'degreeE' 'degreesE' 'deg east'<br>warning:ContourPlotDraw: out of range coordinates encountered; standard AreaFill rendering method may be unreliable;<br> consider setting the resource trGridType to "TriangularMesh" 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&latitude@units="degrees_north"<br>; WM&longitude@units="degrees_east"<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:["Execute.c":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 "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl" <br>load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl" <br><br>begin<br><br><br>a = addfile ("<a href="http://w_jja.nc">w_jja.nc</a>", "r")<br><br>W = a->w/100<br><br>printVarSummary(W)<br>lat=a->latitude<br>lon=a->longitude<br>WM=dim_avg_n(W,0)/100<br><br>WM=lonFlip(WM)<br>WM!1="latitude"<br>WM!2="longitude"<br><br><br><br>; WM&latitude@units="degrees_north"<br>; WM&longitude@units="degrees_east"<br><br><br><br>printMinMax(WM(0,:,:),True)<br>printMinMax(WM(1,:,:),True)<br><br>;*********************************************************************<br> wks = gsn_open_wks ("png", "era_djf") ; open workstation <br> gsn_define_colormap (wks,"gui_default") ; choose color map<br> <br> res = True<br> res@gsnAddCyclic = False<br> res@mpProjection = "Mercator" ; 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 = "LatLon"<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 = "ManualLevels" ; 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>