<div dir="ltr"><div><br></div><div>Since WRF grid is a 2D grid (i.e. curvilinear grid), you would need to use special sub-setting function/s. See example 2 on the following page:</div><div><a href="https://www.ncl.ucar.edu/Applications/latlon_subset.shtml">https://www.ncl.ucar.edu/Applications/latlon_subset.shtml</a> </div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Apr 20, 2020 at 4:57 AM zilore mumba via ncl-talk <<a href="mailto:ncl-talk@ucar.edu">ncl-talk@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><div style="font-family:Helvetica Neue,Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div dir="ltr"><div>Thanks I have looked at examples of<a shape="rect" href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml" rel="nofollow" target="_blank"> wrf_user_ll_to_ij,</a> It does not help. Let me clarify two things</div><div dir="ltr">1. I used tc just to test that I can at least access tc, but that syntax does not give me tc at a specific location.</div><div dir="ltr">2. When I talk of a specific location, I do not need interpolation. I know WRF will give me the value at the nearest grid location. That is enough for me. My core problem is: how do I put it to get one value, instead of the whole grid?<br></div><div><div><br></div><div id="gmail-m_8939608065114109902ydp5782d9ebenhancr_card_7921417725" style="max-width:400px;font-family:YahooSans,Helvetica Neue,Segoe UI,Helvetica,Arial,sans-serif"><a href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml" style="text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;color:rgb(0,0,0)" rel="nofollow" target="_blank"><table style="max-width:400px" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td width="400"><table style="max-width:400px;border-width:1px;border-style:solid;border-color:rgb(224,228,233);border-radius:2px" width="100%" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td><table style="background-color:rgb(255,255,255);background-repeat:repeat;background-image:none;background-size:auto;width:100%;max-width:400px;border-radius:0px 0px 2px 2px;border-top:1px solid rgb(224,228,233)" cellspacing="0" cellpadding="0" border="0"><tbody><tr><td style="background-color:rgb(255,255,255);padding:16px 0px 16px 12px;vertical-align:top;border-radius:0px 0px 0px 2px"></td><td style="vertical-align:middle;padding:12px 24px 16px 12px;width:99%;font-family:YahooSans,Helvetica Neue,Segoe UI,Helvetica,Arial,sans-serif;border-radius:0px 0px 2px"><h2 style="font-size:14px;line-height:19px;margin:0px 0px 6px;font-family:YahooSans,Helvetica Neue,Segoe UI,Helvetica,Arial,sans-serif;color:rgb(38,40,42);max-width:314px">wrf_user_ll_to_ij</h2><p style="font-size:12px;line-height:16px;margin:0px;color:rgb(151,155,167)">NCL WRFUserARW.ncl functions (lat/lon functions)</p></td></tr></tbody></table></td></tr></tbody></table></td></tr></tbody></table></a></div><div><br></div><div><br></div><div><br clear="none"><br></div></div><div><br></div></div><div><br></div>
        
        </div><div id="gmail-m_8939608065114109902yahoo_quoted_8089744496">
            <div style="font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Monday, April 20, 2020, 12:02:28 PM GMT+2, Barry Lynn <<a href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:
                </div>
                <div><br></div>
                <div><br></div>
                <div><div id="gmail-m_8939608065114109902yiv9247688265"><div><div dir="ltr">If you know when these values occur within the time series, then you can index them quite easily.<div><br clear="none"></div><div>Why don't you use wrf_user_getvar and then the wrf interpolation program.</div><div><br clear="none"></div><div>If you want them at a specific point, I think you know how to do this.  There is also a get location program</div><div><br clear="none"></div><div><a rel="nofollow" shape="rect" href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_ll_to_ij.shtml</a><br clear="none"></div><div><br clear="none"></div><div>Barry</div></div><br clear="none"><div id="gmail-m_8939608065114109902yiv9247688265yqt14476"><div><div dir="ltr">On Mon, Apr 20, 2020 at 11:55 AM zilore mumba <<a rel="nofollow" shape="rect" href="mailto:zmumba@yahoo.com" target="_blank">zmumba@yahoo.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div dir="ltr">Barry,</div><div dir="ltr">My intention is to have RH and U, V time series. That's what I had in mind when I put 48. T2 only has time, lon ,lat. I have several daily output files, and I want an n-day series of 48 hour forecasts of T2<br clear="none"></div><div><br clear="none"></div>
        
        </div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yahoo_quoted_7414550499">
            <div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Monday, April 20, 2020, 8:00:41 AM GMT+2, Barry Lynn <<a rel="nofollow" shape="rect" href="mailto:barry.h.lynn@gmail.com" target="_blank">barry.h.lynn@gmail.com</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708"><div><div dir="ltr">Zilore:<div><br clear="none"></div><div>T2 is a three dimensional variable.  Also, T2 is the two meter temperature. </div><div><br clear="none"></div><div>You want tc or tk (see: <a rel="nofollow" shape="rect" href="https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml" target="_blank">https://www.ncl.ucar.edu/Document/Functions/WRF_arw/wrf_user_getvar.shtml</a>).</div><div><br clear="none"></div><div>Could you please explain how you are interpolating to 850 mb?  There is a WRF program to do this, and I am not sure how the indexing you are using works. How are you indexing the 48 time slot?  WRF has a program to list times, and you can match the time you want to the listed times to find the index.</div><div><br clear="none"></div><div>Barry</div></div><br clear="none"><div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708yqt65000"><div dir="ltr">On Mon, Apr 20, 2020 at 8:17 AM zilore mumba via ncl-talk <<a rel="nofollow" shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div dir="ltr">Sorry Rick I put in a surface variable T2 which only 3 coordinates, so I put <span>"x = a[:]->T2(0,{-15},{30})"</span>. Now I am getting error of coordinates west-east and south-north <span>not having  associated coordinate variables. I have seen this error before. I will find out how to get out of it </span><br clear="none"></div><div><br clear="none"></div>
        
        </div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yahoo_quoted_7471934217">
            <div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Sunday, April 19, 2020, 11:53:33 PM GMT+2, Rick Brownrigg <<a rel="nofollow" shape="rect" href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807"><div><div dir="ltr"><div>Perhaps do a printVarSummary(a[0]->T2)  ; it sounds like its not the shape you think it might/should be; i.e. 3D vs 4D</div><div><br clear="none"></div><div><br clear="none"></div></div><br clear="none"><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807yqt33899"><div><div dir="ltr">On Sun, Apr 19, 2020 at 3:29 PM zilore mumba <<a rel="nofollow" shape="rect" href="mailto:zmumba@yahoo.com" target="_blank">zmumba@yahoo.com</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div><br clear="none"></div><div><br clear="none"></div>
        
        </div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807gmail-m_4060975555631802753yahoo_quoted_7983023808">
            <div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Sunday, April 19, 2020, 11:27:47 PM GMT+2, zilore mumba <<a rel="nofollow" shape="rect" href="mailto:zmumba@yahoo.com" target="_blank">zmumba@yahoo.com</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807gmail-m_4060975555631802753yiv7781110550"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:13px"><div></div>
        <div dir="ltr">Thanks Rick, that is close. The error am getting now is:</div><div dir="ltr"> <span>fatal:Number of subscripts on rhs do not match number of dimensions of aggregated cat type variable, (4) Subscripts used, (3) Subscripts expected</span><br clear="none"></div><div><br clear="none"></div>
        
        </div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807gmail-m_4060975555631802753yiv7781110550yqt05792"><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807gmail-m_4060975555631802753yiv7781110550yahoo_quoted_8222480418">
            <div style="font-family:Helvetica,Arial,sans-serif;font-size:13px;color:rgb(38,40,42)">
                
                <div>
                    On Sunday, April 19, 2020, 10:17:12 PM GMT+2, Rick Brownrigg <<a rel="nofollow" shape="rect" href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>> wrote:
                </div>
                <div><br clear="none"></div>
                <div><br clear="none"></div>
                <div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807gmail-m_4060975555631802753yiv7781110550"><div><div dir="ltr"><div>HI Zilore,</div><div><br clear="none"></div><div>I think the issue is that addfiles() return a *list* of filevars, where addfile returns a single filevar.  Lists are indexed with [ ] notation; perhaps something like this will work:</div><div><br clear="none"></div><div>  x = a[:]->T2(0,{850},{-15},{30})</div><div><br clear="none"></div><div>Rick<br clear="none"></div></div><br clear="none"><div><div id="gmail-m_8939608065114109902yiv9247688265gmail-m_-5822182247068428635yiv0988538708gmail-m_-3194069802701244055yiv0600931807gmail-m_4060975555631802753yiv7781110550yqt67703"><div dir="ltr">On Sun, Apr 19, 2020 at 1:54 PM zilore mumba via ncl-talk <<a rel="nofollow" shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>> wrote:<br clear="none"></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div style="font-family:Helvetica,Arial,sans-serif;font-size:13px"><div dir="ltr">I am trying to get time series at given locations from several WRF output files, e.g. 48H forecast temperature at 850hPa. Each file contains a day's model run.</div><div dir="ltr"> I have used ncl for years by adapting existing scripts, without really understanding. One issue I have difficulty with is getting variables from a file, especially WRF output.</div><div dir="ltr">I thought the script to get a time series at 15S, 30E would be as simple as the one below. I am able to print the varsummary, but printing x tells me that "a is not a valid file reference.</div><div dir="ltr">I would appreciate ant assistance.</div><div dir="ltr"><div>begin<br clear="none">files = systemfunc("ls -1 data/wrfout_d01_2020*") + ".nc"<br clear="none">  a = addfiles(files,"r")<br clear="none"><br clear="none">  ListSetType (a, "cat")          ; concatenate (=default)<br clear="none">  tc = wrf_user_getvar(a,"tc",0)<br clear="none">  printVarSummary (tc)<br clear="none"><br clear="none">  x = a->T2(0,{850},{-15},{30})<br clear="none">  asciiwrite("outfile.txt",x)<br clear="none">end<br clear="none"><br clear="none"></div><div dir="ltr">Zilore Mumba<br clear="none"></div></div></div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div></div></div></div></div>
            </div>
        </div></div></div></div></div>
            </div>
        </div></div></blockquote></div></div></div></div></div>
            </div>
        </div></div>_______________________________________________<br clear="none">
