<div dir="ltr"><div>True:  "Surface pressure is not always 10,000pa."</div><div><br></div><div>However, if surface pressure is not on the file,  I am not sure what can be done. <br></div><div>Perhaps, you have other information which might allow you to estimate the surface pressure.</div><div>==========</div><div><br></div><div>Failing that, using p0=10000 is a backup.</div><div><br></div><div>Remember, the function requires top=to=bottom ordering.</div><div>===<br></div><div><br></div><div>   dimv = dimsizes(v)</div><div>  <br></div><div>; v(time,level, lat,lon)   ... 4D<br></div><div><br></div><div>   ntim = dimv(0)         <br></div><div>   nlev = dimv(1)</div><div>   nlat  = dimv(2)</div><div>   mlon = dimv(3)<br></div><div><br></div><div>    p0 = 10000.0</div><div>    psfc = comform_dims(p0, (/ntim,nlat,mlon/))   ;  psfc(ntim,nlat,mlon) one less dimension than 'v'</div><div>================</div><div><br></div><div><div>; v(level, lat,lon)   ... 3D<br></div><div>        <br></div><div>   nlev = dimv(0)</div><div>   nlat  = dimv(1)</div><div>   mlon = dimv(2)<br></div><div><br></div><div>    p0 = 10000.0</div><div>    psfc = comform_dims(p0, (/nlat,mlon/))   ; psfc(nlat,mlon) one less dimension than 'v'</div><div>==</div><div><pre>    zmpsi = <strong>zonal_mpsi</strong>(v,p,psfc)   

    ; Use <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/zonal_mpsi_Wrap.shtml"><strong>zonal_mpsi_Wrap</strong></a> if metadata retention is desired
    ; zmpsi = <a href="http://www.ncl.ucar.edu/Document/Functions/Contributed/zonal_mpsi_Wrap.shtml"><strong>zonal_mpsi_Wrap</strong></a>(v,p,psfc )<br><br></pre><pre>    printVarSummary(zmpsi) <br></pre></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, May 21, 2021 at 2:00 AM Chathurika 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"><p style="font-family:Arial">
        Many many thanks for the reply.
</p>
<p style="font-family:Arial">
        <br>
</p>
<p style="font-family:Arial">
        How can I get the surface pressure if I was given meridional wind velocity.  Surface pressure is not always 10,000pa. 
</p>
<p style="font-family:Arial">
        So how can I get this ps which is mentioned in  <span style="font-family:Arial"><a href="http://www.ncl.ucar.edu/Document/Functions/Built-in/zonal_mpsi.shtml" target="_blank">http://www.ncl.ucar.edu/Document/Functions/Built-in/zonal_mpsi.shtml</a></span>
</p>
<p>
        <br>
</p>
<p>
        Thanks again 
</p>
<blockquote name="replyContent" style="font-family:Arial;padding-left:5px;margin-left:5px;border-left:2px solid rgb(182,182,182);margin-right:0px">
        -----Original Messages-----<br>
<b>From:</b><span id="gmail-m_-8062607240161511657rc_from">"Soma Roy" <<a href="mailto:somaroy892@gmail.com" target="_blank">somaroy892@gmail.com</a>></span><br>
<b>Sent Time:</b><span id="gmail-m_-8062607240161511657rc_senttime">2021-05-21 03:21:15 (Friday)</span><br>
<b>To:</b> Chathurika <<a href="mailto:chatu@scsio.ac.cn" target="_blank">chatu@scsio.ac.cn</a>><br>
<b>Cc:</b> ncl-talk <<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a>><br>
<b>Subject:</b> Re: [ncl-talk] zonal_mpsi<br>
<br>
        <div dir="auto">
                You can mean along longitude or latitude.
                <div dir="auto">
                        <br>
                </div>
                <div dir="auto">
                        Your aim is to reduce 1 dimension from the dataset you are using.
                        <div dir="auto">
                                <br>
                        </div>
                        <div dir="auto">
                                Hope this helps.
                        </div>
                        <div dir="auto">
                                <br>
                        </div>
                        <div dir="auto">
                                Cheers!!
                        </div>
                        <div dir="auto">
                                Soma
                        </div>
                </div>
        </div>
