# [ncl-talk] zonal_mpsi

Dennis Shea shea at ucar.edu
Fri May 21 10:54:42 MDT 2021

```True:  "Surface pressure is not always 10,000pa."

However, if surface pressure is not on the file,  I am not sure what can be
done.
Perhaps, you have other information which might allow you to estimate the
surface pressure.
==========

Failing that, using p0=10000 is a backup.

Remember, the function requires top=to=bottom ordering.
===

dimv = dimsizes(v)

; v(time,level, lat,lon)   ... 4D

ntim = dimv(0)
nlev = dimv(1)
nlat  = dimv(2)
mlon = dimv(3)

p0 = 10000.0
psfc = comform_dims(p0, (/ntim,nlat,mlon/))   ;  psfc(ntim,nlat,mlon)
one less dimension than 'v'
================

; v(level, lat,lon)   ... 3D

nlev = dimv(0)
nlat  = dimv(1)
mlon = dimv(2)

p0 = 10000.0
psfc = comform_dims(p0, (/nlat,mlon/))   ; psfc(nlat,mlon) one less
dimension than 'v'
==

zmpsi = *zonal_mpsi*(v,p,psfc)

; Use *zonal_mpsi_Wrap*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/zonal_mpsi_Wrap.shtml>
; zmpsi = *zonal_mpsi_Wrap*
<http://www.ncl.ucar.edu/Document/Functions/Contributed/zonal_mpsi_Wrap.shtml>(v,p,psfc
)

printVarSummary(zmpsi)

On Fri, May 21, 2021 at 2:00 AM Chathurika via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Many many thanks for the reply.
>
>
> How can I get the surface pressure if I was given meridional wind
> velocity.  Surface pressure is not always 10,000pa.
>
> So how can I get this ps which is mentioned in
> http://www.ncl.ucar.edu/Document/Functions/Built-in/zonal_mpsi.shtml
>
>
> Thanks again
>
> -----Original Messages-----
> *From:*"Soma Roy" <somaroy892 at gmail.com>
> *Sent Time:*2021-05-21 03:21:15 (Friday)
> *To:* Chathurika <chatu at scsio.ac.cn>
> *Cc:* ncl-talk <ncl-talk at ucar.edu>
> *Subject:* Re: [ncl-talk] zonal_mpsi
>
> You can mean along longitude or latitude.
>
> Your aim is to reduce 1 dimension from the dataset you are using.
>
> Hope this helps.
>
> Cheers!!
> Soma
>
> On Fri, May 21, 2021, 00:48 Chathurika via ncl-talk <
> ncl-talk at mailman.ucar.edu> wrote:
>
>> Dear all,
>>
>>
>> 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).
>>
>>
>> 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?
>>
>>
>>
>>
>> Many many thanks
>>
>> and best regards,
>> Chathu
>>
>> ------------------------------
>>
>>
>> *WCH*
>>
>> _______________________________________________
>> ncl-talk mailing list
>> ncl-talk at mailman.ucar.edu
>> List instructions, subscriber options, unsubscribe:
>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
>
>
> ------------------------------
>
>
>
> Wickramage Chathurika Hemamali
> Msc in Physical Oceanography
> State Key Laboratory of Tropical Oceanography
> South China Sea Institute of Oceanology
> University of Chinese Academy of Science
> China
>
> *Specialized in Oceanography and Marine Geology (Bachelor)*
> *University of Ruhuna*
> *Matara*
> *Sri Lanka*
>
> Email : wickramagechathurika at rocketmail.com
> chatu at scsio.ac.cn
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20210521/86f4416b/attachment.html>
```