<div dir="ltr"><div>Hi Jonathan,</div><div><br></div><div>Is this being used on CAM data? EG:<br></div><div><br></div><div><div> lat = 96 ;<br> lon = 144 ;<br> lev = <b>26</b> ; mid levels<br> ilev = <b>27</b> ; interface levels<br></div><div> time= 1</div><div><br></div><div> double lev(lev) ;<br> double ilev(ilev) ;</div><div> float PS(time, lat, lon) ;</div><div> float T(time, lev, lat, lon) ;</div><div><br></div><div> f = addfile ("....", "r")</div><div> hyai = f->hyai ; [27]<br> hybi = f->hybi ; [27]<br> p0 = f->P0 ; [1] <br> ps = f->PS ; [1] x [96] x [144]<br><br> dp = dpres_hybrid_ccm (ps,p0,<b>hyai,hybi</b>) ; Pa [kg/(m s2)]<br></div><div> printVarSummary(dp) ; [1] x [<b>26</b>] x [96] x [144]</div><div><br></div><div> T = f->T</div><div> printVarSummary(T) ; [1] x [<b>26</b>] x [96] x [144]</div><div><br></div><div> Tdp = T*dp ; [1] x [26] x [96] x [144]</div><div> <br><div class="gmail-aju"><div class="gmail-aCi"><br></div></div><div class="gmail-gs"><div class="gmail-gE gmail-iv gmail-gt"><table class="gmail-cf gmail-gJ" cellpadding="0"><tbody><tr class="gmail-acZ"><td class="gmail-gF gmail-gK"><table class="gmail-cf gmail-ix" cellpadding="0"><tbody><tr><td class="gmail-c2"><br></td></tr></tbody></table></td><td class="gmail-gH gmail-bAk"><br></td></tr></tbody></table></div></div><table class="gmail-cf gmail-gJ" cellpadding="0"><tbody><tr class="gmail-acZ"><td class="gmail-gH"><br></td><td class="gmail-gH gmail-acX gmail-bAm" rowspan="2"><br></td></tr></tbody></table><table class="gmail-cf gmail-gJ" cellpadding="0"><tbody><tr class="gmail-acZ gmail-xD"></tr></tbody></table><table class="gmail-cf gmail-gJ" cellpadding="0"><tbody><tr class="gmail-acZ gmail-xD"><td colspan="3"><table class="gmail-cf gmail-adz" cellpadding="0"><tbody><tr><td class="gmail-ady"><div id="gmail-:1ws" class="gmail-ajy" tabindex="0"><img class="gmail-ajz" src="https://mail.google.com/mail/u/1/images/cleardot.gif" alt=""></div></td></tr></tbody></table></td></tr></tbody></table></div><div> <br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jan 21, 2020 at 6:34 AM Buzan, Jonathan 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">Hello NCL-Talk,<br>
<br>
I am attempting to use the following function:<br>
dpres_hybrid_ccm<br>
<a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_hybrid_ccm.shtml" rel="noreferrer" target="_blank">https://www.ncl.ucar.edu/Document/Functions/Built-in/dpres_hybrid_ccm.shtml</a><br>
<br>
Example 3 says to:<br>
<br>
f = addfile<br>
("....", "r")<br>
hyai = f->hyai<br>
hybi = f->hybi<br>
p0 = f->P0<br>
ps = f->PS<br>
<br>
dp = dpres_hybrid_ccm<br>
(ps,p0,hyai,hybi) ; Pa [kg/(m s2)] <br>
<br>
T = f->T ; K (time,lev,lat,lon)<br>
cp = 1004. ; J/(K kg) [ m2/(K s2) ]<br>
g = 9.81 ; m/s<br>
<br>
Tdp = T*dp ; [K kg/(m s2)] (temporary variable)<br>
<br>
<br>
fatal:Mul: Dimension size, for dimension number 1, of operands does not match, can't continue<br>
<br>
fatal:["Execute.c":8638]:Execute: Error occurred at or near line 105<br>
<br>
However, T and dp have different sized dimensions for the levels (dp is one less than T). I am not sure if this is correct for the example.<br>
<br>
Thanks,<br>
-Jonathan<br>
<br>
<br>
_______________________________________________<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><br>
</blockquote></div>