[ncl-talk] vinth2p function

Dennis Shea shea at ucar.edu
Fri Jul 27 19:50:04 MDT 2018


 If:
       ap(k) =  [=a(k)*p0= a*p0]
then
       hyam = ap/p0       ; p0=100000.0
       hybm = b

AND

you have all the units correct, then

YES

On Fri, Jul 27, 2018 at 7:13 PM, Anahita Amiri Farahani <aamir003 at ucr.edu>
wrote:

> Hi all,
>
> I just wanted to make sure that I used this function correctly
>
>
> here is my script for CAM models:
>
>
> ana=addfile("temp.nc","r")
> T  = ana->T
> TS  = ana->TS
> ps=ana->ps
> delete(ana)
>
>
>
> ana=addfile("F_2000_CAM5_PM_fine_no_ds.cam.h0.0008-09.nc","r")
> P0mb=ana->P0/100
> ;ps=ana->PS
> hyam=ana->hyam
> hybm=ana->hybm
> ;lev=ana->lev
> lat=ana->lat
> delete(ana)
>
>   lev           = (/  10, 20, 30, 50, 70,100,150,200,250 \
>                      , 300,400,500,600,700,850,925,1000 /)
>
>   lev!0         = "lev"                  ; variable/dim name
>   lev&lev     =  lev                   ; create coordinate variable
>   lev at long_name = "pressure"               ; attach some attributes
>   lev at units     = "hPa"
>   lev at positive  = "down"
>
>  t_pres   = vinth2p(T, hyam, hybm, lev, ps, 1, P0mb, 1, False )
>
>
>
>
>
>
> and for GFDL I changed it to this:
>
>
> P0mb=1000
> hyam=pk/100000.
> hybm=bk
>
>   lev           = (/  10, 20, 30, 50, 70,100,150,200,250 \
>                      , 300,400,500,600,700,850,925,1000 /)
>
>   lev!0         = "lev"                  ; variable/dim name
>   lev&lev     =  lev                   ; create coordinate variable
>   lev at long_name = "pressure"               ; attach some attributes
>   lev at units     = "hPa"
>   lev at positive  = "down"
>
>  t_pres   = vinth2p(T, hyam, hybm, lev, ps, 1, P0mb, 1, False )
>
>
>
> _______________________________________________
> 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/20180727/0c466b4b/attachment.html>


More information about the ncl-talk mailing list