<html><head></head><body><div class="ydp75cc1033yahoo-style-wrap" style="font-family: Helvetica Neue, Helvetica, Arial, sans-serif; font-size: 13px;"><span>Hello,<br>All the script samples I use for WRF output plot several fields in a loop. I would like to plot just one variable at any given time step and a given level.<br>With my script below, my T is T(T,L,L,L), i.e. T(Time,Level, Lat,Lon)=T(17,31,60,69).<br>When I run the code below I get a plot, but alos the error:<br> The use of this software is governed by a License Agreement.<br> See http://www.ncl.ucar.edu/ for more details.<br>(0) check_for_y_lat_coord: Warning: Data either does not contain<br>(0) a valid latitude coordinate array or doesn't contain one at all.<br>(0) A valid latitude coordinate array should have a 'units'<br>(0) 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<br>(0) a valid longitude coordinate array or doesn't contain one at all.<br>(0) A valid longitude coordinate array should have a 'units'<br>(0) 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><br>I have seen a number of posts on ncl-talk on this error, but I do not understand the solutions given.<br>When I put the following code after addfile<br><br>[code]; lat = f->XLAT ; get lat from the file<br> lon = f->XLONG ; get lon from the file<br><br> t!0 = "time" ; dimension 0 for t is time<br> dimension 1 for t is level<br> t!2 = "lat" ; dimension 2 for t is lat<br> t!3 = "lon" ; dimension 3 for t is lon<br><br> t2@units = "degrees_north"<br> t2@units = "degrees_east"<br>[/code]<br>I get the error:<br>fatal:Variable (t) has (2) dimensions can not write to dimension (2)<br>fatal:["Execute.c":8637]:Execute: Error occurred at or near line 16 in file contplot1.ncl<br><br>My main code is below.<br>In addition I get titles which I do not know where they come from ("perturbation potential temperature ()" above the figure, and "contour from -6 to 24 by 2" below)<br><br>I hope someone can assist me.<br>Zilore Mumba<br>[code]<br> begin<br> f= addfile("/home/zmumba/Rwanda_Radar_Proj/Training_Materials/Data/wrfout_d01_2017-04-18_00:00:00.nc", "r")<br><br> t = f->T(0,0,:,:)<br><br> wks = gsn_open_wks("png","firstcontplot")<br> res = True<br> res@tiMainString = "NCL plot in 5 steps"<br> res@mpFillOn = False ; turn off gray fill<br> res@mpOutlineBoundarySets = "National" ; turn on country boundaries<br>; res@mpGeophysicalLineColor = "Navy" ; color of cont. outlines<br>; res@mpGeophysicalLineThicknessF = 1.5 ; thickness of outlines<br>; res@mpNationalLineColor = "Black"<br> res@mpNationalLineThicknessF = 2.5 ; turn on country boundaries<br><br> res@mpDataBaseVersion = "MediumRes" ; choose higher resolution<br> res@mpDataSetName = "Earth..4" ; choose most recent boundaries<br><br> res@mpMaxLatF = -8 ; choose a subregion<br> res@mpMinLatF = -18<br> res@mpMaxLonF = 34<br> res@mpMinLonF = 21<br><br> plot = gsn_csm_contour_map(wks, t, res)<br><br> end<br><br>[/code]</span></div></body></html>