<div dir="ltr"><div><div><div><div><div><div><div><div><div><div><br>I am sure if you looked at the error message, the function documentation and used a few 'printVarSummary' statements, you would find the error.<br><br><br>The error message is telling you exactly what the fatal error message is.<br><br>fatal:Number of dimensions in parameter (1) of (gsn_csm_vector_scalar_map) is (3), (2) dimensions were expected <br>fatal:["Execute.c":8128]:Execu<wbr>te: Error occurred at or near line 93 in file nldas_01.ncl<br><br></div><div>Did you look at line 93? <br></div><div><br>93 plot(1)=gsn_csm_vector_scalar_<wbr>map(wks,U,V,spd,vcres) ; create plot<br> <br>Did you look at the documentation?<br><br><a href="http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_vector_scalar_map.shtml">http://www.ncl.ucar.edu/Document/Graphics/Interfaces/gsn_csm_vector_scalar_map.shtml</a><br>=====================<br></div>U and V are 3D: (Time, south_north, west_east). <br><br>The function documentation clearly states that only 1D or 2D variables are allowed.<br><br></div><div>Further, the u and v are clearly protyped as 2D: [*][*]<br></div><div><pre>        function gsn_csm_vector_scalar_map (
                wks [1] : graphic,
                u [*][*] : numeric, <=== prototyped ad 2D
                v [*][*] : numeric,
                data [*][*] : numeric,
                res [1] : logical
        )
<font size="2">
</font></pre><font size="2">
<a name="Arguments"></a>
</font><h2><font size="2"><span style="font-weight:normal">Arguments</span></font><em></em>
<br></h2>
<em>u, v</em>
<p class="gmail-indent">The u and v data for the vector plot; must be two-dimensional.<====</p><p class="gmail-indent"><br></p><p class="gmail-indent">============<br></p></div>Above you use:<br><br> plot(0) = gsn_csm_contour_map(wks,U(0,:,<wbr>:),res) ; (0,:,:) is 2D<br> plot(1) = gsn_csm_contour_map(wks,V(0,:,<wbr>:),res)<br> gsn_panel(wks,plot,(/2,1/),<wbr>resP) ; now draw as one plot<br><br></div>There were no complaints because U(0,:,:) ireduces the 3D to 2D.<br><br></div>So the solutions is<br>93 plot(1)=gsn_csm_vector_scalar_<wbr>map(wks,U(0,:,:),V(0,:,:)<br><br>============<br><br></div>You have plotted variables from WRF before. You must know by now, that plots require, the lat2d/lon2d attributes for a variable to be plotted over a map.<br><br></div> lat2d = in->XLAT(0,:,:)<br></div> lon2d = in->XLONG(0,:,:)<br><br> PRC = in->RAINC<br> T = in->T2<br><br><br></div> PRC@lat2d = lat2d<br></div> PRC@lon2d = lon2d<br></div><div> T@lat2d = lat2d<br></div><div> T@lon2d = lon2d<br><br></div><div>Good luck<br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 20, 2016 at 2:09 AM, isakhar sakhar isakhar <span dir="ltr"><<a href="mailto:isakhar.inside13@gmail.com" target="_blank">isakhar.inside13@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Dear NCL Team<br><br>I took the file 'nldas_01.ncl' from NCL website '<a href="http://www.ncl.ucar.edu/Applications/nldas_gldas.shtml" target="_blank">http://www.ncl.ucar.edu/<wbr>Applications/nldas_gldas.shtml</a><wbr>' and use this file to plot variable RAINC, Temperature, Wind (U and V), Pressure and solar radiation (DNI,DHI and GHI) for my wrfout file and I get error as shown below:<br><br>warning:ContourPlotInitialize: scalar field is constant; ContourPlot not possible:[errno=1102]<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><br><br>fatal:Number of dimensions in parameter (1) of (gsn_csm_vector_scalar_map) is (3), (2) dimensions were expected <br>fatal:["Execute.c":8128]:<wbr>Execute: Error occurred at or near line 93 in file nldas_01.ncl<br><br><br><br>I know that before ask, I must try to solve this by myself but I can't. Here I attach my 'nldas_01.ncl' and NCDUMP file and some results of plotting.<br>I really appreciate for any help and suggestion.<br><br>Best regards,<br>Soares De Araujo<br><br><br></div>
<br>______________________________<wbr>_________________<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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/<wbr>mailman/listinfo/ncl-talk</a><br>
<br></blockquote></div><br></div>