<div dir="ltr"><i> p = temp_f->level ; mb<br></i><div><i> temp = temp_f->air</i></div><div><i><br></i></div><div><i> <i>theta = pot_temp(p*100,temp,1,False)</i></i></div><div><i><i>printVarSummary(theta)<br></i></i></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Aug 23, 2022 at 10:28 PM Lyndz via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">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"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>Dear NCL-experts,</div><div><br></div><div>I am calculating potential temperature using the following ncl commands:</div><div> theta = pot_temp(p,temp,1,False) ; [time | 365] x [level | 17] x [lat | 73] x [lon | 144]<br></div><div><br></div><div>However, my inputs <b>p</b> and <b>temp </b>have levels that are in <b>hPa/mbar</b>.</div><div>According to the documentation, this should be in <b>Pa (i.e., levels*100)</b>.</div><div><br></div><div>I would like to ask how do I force the variables to have levels in Pa in the code below?</div><div><br></div><div> <i>temp_f = addfile("<a href="http://air.day.ltm.1981-2010.nc" target="_blank">air.day.ltm.1981-2010.nc</a>", "r"<br> p = temp_f->level<br> temp = temp_f->air(:,{p},:,:)<br></i></div><div><i><br></i></div><div><i>;;Print contents of file<br> printVarSummary(p)<br> printVarSummary(temp)<br><br>;;**************************************************<br>;;Calculates Potential Temperature<br>;;**************************************************<br> theta = pot_temp(p,temp,1,False)<br> print(theta&level)</i></div><div><i><br></i></div><div>I'll appreciate any help on this.</div><div><br></div><div>Sincerely,</div><div>Lyndz</div><div><br></div></div></div></div></div></div></div></div></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><br>
</blockquote></div>