<div dir="ltr">Hi Setareh,<div>The array that you are plotting, AOD550_2D, is a scalar value. I do not believe that gsn_csm_contour_map can plot a single value. </div><div>The end of your script:</div><div>AOD550_3D = a2* ((400/550)^angstrom_exponent)<br> printVarSummary(AOD550_3D)<br>AOD550_2D = sum(AOD550_3D)<br> printVarSummary(AOD550_2D)<br>res@tiMainString = "WRF-CHEM (DUST_5) " + times(nt)<br>res@gsnLeftString = x@description<br>plot = gsn_csm_contour_map(wks,AOD550_2D,res)<br></div><div><br></div><div>Your AO550_3D array is dimensioned 35 x 40 x 40, but there is no coordinate variable information. I would suggest adding </div><div>copy_VarMeta(a2,AOD550_3D)<br></div><div>to copy metadata from your a2 array to AOD550_3D. To plot the spatial array, you will also need to read in the XLONG/XLAT arrays (which are 3D) and set them to lat1d/lon1d arrays attached as attributes:</div><div>AOD550_3D@lat2d = f->XLAT(nt,:,:)<br></div><div><div>AOD550_3D@lon2d = f->XLONG(nt,:,:)<br></div><div><br></div><div>Hope that gets you going down the right path. If you have any further questions, please respond to the ncl-talk email list.</div><div>Adam</div><div><br></div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Aug 10, 2022 at 3:58 PM Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Dear NCL users,</div><div><br></div><div>I need to plot aerosol optical depth(AOD) from WRF-chem outputs. I follow the structure( script attached), however,<div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;color:rgb(34,34,34);font-family:arial;font-style:normal;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/1-9zPQ-P6cmvrYs86CCeiNB-VU66Nuluw/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration:none;padding:1px 0px;border:none" aria-label="wrfout_d01_2010-07-14_00:00:00" target="_blank"><img style="vertical-align: bottom; border: none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="color:rgb(17,85,204);text-decoration:none;vertical-align:bottom">wrfout_d01_2010-07-14_00:00:00</span></a><img style="opacity: 0.55; float: right; display: none;"></div> the NCL returned this error:</div><div> <span style="background-color:rgb(255,217,102)">Error: scalar_field: If the input data is 1-dimensional, you must set sfXArray and sfYArray to 1-dimensional arrays of the same length.</span></div><div>My question is how can I set <span style="background-color:rgb(255,255,255)">sfXArray and sfYArray to 1-dimensional arrays of the same length, please?</span></div><div><span style="background-color:rgb(255,255,255)">Many thanks in advance,</span></div><div><span style="background-color:rgb(255,255,255)">Best wishes,<br></span></div><div>-- <br><div dir="ltr">S.Rahimi<br><br></div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div><div><span><font color="#888888">Adam Phillips <br></font></span></div><span><font color="#888888">Associate Scientist, </font></span><span><font color="#888888">Climate and Global Dynamics Laboratory, NCAR<br></font></span></div></div><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli/" target="_blank">www.cgd.ucar.edu/staff/asphilli/</a> </font></span><span><font color="#888888">303-497-1726 </font></span></div><span><font color="#888888"></font></span><div><div><span><font color="#888888"><br></font></span><div><span><font color="#888888"><a href="http://www.cgd.ucar.edu/staff/asphilli" target="_blank"></a></font></span></div></div></div></div></div></div></div></div></div></div></div>