<div dir="ltr"><div>Hi,</div><div><br></div><div>If I understand correctly (and that's a big "if"), you might check out the conform function:</div><div><br></div><div><a href="http://ncl.ucar.edu/Document/Functions/Built-in/conform.shtml">http://ncl.ucar.edu/Document/Functions/Built-in/conform.shtml</a></div><div><br></div><div>That is, I *think* if you make your pressure array conform to the temp/RH arrays, then you should be able to call mixhum_ptrh directly. It may take some experimentation.</div><div><br></div><div>Hope that helps...</div><div>Rick</div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 19, 2020 at 8:52 AM Ehsan Taghizadeh 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><div style="font-family:bookman old style,new york,times,serif;font-size:16px"><div dir="ltr">Dears,<br>I hope you're doing great.</div><div dir="ltr">I want to calculate "specific humidity" via "<span>mixhum_ptrh</span>". I have pressure, temperature and relative humidity arrays, but their dimensions are not the same! Actually I have temperature and relative humidity on grid points at different pressure levels. So their dimensions are like below:</div><div dir="ltr"><br></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:"courier new",courier,monaco,monospace,sans-serif;font-size:small">Dimensions and sizes: [lv_ISBL0 | 15] x [lat_0 | 721] x [lon_0 | 1440]</span></span></div><div dir="ltr"><br></div><div dir="ltr">However, the pressure array is the first dimension of them (<span><span style="color:rgb(0,0,0);font-family:"courier new",courier,monaco,monospace,sans-serif;font-size:small">lv_ISBL0</span></span>) and is like below:</div><div dir="ltr"><br></div><div dir="ltr"><span><font style="background-color:inherit" size="2" face="courier new, courier, monaco, monospace, sans-serif">Dimensions and sizes: [15]</font></span><br></div><div dir="ltr"><br></div><div dir="ltr">Actually, I want to calculate "specific humidity"<span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px"> for each grid point at each pressure level. May I ask any help to use "</span></span><span style="font-family:courier;font-size:13.3333px;white-space:pre-wrap">mixhum_ptrh</span><span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">" without do loops over the grid points?</span></span></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px"><br></span></span></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px">I hope I could explain my problem clearly and I hope to hear from you.</span></span></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif;font-size:16px"><br></span></span></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif"><i><font size="2">Sincerely</font></i></span></span></div><div dir="ltr"><span><span style="color:rgb(0,0,0);font-family:"bookman old style","new york",times,serif"><i><font size="2">Ehsan</font></i></span></span></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></blockquote></div>