<br>
        <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">
                        On Fri, May 21, 2021, 00:48 Chathurika via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">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">
                        <p style="font-family:Arial">
                                <span style="font-family:Georgia;font-size:16px">Dear all,</span> 
                        </p>
                        <p style="font-family:Arial">
                                <span style="font-family:Georgia;font-size:16px"><br>
</span> 
                        </p>
                        <p style="font-family:Arial">
                                <span style="font-family:Georgia;font-size:16px">I want to calculate zonal mean meridional stream function using "zonal_mpsi" function. I have a dataset which is meridional velocity (time, plev, lat, lon). </span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px"><br>
</span></span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px">I am little bit confused about what is 'ps' (surface pressures).  Same dimensions as velocity but the level and unit must be pa. Could you please tell me what should I use for the ps?</span></span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px"><br>
</span></span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px">I am sorry about the silly question but please help me.</span></span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px"><br>
</span></span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px">Many many thanks </span></span> 
                        </p>
                        <p>
                                <span style="font-family:Georgia"><span style="font-size:16px">and best regards,</span></span> 
                        </p>
Chathu<br>
<br>
<span style="font-family:Arial"> 
                        <hr style="margin:0.5em 0px;width:10em;height:1px;background-color:rgb(153,153,153);border:medium none" align="left">
                        <blockquote style="margin:0px 0px 0px 40px;padding:0px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:small;font-variant-ligatures:normal;border:medium none">
                                <span style="font-style:italic;font-size:medium"><br>
</span> 
                        </blockquote>
                        <blockquote style="margin:0px 0px 0px 40px;padding:0px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:small;font-variant-ligatures:normal;border:medium none">
                                <strong>WCH</strong> 
                        </blockquote>
</span>_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" rel="noreferrer" 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 noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a> 
                </blockquote>
        </div>
</blockquote>
<br>
<br>
<br>
<span style="font-family:Arial">
<hr style="margin:0.5em 0px;width:10em;height:1px;background-color:rgb(153,153,153);border:medium none" align="left">
<blockquote style="margin:0px 0px 0px 40px;padding:0px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:small;font-variant-ligatures:normal;border:medium none">
        <span style="font-style:italic;font-size:medium"><br>
</span>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px;padding:0px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:small;font-variant-ligatures:normal;border:medium none">
        <span style="font-style:italic;font-size:medium"><br>
</span>
</blockquote>
<blockquote style="margin:0px 0px 0px 40px;padding:0px;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-variant-ligatures:normal;border:medium none">
        <span style="font-style:italic"><span style="font-size:x-small">Wickramage Chathurika Hemamali</span></span>
        <div>
                <span style="font-style:italic"><span style="font-size:x-small">Msc in Physical Oceanography</span></span>
        </div>
        <div>
                <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2251">
                        <span style="font-style:italic"><span style="font-size:x-small">State Key Laboratory of Tropical Oceanography</span></span>
                </div>
        </div>
        <div>
                <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2252">
                        <span style="font-style:italic"><span style="font-size:x-small">South China Sea Institute of Oceanology</span></span>
                </div>
                <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2252">
                        <span style="font-style:italic"><span style="font-size:x-small">University of Chinese Academy of Science</span></span>
                </div>
        </div>
        <div>
                <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264">
                        <span style="font-style:italic"><span style="font-size:x-small">China</span></span>
                </div>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <span style="font-style:italic;font-size:medium"><br>
</span>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <i><span style="font-size:xx-small">Specialized in Oceanography and Marine Geology (Bachelor)</span></i>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <i><span style="font-size:xx-small">University of Ruhuna</span></i>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <i><span style="font-size:xx-small">Matara</span></i>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <i><span style="font-size:xx-small">Sri Lanka</span></i>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <span style="font-style:italic;font-size:medium"><br>
</span>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <span style="font-style:italic;font-size:medium">Email : <a>wickramagechathurika@rocketmail.com</a></span>
        </div>
        <div id="gmail-m_-8062607240161511657ydpc6aa4ef1yui_3_16_0_ym19_1_1496286059659_2264" style="font-size:small">
                <span style="font-style:italic;font-size:medium"><a>chatu@scsio.ac.cn</a></span>
        </div>
</blockquote>
</span>_______________________________________________<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>