Re: missing data

From: Ethan Alpert (ethan AT unknown)
Date: Wed May 12 1999 - 14:20:10 MDT


>
>
>
> Hello-
>
> I am attempting to plot temperature data using ncl. The data
> is from a netcdf file converted from a ccm-formatted GENESIS
> history file. My problem is that there is a swath of missing
> data in the plot due probably to the absence of a longitudinal
> wrap (i.e., the addition of one longitudinal strip of temperature
> data). How have other users hurdled this obstacle? Is there an
> easy way to add a longitudinal wrap in ncl? Perhaps this is not
> the problem?

The swath is in fact due to know wrap point. Here's a code stub to do
the wrap point. The input variable here for demonstration purposes is
called "var" and dimensioned 17x64x128.

        var_wrap = new((/17,64,129/),float)
        var_wrap(:,:,0:127) = var
        var_wrap(:,:,128) = var_wrap(:,0)

That's it!

Now since you mentioned missing data I'll fill everyone in on how
missing data are handled by NCL's graphics.

Missing data is very easy to handle. When you create either a scalarField
object, vectorField or a coordArrays object simply set the appropriate
missing value resource and the graphics will handle it.

For scalarFieldClass set:

        "sfMissingValueV"

For coordArraysClass set:

        "caXMissingV"
        "caYMissingV"

For vectorFieldClass set:

        "vfMissingUValueV"
        "vfMissingVValueV"

Simply set the value of the missing data to the appropriate resource. For
contour plots the missing data will appear transparent or filled if you set
"cnMissingValFillColor". For XyPlots the missing data will appear as a
break in the curve.

I'd also like to mention that NCL's algebra supports missing values. Simply
assign the missing value to a variable attribute called "_FillValue" and
NCL's operators will automatically ignore values equal to "_FillValue".

        -ethan

        

>
> An image of the temperature map, as well as the ncl script used to
> create the image, can be found at http://www.essc.psu.edu/~poulsen/
> ncl/problem.htm.
>
> Thanks for your help.
>
> Chris
>
>
> ------------------------------
> Chris J. Poulsen
> 214 Deike Building
> EMS Environment Institute
> Pennsylvania State University
> University Park, PA 16802
> phone:(814) 863-3673
> fax:(814) 865-3191
> ------------------------------
>
>



This archive was generated by hypermail 2b29 : Wed Jun 28 2000 - 09:40:37 MDT