[ncl-talk] About Unit conversion handling

Dennis Shea shea at ucar.edu
Wed Aug 24 09:06:56 MDT 2022


* p  = temp_f->level                   ; mb*
* temp = temp_f->air*

* theta = pot_temp(p*100,temp,1,False)*

*printVarSummary(theta)*

On Tue, Aug 23, 2022 at 10:28 PM Lyndz via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear NCL-experts,
>
> I am calculating potential temperature using the following ncl commands:
>  theta = pot_temp(p,temp,1,False) ; [time | 365] x [level | 17] x [lat |
> 73] x [lon | 144]
>
> However, my inputs *p* and *temp *have levels that are in *hPa/mbar*.
> According to the documentation, this should be in *Pa (i.e., levels*100)*.
>
> I would like to ask how do I force the variables to have levels in Pa in
> the code below?
>
>
>
>
> *temp_f = addfile("air.day.ltm.1981-2010.nc
> <http://air.day.ltm.1981-2010.nc>", "r"   p  = temp_f->level   temp =
> temp_f->air(:,{p},:,:)*
>
>
>
>
>
>
>
>
>
> *;;Print contents of file   printVarSummary(p)
>  printVarSummary(temp);;**************************************************;;Calculates
> Potential Temperature;;**************************************************
> theta = pot_temp(p,temp,1,False)  print(theta&level)*
>
> I'll appreciate any help on this.
>
> Sincerely,
> Lyndz
>
> _______________________________________________
> 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/20220824/a5438479/attachment.htm>


More information about the ncl-talk mailing list