Re: converting ccsm T from hybrid to pressure coords

From: Dennis Shea <shea_at_nyahnyahspammersnyahnyah>
Date: Wed, 20 Aug 2008 13:50:16 -0600

Guess: Set the extrapolation to False.

You might also try:
http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p_ecmwf.shtml

D
           
whobbs_at_ucla.edu wrote:
> I am using the vinth2p function to convert T from hybrid to pressure
> coords. As far as I can tell I am using the correct precedure, but
> when I run printMinMax on the converted data it returns a minimum of
> -372.25 K (clearly nonsense).
>
> Can anyone see my error?
>
> Will
>
>
>
> -------------------------------
> begin
>
>
> vNam = "T"
>
> plev = fspan(1000.,30.,15)
>
> latmin = -90.
> latmax = 90.
>
>
> ;read data
> PATH = systemfunc("ls will_hobbs_f*.nc")
>
> f1 = addfiles(PATH, "r")
> ListSetType (f1, "cat")
> data = addfiles_GetVar(f1, PATH, vNam)
>
>
>
> if (isshort(data)) then
> y1 = short2flt(data(:,:,{latmin:latmax},:) )
> else
> y1 = data(:,:,{latmin:latmax},:)
> end if
>
> delete(data)
>
>
>
> printMinMax(y1, False) ;returns min= 168.658 max=313.216
>
>
> ;convert fromCCSM hybrid to pressure coords
>
>
> f2 = addfile(PATH(0), "r")
>
> hbcofa = f2->hyam ;midlevel coefficients
> hbcofb = f2->hybm
>
>
> PS = addfiles_GetVar(f1, PATH, "PS")
>
>
> y2 = vinth2p(y1, hbcofa, hbcofb, plev, PS(:,{latmin:latmax},:),
> 1, 1000., 1, True)
>
> delete(y1)
>
> printMinMax(y2, False) ;returns min=-372.322 max=332.907
>
> end
> ;-----------------------
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
======================================================
Dennis J. Shea                  tel: 303-497-1361    |
P.O. Box 3000                   fax: 303-497-1333    |
Climate Analysis Section                             |
Climate & Global Dynamics Div.                       |
National Center for Atmospheric Research             |
Boulder, CO  80307                                   |
USA                        email: shea 'at' ucar.edu |
======================================================
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Wed Aug 20 2008 - 13:50:16 MDT

This archive was generated by hypermail 2.2.0 : Mon Aug 25 2008 - 15:23:45 MDT