<div dir="ltr">Thank you very much Dennis.<div>You explanation will permit me to advance in my attempt. However its seems to me wrf coordinates are "a simple thing made hard".<div>Thank you very much</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Apr 24, 2020 at 4:42 AM Dennis Shea 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 dir="ltr"><div>The syntax <span style="color:rgb(0,0,255)"><b>{...} </b><span style="color:rgb(0,0,0)">can ONLY be used with a special type of variable called a <b>coordinate variable [CV]</b><br></span></span></div><div>A CV is a one where the variable name *and* the dimension names are identical. <br></div><div>eg: lat(lat), lon(on), latitude(latitude) . etc</div><div><br></div><div>The WRF variables containing the geographic coordinates are two-or-three dimensions.</div><div>XLAT ( Time, south_north, west_east )</div><div>XLONG(...)</div><div><br></div><div>Hence, they are not CVs.</div><div>Use the <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/getind_latlon2d.shtml" target="_blank"><b>getind_latlon2d </b>f</a>unction. Please read the documentation *carefully*</div><div><br></div><div> lat2d = f[0]->XLAT(0,:,:)<br> lon2d = f-[0]>XLONG(0,:,:)<br><br> printVarSummary(lat2d)<br> printMinMax(lat2d, 0)<br> printMinMax(lon2d, 0)<br><br> lat = (/ -18 /) ; user specified coordinate pairs<br> lon = (/ -30 /)<br> ; return 2d subscripts<br> nm = <b>getind_latlon2d</b> (lat2d,lon2d, lat, lon)<br> print(nm)</div><div><br></div><div><div> x = a[:]->T2(:,n,m)</div><div> y = a[:]->V(:,{2},n,m)</div></div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 23, 2020 at 4:31 PM zilore mumba 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;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 dir="ltr"><div><div>Hello once again.</div><div>I am hoping someone may have a script which they can share,or correct my code below where I am attempting to extract a time series. From the assistance I got a few days ago, I am able to write values at a given location at the surface T2) and a a fixed level (V). Though I am getting several warnings, firstly </div><div><br></div><div dir="ltr"><div><div>Dimension (west_east) and (south_north) of file (wrfout_d01_2020-02-03_00:00:00) does not have an associated coordinate variable</div><div dir="ltr">and </div><div dir="ltr"><br></div><div dir="ltr"><span>warning:Invalid stride: stride must be positive non-zero integer</span><br></div></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>But my problem is that I am not able to select the forecast time of the series, i.e e.g. daily time series of the forecast at 0600UTC. Currently I am printing 484 values from 12 files each with forecast range of 120H (5 days). I am not able to tell which value corresponds to what forecast range and why they are 484.</span></div><div dir="ltr"><span>Is there a way to select for x and y (in the code below) the specific time step for the time series?</span></div><div dir="ltr"><span><br></span></div><div dir="ltr"><span>Help will be appreciated</span></div><br></div><div dir="ltr">begin</div><div> files = systemfunc("ls -1 data/wrfout_d01_2020*") + ".nc"</div><div> a = addfiles(files,"r")</div><div><br></div><div> ListSetType (a, "cat") ; concatenate (=default)</div><div><br></div><div> varnames = getfilevarnames(a[0]) ; get var names from the first file</div><div> print(varnames)</div><div><br></div><div> x = a[:]->T2(:,{-18},{30})</div><div> y = a[:]->V(:,{2},{-18},{30})</div><div><br></div><div> asciiwrite("Lusaka.txt", x)</div><div> asciiwrite("Lusaka2.txt", y)</div><div><br></div><div>end</div><div><br></div></div><br></div><div><br></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>
_______________________________________________<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>