Re: masking out in gsn_csm_pres_hgt_vector

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu Sep 23 2010 - 17:39:04 MDT

Hi Prabhakar,
(see below)

On 09/22/2010 12:24 PM, p s wrote:
> Hi,
> I am using "gsn_csm_pres_hgt_vector" to plot the press vs latitude
> cross-section of the Era Interim data.
> Since the ERA Interim data are in fixed pressure level, how do I
> interpolate them to bring the terrains into the picture?

I'm not sure how you would "interpolate" them. Assuming you have the
surface pressure, you could mask your pressure level data based on the
surface pressure field. (If at a specific gridpoint and timestep, if sfc
pressure =850hPa, set the data at that grid point below 850hPa to
_FillValue.)

> or how could I
> mask the data that are below surface in case of mountains when I am
> plotting?

You could draw a polygon on the bottom of your plot. First, you would
have to come up with a 1D array of latitudes that marks the pressure
where you want the polygon to start. One idea on how to do this: You
could form a climatological surface pressure field, and then use the min
function on the longitude dimension to determine the minimum pressures
at each latitude. Then you would take that array, add one point at the
beginning and two at the end and set them to your highest plotted
pressure. Then you create a latitude array of the same dimension as
the pressure array and fill it accordingly.

The point being that you need to draw a complete polygon around the area
that you want your polygon drawn.

Hopefully this at least gets you started on the right track. Take a look
at some of the polygon examples here, specifically #13:
http://www.ncl.ucar.edu/Applications/polyg.shtml

Perhaps others ncl-talk members will have other ideas.
Good luck,
Adam

> Looking forward for your kind help.
> Thanking you.
> Regards,
> Prabhakar
>
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
__________________________________________________
Adam Phillips 
asphilli@ucar.edu
National Center for Atmospheric Research   tel: (303) 497-1726
Climate and Global Dynamics Division         fax: (303) 497-1333
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli
_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu Sep 23 17:39:08 2010

This archive was generated by hypermail 2.1.8 : Mon Oct 04 2010 - 08:55:55 MDT