Re: Pressure/height vs. latitude

From: Dan <dbarrie_at_nyahnyahspammersnyahnyah>
Date: Mon, 29 Oct 2007 12:27:53 -0400

Hi Nicholas,

What you have to do is change the vinth2p parameter kxrtp
(http://www.ncl.ucar.edu/Document/Functions/Built-in/vinth2p.shtml) to
true so that it extrapolates all the way down to the 1000mb surface,
even when there is topography.

-Dan

Nicholas Herold wrote:
> Hi,
>
> I am trying to convert CCSM hybrid coordinates to pressure coordinates
> (which I think I have done successfully) and then plot them in a
> pressure/height vs. latitude plot.
>
> When I look at the output the values seem normal however the white space
> that represents land at the bottom of the plot appears incorrect. There is
> land where there shouldn't be and vice versa. I have tried several
> longitudes, some look more correct than others, I have also tried plotting
> via index values and longitude values, both appear incorrect. Is there a
> weighting or interpolation issue I should be aware of when doing a plot of
> this sort?
>
> Here are the relevent sections, I've also attached a sample plot, you can
> see from the longitude that the white spaces do not appear correctly (e.g.
> Antarctica seems to go to 40deg. S);
>
> f1 = addfile(var+"_"+exp1+"_final_mean.nc","r")
> f2 = addfile(var+"_"+exp2+"_final_mean.nc","r")
>
> variable_complete=new((/3,26,48,96/),"float")
> variable_complete(0,:,:,:)=f1->$var$(:,:,:)
> variable_complete(0,:,:,:)=f1->$var$(:,:,:)
>
> variable_complete(1,:,:,:)=f2->$var$(:,:,:)
> variable_complete(1,:,:,:)=f2->$var$(:,:,:)
>
> variable_complete(2,:,:,:)=variable_complete(0,:,:,:) -
> variable_complete(1,:,:,:)
> variable_complete(2,:,:,:)=variable_complete(0,:,:,:) -
> variable_complete(1,:,:,:)
>
> .....
>
> ; initialise interpolation variables
> hyam = f1->hyam ; hybrid a coefficients
> hybm = f1->hybm ; hybrid b coefficients
> pressure_levels = (/ 1000.0,850.0,700.0,500.0,300.0,200.0,100.0 /)
> PS = f1->PS ; surface pressure of dataset
> interp = 2 ; type of interpolation: 1 = linear, 2 = log, 3 = loglog
> P0mb = 1000 ;f1->P0*0.01 ; surface pressure
> ii = 1 ; not used at this time, set to 1
> kxtrp = False ; no extrapolation when the pressure level is outside of
> the range of PS (False)
> pressure =
> vinth2p(variable_complete(c,:,:,:),hyam,hybm,pressure_levels,PS(:,:),interp,P0mb,1,kxtrp)
>
> pressure&lev_p_at_units = "mb"
> tmplon = stringtofloat(longitude)
> plot(c) =
> gsn_csm_pres_hgt(wks,pressure(:,:,{stringtofloat(longitude)}),resources)
> delete(pressure)
>
> Nicholas.
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
> _______________________________________________
> ncl-talk mailing list
> ncl-talk_at_ucar.edu
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Oct 29 2007 - 10:27:53 MDT

This archive was generated by hypermail 2.2.0 : Mon Oct 29 2007 - 15:38:45 MDT