<div dir="ltr">That attached was 'dry deposition flux', please ignore that, and have a look at the attached file.<div>Thanks,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 30, 2020 at 10:01 PM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com">setareh.rahimi@gmail.com</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">Dear Dennis,<div>This is something weird to me, too.I attached a plot of output model for the same date. Comparing  the plot with the value for that lat/lon, results do not match together. What is your idea?</div><div>Many thanks again,</div><div>Best wishes,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 30, 2020 at 7:09 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@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>????  <span style="background-color:rgb(255,255,255)">does not return t</span><span style="background-color:rgb(255,255,255)">he value of the emflx variable for the desired point (lat/lon)</span></div><div><span style="background-color:rgb(255,255,255)"><br></span></div><div><span style="background-color:rgb(255,255,255)">Well, what is the "correct value" ? <br></span></div><div><span style="background-color:rgb(255,255,255)">======<br></span></div><div><br></div><div>  lat = 32.0             <br>  lon = 52.0              <br>  </div><div>(0)        ==================</div>(0)       n=21   m=8   lat2d(n,m)=31.9429   lon2d(n,m)=51.921   <b><====This is the closest grid point ... pretty close!!!</b><br><div>(0)        ==================</div><div><br></div><div>(5)   605628   ymdh=2019010212<br>(6)  605634   ymdh=2019010218<br><b>(7)</b>       605640   ymdh=<b>2019010300    <===  NT=7</b><br>(8)  605646   ymdh=2019010306<br>(9)  605652   ymdh=2019010312<br></div><div><br></div><div>  <b>YMDH   = 2019010300 </b>            ; user specified<br>  print("YMDH="+YMDH)<br>  NT     = ind(ymdh .eq. YMDH)<br>  print("NT="+NT+" ymdh(NT)="+ymdh(NT) )</div><div><br></div><div><b>(0)        YMDH=2019010300<br>(0)    NT=7 ymdh(NT)=2019010300</b><br>(0) ==================<br></div><div><br></div><div>  EMFLX = f->emflx<br>  emflx = EMFLX(NT,n,m)           ; scalar<br>  print("==================")<br>  print( emflx )                 ;  ====</div><div><br></div><div>(0)      940.5043</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Dec 30, 2020 at 8:15 AM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com" target="_blank">setareh.rahimi@gmail.com</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">Dear Dennis,<div>Thanks again for your guide. However, after running the code I noticed  tha<span style="background-color:rgb(243,243,243)">t </span><span style="background-color:rgb(0,255,0)"> Y = f->emflx(NT,n,m)  </span><span style="background-color:rgb(255,255,255)"> does not return the value of the emflx variable for the desired point (lat/lon). </span></div><div><span style="background-color:rgb(255,255,255)">May I ask you please to give me more advice in this regard?</span></div><div><span style="background-color:rgb(255,255,255)">Best wishes,</span></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 29, 2020 at 3:22 AM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@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>I think we have been through this before. There are many <a href="https://www.ncl.ucar.edu/Document/Functions/date.shtml" target="_blank"><b>time/date functions.</b></a><br></div><div><br></div><div>   time  = f->time   ; hours since 1949-12-01 00:00:00 UTC" </div><div><div>; [1]<br></div><div>   TIME     = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/cd_calendar.shtml" target="_blank"><b>cd_calendar</b></a>(time, 0)      ; PLEASE read the documentation      <br>   year      = toint( TIME(:,0) )               ; toint strips meta data<br>   month   = toint( TIME(:,1) )<br>   day       = toint( TIME(:,2) )               ; day of month <br>   hour      = toint( TIME(:,3) )               ; hour of day</div><div>   minute  = toint( TIME(:,4) )   <br></div><div>   second  = toint( TIME(:,5) ) <br></div><div>  <br></div><div><br></div><div>;[2]  <br></div><div>  ymdh  =  <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/yyyymmddhh_time.shtml" target="_blank"><b>yyyymmddhh_time</b></a>(time, -3)   ; PLEASE read the documentation</div><div><br></div><div>  YMDH       = 2019010300</div><div>  nt        =<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/ind.shtml" target="_blank"><b> ind</b></a>(ymdh .eq. YMDH)</div>================================================================</div><div>A simple script is attached.<br></div><div>================================================================</div><div><br></div><div>%> ncl setareh.ncl</div><div><br></div><div>Please Look-at/READ the documentation of the functions used<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 28, 2020 at 3:04 PM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com" target="_blank">setareh.rahimi@gmail.com</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><br></div><div dir="auto">Dear Dennis,</div><div dir="auto">I am not looking for interpotation, temperature was just an example. Emflx is one of the varibles in the file. I need to know for say Jan-03-00:00UTC , what is the value of emflx for a specific point .</div><div dir="auto">Best wishes,<br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Tue, Dec 29, 2020 at 01:23 Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@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"><pre>As noted by Eshan, you want interpolation. <br>Please read the documentation for <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/rcm2points_Wrap.shtml" target="_blank"><b>rcm2points_Wrap</b></a><br><br>Note: Temperature is NOT in the file.<br></pre><pre><br>  f     = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml" target="_blank"><strong>addfile</strong></a>("<a href="http://Yazd-2019_DUST01.2019010100.nc" target="_blank">Yazd-2019_DUST01.2019010100.nc</a>" , "r")
  lat2d = f->xlat
  lon2d = f->xlon

  <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml" target="_blank"><strong>printVarSummary</strong></a>(lat2d)
  <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml" target="_blank"><strong>printMinMax</strong></a>(lat2d, 0)
  <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml" target="_blank"><strong>printMinMax</strong></a>(lon2d, 0)<br><br>  stalat = 32.0               ;(/  32.0 ,  17.31, 24.05   /)   ; user specified coordinate pairs
  stalon = 52.0               ; (/ 52.0 ,-101.00,-92.46   /)<br><br>  X = f->mixrat              ; (time, kz, iy, jx)<br>  Y = d->ddflx               ; (time, iy, jx)<br><br>  x = <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/rcm2points_Wrap.shtml" target="_blank"><b>rcm2points_Wrap</b></a>(lat2d, lon2d, X, stalat, stalon, 0)<br>  y = <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/rcm2points_Wrap.shtml" target="_blank"><b>rcm2points_Wrap</b></a>(lat2d, lon2d, Y, stalat, stalon, 0)<br><br></pre><pre>  print(x)<br></pre><pre>  print(y)<br></pre></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 28, 2020 at 12:10 PM Setareh Rahimi <<a href="mailto:setareh.rahimi@gmail.com" target="_blank">setareh.rahimi@gmail.com</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">Dear Dennis,<div>Many thanks for your response. What I exactly mean is how to extract for example "Temperature variable" value for a specific lat/lon from the output result. For example: what is temperature value for a point at (lat=32, lon 52)?</div><div>Thanks again</div><div>Best wishes </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 28, 2020 at 10:17 PM Dennis Shea <<a href="mailto:shea@ucar.edu" target="_blank">shea@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><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>A modification of Example 1</div><div><br></div><div><pre> f     = <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/addfile.shtml" target="_blank"><strong>addfile</strong></a>("<a href="http://Yazd-2019_DUST01.2019010100.nc" target="_blank">Yazd-2019_DUST01.2019010100.nc</a>" , "r")
  lat2d = f->xlat
  lon2d = f->xlon

  <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/printVarSummary.shtml" target="_blank"><strong>printVarSummary</strong></a>(lat2d)
  <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml" target="_blank"><strong>printMinMax</strong></a>(lat2d, 0)
  <a href="https://www.ncl.ucar.edu/Document/Functions/Contributed/printMinMax.shtml" target="_blank"><strong>printMinMax</strong></a>(lon2d, 0)

  lat   = (/  31.0 ,  17.31, 24.05   /)   ; user specified coordinate pairs
  lon   = (/ -86.45,-101.00,-92.46   /)
                                          ; return 2d subscripts
  nm = <strong>getind_latlon2d</strong> (lat2d,lon2d, lat, lon)

  <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/print.shtml" target="_blank"><strong>print</strong></a>(nm)<br><br></pre><pre>  X = f->mixrat              ; (time, kz, iy, jx)<br>  Y = d->ddflx               ; (time, iy, jx)<br><br></pre><pre>  nt =     .... the index some specified time<br></pre><pre>  kl =     ... index<br></pre><pre> do k=0,<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dimsizes.shtml" target="_blank"><strong>dimsizes</strong></a>(lat)-1
     n = nm(k,0)
     m = nm(k,1)<br></pre><pre>     x = X(nt,kl,n,m)<br>     y = Y(nt,n,m)<br></pre><pre>     <a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/print.shtml" target="_blank"><strong>print</strong></a>(lat2d(n,m)+"   "+lon2d(n,m)+"  "+x+"   "+y)
  end do<br><br></pre><pre>  <br></pre></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Dec 28, 2020 at 10:16 AM Setareh Rahimi via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">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">Dear all,<div><br></div><div>I need to extract data (it could be any variable like temperature, wind ...) for a specific point (say synoptic stations) at a specific day and time </div><div class="gmail_chip gmail_drive_chip" style="width:396px;height:18px;max-height:18px;background-color:rgb(245,245,245);padding:5px;font-family:arial;font-weight:bold;font-size:13px;border:1px solid rgb(221,221,221);line-height:1"><a href="https://drive.google.com/file/d/105vU4Hx2sRjvWlsmRBKOxa97kXp8Cx1_/view?usp=drive_web" style="display:inline-block;max-width:366px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-decoration-line:none;padding:1px 0px;border:medium none" target="_blank"><img style="vertical-align: bottom; border: medium none;" src="https://ssl.gstatic.com/docs/doclist/images/icon_10_generic_list.png"> <span dir="ltr" style="vertical-align:bottom;text-decoration:none">Yazd-2019_DUST01.2019010100.nc</span></a><img style="opacity: 0.55; float: right; display: none;"></div><div>( Jan-03- 00:00 UTC), from a model output (file attached).  I wonder how it could be achieved using NCL (any example...) .</div><div><br clear="all"><div>I appreciate any suggestion,</div><div>Best wishes,</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></blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</blockquote></div>
</blockquote></div></div>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr">S.Rahimi<br><br></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature">S.Rahimi<br><br></div>