<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Hi Mary</p>
<p>Maybe I should make it clear in my question.</p>
<p>wrf_user_getvar is working on 2D variables (in your case T2) for
multiple files.</p>
<p>It seems not working on 3D variable (in my example pressures of
model levels) for multiple files.</p>
<p>I used the way you used to open multiple wrfout files.</p>
<p>I can get by using do loop for each file, but it is kind of slow.<br>
</p>
<p>Thanks</p>
<p>Sheng-Hung<br>
</p>
<br>
<div class="moz-cite-prefix">On 12/5/2017 6:32 PM, Mary Haley wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CACNN_CKiVW_3Ag3U2CpY=po4XKXHm6y5DR0xHjk6ARA63_jGJg@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<div dir="ltr">
<div class="gmail_default" style="font-size:small">Sheng-Hung,</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">Using a list
of files should work with wrf_user_getvar, but you didn't
indicate how the function was failing, or how you are trying
to open the files.</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default" style="font-size:small">It should
work with something like this:</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
<div class="gmail_default">
<div class="gmail_default"><font face="monospace, monospace">ncl
0> fnames = systemfunc("ls -1 wrfout_d01_2008-09-29*")</font></div>
<div class="gmail_default"><font face="monospace, monospace">ncl
1> print("# of files = " + dimsizes(fnames))</font></div>
<div class="gmail_default"><font face="monospace, monospace">(0)
# of files = 48</font></div>
<div class="gmail_default"><font face="monospace, monospace">ncl
2> a = addfiles(fnames,"r")</font></div>
<div class="gmail_default"><font face="monospace, monospace">ncl
3> t = wrf_user_getvar(a,"T2",-1) </font></div>
<div class="gmail_default"><font face="monospace, monospace">ncl
4> printVarSummary(t)</font></div>
<div class="gmail_default"><font face="monospace, monospace"><br>
</font></div>
<div class="gmail_default"><font face="monospace, monospace">Variable:
t</font></div>
<div class="gmail_default"><font face="monospace, monospace">Type:
float</font></div>
<div class="gmail_default"><font face="monospace, monospace">Total
Size: 7791744 bytes</font></div>
<div class="gmail_default"><font face="monospace, monospace">
1947936 values</font></div>
<div class="gmail_default"><font face="monospace, monospace">Number
of Dimensions: 3</font></div>
<div class="gmail_default"><font face="monospace, monospace">Dimensions
and sizes:<span style="white-space:pre"> </span>[Time |
48] x [south_north | 197] x [west_east | 206]</font></div>
<div class="gmail_default"><font face="monospace, monospace">Coordinates: </font></div>
<div class="gmail_default"><font face="monospace, monospace">Number
Of Attributes: 6</font></div>
<div class="gmail_default"><font face="monospace, monospace">
FieldType :<span style="white-space:pre"> </span>104</font></div>
<div class="gmail_default"><font face="monospace, monospace">
MemoryOrder :<span style="white-space:pre"> </span>XY </font></div>
<div class="gmail_default"><font face="monospace, monospace">
description :<span style="white-space:pre"> </span>TEMP at
2 M</font></div>
<div class="gmail_default"><font face="monospace, monospace">
units :<span style="white-space:pre"> </span>K</font></div>
<div class="gmail_default"><font face="monospace, monospace">
stagger :<span style="white-space:pre"> </span></font></div>
<div class="gmail_default"><font face="monospace, monospace">
coordinates :<span style="white-space:pre"> </span>XLONG
XLAT</font></div>
<div class="gmail_default"><font face="monospace, monospace">ncl
5> </font></div>
<div class="gmail_default"><br>
</div>
<div class="gmail_default">--Mary</div>
</div>
<div class="gmail_default" style="font-size:small"><br>
</div>
</div>
<div class="gmail_extra"><br>
<div class="gmail_quote">On Mon, Dec 4, 2017 at 12:08 PM,
Sheng-Hung Wang <span dir="ltr"><<a
href="mailto:wang.446@osu.edu" target="_blank"
moz-do-not-send="true">wang.446@osu.edu</a>></span>
wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">Hi<br>
<br>
Is there a problem (or bug) for following NCL statement<br>
<br>
wrf_P = wrf_user_getvar(a,"pressure",-<wbr>1)<br>
<br>
a is multiple wrfout files.<br>
<br>
When I changed time=-1 to single time step, the function
worked. It didn't work on multiple time steps.<br>
<br>
Thanks<br>
<br>
Sheng-Hung<br>
<br>
-- <br>
==============================<wbr>==========<br>
Sheng-Hung Wang, PhD<br>
Polar Meteorology Group<br>
Byrd Polar and Climate Research Center<br>
The Ohio State University<br>
1090 Carmack Road, Columbus, Ohio 43210<br>
Phone: <a href="tel:%28614%29%20292-1060"
value="+16142921060" target="_blank"
moz-do-not-send="true">(614) 292-1060</a><br>
Fax: <a href="tel:%28614%29%20292-4697"
value="+16142924697" target="_blank"
moz-do-not-send="true">(614) 292-4697</a><br>
email: <a href="mailto:wang.446@osu.edu" target="_blank"
moz-do-not-send="true">wang.446@osu.edu</a><br>
==============================<wbr>==========<br>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank"
moz-do-not-send="true">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" moz-do-not-send="true">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
</blockquote>
</div>
<br>
</div>
</blockquote>
<br>
<pre class="moz-signature" cols="72">--
========================================
Sheng-Hung Wang, PhD
Polar Meteorology Group
Byrd Polar and Climate Research Center
The Ohio State University
1090 Carmack Road, Columbus, Ohio 43210
Phone: (614) 292-1060
Fax: (614) 292-4697
email: <a class="moz-txt-link-abbreviated" href="mailto:wang.446@osu.edu">wang.446@osu.edu</a>
========================================
</pre>
</body>
</html>