converting ccsm T from hybrid to pressure coords

From: <whobbs_at_nyahnyahspammersnyahnyah>
Date: Wed, 20 Aug 2008 11:52:42 -0700

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
Received on Wed Aug 20 2008 - 12:52:42 MDT

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