[ncl-talk] vinth2p function

Anahita Amiri Farahani aamir003 at ucr.edu
Fri Jul 27 17:13:07 MDT 2018


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 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180727/458f8b84/attachment.html>


More information about the ncl-talk mailing list