# [ncl-talk] MSE

Guido Cioni guidocioni at gmail.com
Wed Jun 27 09:04:46 MDT 2018

```Hello,
You can make your own function without having to wait for a release, especially for MSE, which is easy to compute having the right variables. That’s how I’ve done it.

Assuming you have a data file with qv (specific humidity), theta_v (virtual potential temperature), pres (air pressure) and height levels as 3-D variable

; --constants ------------------------------------------;

rd=287.058        ; J/kg K  ; R constant for dry air
rdv=0.622                  ; ratio of R for dry air over R for vapor
lv=2501000.0    ; J/kg     ; latent heat of vaporization
t0=273.15       ; C
g=9.80665       ; m/s**2
cpd=1003.5        ; J/kg K
p0=100000.0      ; Pa

mse=cpd*(data->theta_v/(1+0.61*data->qv))*(data->pres/p0)^(rd/cpd)+g*(data->height)+lv*(data->qv)

If you have, instead, temperature use the usual formulation

mse=cpd*(data->temp)+g*height+lv*data->qv

You can also use different formulations but the approach is basically the same..

Cheers

> Il giorno 27 giu 2018, alle ore 16:36, Behrooz Keshtgar <behroozkeshtgar73 at gmail.com> ha scritto:
>
>
> Hello
> I've been working on my thesis for a while and i need to calculate MSE (Moist Static Energy). After lots of searching i found that you are developing a new function which calculates the MSE (in this  <https://www.ncl.ucar.edu/Document/Functions/Contributed/static_energy_atm.shtml>page); but unfortunately it will be available in NCL 6.5. As i saw in the website <https://www.ncl.ucar.edu/future_release.shtml>, NCL 6.5 will be released in June 2018. I wonder that if you know the exact release date.
> Thank you.
>
> ----------------------------
> Behrooz Keshtgar
> M.Sc student of Meteorology at Institute of Geophysics, University of Tehran
> behroozkeshtgar73 at gmail.com <mailto:behroozkeshtgar73 at gmail.com>
>
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180627/a50db8e9/attachment.html>
```