<div dir="ltr"><div>Dear NCL Team</div><div><br></div><div>For the first question regarding modification to the code I did the attached changes (i.e. test1.ncl) though it shows the map where I intend to plot the data but still there is no data plotted. The I, j values in the csv I shared earlier and repeated here for convenience (zero_skipped.csv) correspond to the lat longs in the file (WRF_latlongs.xlsx). </div><div><br></div><div>For the second question regarding the usage of wrf_user_ij_ll when I try to use this function like the way in the attached file (lat_lons.ncl) I get a segmentation fault (core dumped) message. However, if I don't use the script and copy these values directly into the ncl interface instead of submitting it in the form a script I get the values printed out. Please note that the I,j values printed here correspond to the same lat longs as in the file (WRF_lotlongs.xlsx).</div><div><br></div><div>Regards </div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Tue, May 12, 2020 at 3:15 AM Dennis Shea <<a href="mailto:shea@ucar.edu">shea@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Actually, it is not quite clearer what you are looking for:</div><div><br></div><div>As indicated by Rick  <a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ij_to_ll.shtml" target="_blank"><b>wrf_user_ij_to_ll</b></a><br></div><div><br></div><div>other possibilities include the following very similar functions:<br></div><div><br></div><div><a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/region_ind.shtml" target="_blank"><b>region_ind</b></a> and  <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml" target="_blank"><b>getind_latlon2d</b></a></div><div><br></div><div>*You* must experiment. Please use print statements like <b>printVarSummary </b>while debugging.</div><div>The output from <b>printVarSummary </b>is for you to look at<b> </b>to examine variable type and shape, etc.<b><br></b></div><div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Sun, May 10, 2020 at 7:45 PM Rick Brownrigg via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Hi,</div><div><br></div><div>Please do not reply directly back to me, but rather to the group as a whole -- they provide a broader pool of expertise to draw upon.</div><div><br></div><div>I *think* wrf_user_ij_to_ll work() will do what you want, but it will likely require some experimentation. Liberal use of printVarSummary() is your best friend ;-)</div><div><br></div><div>Rick</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Sun, May 10, 2020 at 3:03 PM ali mughal <<a href="mailto:mughalali655@gmail.com" target="_blank">mughalali655@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid">Dear Rick <div><br></div><div>Thanks for the reply.</div><div><br></div><div>In continuation to my previous email, I asked that in the shared the first two columns represent I,j values of the WRF grid. If i have to evaluate 2m air temperature on the same I,j values will wrf_user_ij_to_ll work or do I need to use some other method.</div><div><br></div><div>Regards <br><br>On Sunday, May 10, 2020, Rick Brownrigg <<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div>Hi,</div><div><br></div><div>There are at least two problems. One is that str_get_field() returns strings, and so "data" in the call to gsn_csm_contour_map() is a string, and this is the source of the error message. Try adding these 3 lines:</div><div><br></div><div><div style="color:rgb(0,0,0);line-height:19px;font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-size:14px;font-weight:normal;white-space:pre-wrap;background-color:rgb(255,255,255)"><div><span style="color:rgb(0,0,0)">    lat := </span><span style="color:rgb(121,94,38)">stringtofloat</span><span style="color:rgb(0,0,0)">(lat)</span></div><div><span style="color:rgb(0,0,0)">    lon := </span><span style="color:rgb(121,94,38)">stringtofloat</span><span style="color:rgb(0,0,0)">(lon)</span></div><div><span style="color:rgb(0,0,0)">    data := </span><span style="color:rgb(121,94,38)">stringtofloat</span><span style="color:rgb(0,0,0)">(data)</span></div><div><span style="color:rgb(0,0,0)"><br></span></div><div><span style="color:rgb(0,0,0)"><font size="2"><font face="arial,sans-serif">The other problem is that the min/max bounds are inappropriate for the data -- I get a blank plot. If I used the true min/max I get a mostly centered over Siberia:</font></font></span></div><div><span style="color:rgb(0,0,0)"><font size="2"><font face="arial,sans-serif"><br></font></font></span></div><div><span style="color:rgb(0,0,0)"><font size="2"><font face="arial,sans-serif"></font></font></span><div style="color:rgb(0,0,0);line-height:19px;font-family:"Droid Sans Mono","monospace",monospace,"Droid Sans Fallback";font-size:14px;font-weight:normal;white-space:pre-wrap;background-color:rgb(255,255,255)"><div><span style="color:rgb(0,0,0)">  res@mpMinLatF                   = </span><span style="color:rgb(121,94,38)">min</span><span style="color:rgb(0,0,0)">(lat) </span><span style="color:rgb(0,128,0)">;-6.080154     ; range to zoom in on</span></div><div><span style="color:rgb(0,0,0)">  res@mpMaxLatF                   = </span><span style="color:rgb(121,94,38)">max</span><span style="color:rgb(0,0,0)">(lat) </span><span style="color:rgb(0,128,0)">;10.04061</span></div><div><span style="color:rgb(0,0,0)">  res@mpMinLonF                   = </span><span style="color:rgb(121,94,38)">min</span><span style="color:rgb(0,0,0)">(lon) </span><span style="color:rgb(0,128,0)">;95.908</span></div><div><span style="color:rgb(0,0,0)">  res@mpMaxLonF                   = </span><span style="color:rgb(121,94,38)">max</span><span style="color:rgb(0,0,0)">(lon) </span><span style="color:rgb(0,128,0)">;112.092</span></div><div><span style="color:rgb(0,128,0)"><br></span></div><div><span style="font-family:arial,sans-serif"><font size="2">Finally, the values for lat/lon in the file look suspect -- is this really a 1-degree grid? I might have guessed they are row/column values.</font></span></div><div><span style="font-family:arial,sans-serif"><font size="2"><br></font></span></div><div><span style="font-family:arial,sans-serif"><font size="2">Good luck,</font></span></div><div><span style="color:rgb(0,128,0)"><span style="color:rgb(0,0,0)"><span style="font-family:arial,sans-serif"><font size="2">Rick</font></span></span><br></span></div></div></div><div><span style="color:rgb(0,0,0)"><br></span></div></div></div></div><br><div class="gmail_quote"><div class="gmail_attr" dir="ltr">On Sun, May 10, 2020 at 2:23 AM ali mughal via ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;padding-left:1ex;border-left-color:rgb(204,204,204);border-left-width:1px;border-left-style:solid"><div dir="ltr"><div dir="ltr"><div>Dear Users </div><div><br></div><div>I have csv file attached with the data available at specific grids of the WRF outfile.Could any one help how to correct my attached code in NCL? </div><div><br></div><div>When I try to run the code, I get the following error message</div><div><br></div><div>(0)     This file has 4825 rows and 3 columns.<br>fatal:Argument type mismatch on argument (1) of (gsn_csm_contour_map) can not coerce<br>fatal:["Execute.c":8578]:Execute: Error occurred at or near line 64 in file test_1.ncl<br><br></div><div><br></div><div>Later I want to use the same code to be modified to calculate 2m air temperature at the same I J grids. </div><div><br></div><div>Regards </div></div></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" rel="noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>
</blockquote></div>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank" rel="noreferrer">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>
</blockquote></div>