ncl-talk mailing list<br clear="none">
<a rel="nofollow" shape="rect" href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br clear="none">
List instructions, subscriber options, unsubscribe:<br clear="none">
<a rel="nofollow" shape="rect" href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div></div><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div dir="ltr"><div dir="ltr"><div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)" clear="none"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)" clear="none"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)" clear="none"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)" clear="none"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br clear="none"></span></div><div>C.E.O, Weather It Is, LTD<br clear="none">Weather and Climate Focus<br clear="none"><a rel="nofollow" shape="rect" href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br clear="none">Jerusalem, Israel<br clear="none">Local: 02 930 9525<br clear="none">Cell: 054 7 231 170<br clear="none">Int-IS: x972 2 930 9525<br clear="none"><br clear="none"></div></div></div></div></div></div></div></div>
            </div>
        </div></div></blockquote></div></div><br clear="all"><div><br clear="none"></div>-- <br clear="none"><div dir="ltr"><div dir="ltr"><div><div dir="ltr">Barry H. Lynn, Ph.D<div><div>Senior Associate Scientist, Lecturer,</div><div><div><span style="color:rgb(136,136,136)">The Institute of the Earth Science, </span><br style="color:rgb(136,136,136)" clear="none"><span style="color:rgb(136,136,136)">The Hebrew University of Jerusalem, </span><br style="color:rgb(136,136,136)" clear="none"><span style="color:rgb(136,136,136)">Givat Ram, Jerusalem 91904, Israel </span><br style="color:rgb(136,136,136)" clear="none"></div><span style="color:rgb(136,136,136)">Tel: 972 547 231 170</span><br style="color:rgb(136,136,136)" clear="none"><span style="color:rgb(136,136,136)">Fax: (972)-25662581</span></div></div><div><span style="color:rgb(136,136,136)"><br clear="none"></span></div><div>C.E.O, Weather It Is, LTD<br clear="none">Weather and Climate Focus<br clear="none"><a rel="nofollow" shape="rect" href="http://weather-it-is.com" target="_blank">http://weather-it-is.com</a><br clear="none">Jerusalem, Israel<br clear="none">Local: 02 930 9525<br clear="none">Cell: 054 7 231 170<br clear="none">Int-IS: x972 2 930 9525<br clear="none"><br clear="none"></div></div></div></div></div></div></div></div>
            </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" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a></blockquote></div>