Re: Missing values - additional comments

From: Lena Iredell <lena.iredell_at_nyahnyahspammersnyahnyah>
Date: Mon Aug 06 2012 - 11:32:18 MDT

Hi Mary,

Thanks so much for all your help! Your answers make so much sense.

The original data is read in as a Fortran binary file, but most of the
data that I'm plotting are generated within the code as we progress
through the algorithms. These are fixed, stand alone programs which read
in namelist files to vary the internal Fortran code. I think it would
take much longer to develop code which pass the plotting parameters out
to a scripting language, then return to the Fortran for additional
computations. I will definitely look at the Autograph programs and the
rest of your samples. The ncl routine is much more elegant, but the
Fortran programs fit our needs much better.

I really like NCAR's detailed annotation capabilities. The ability to
switch to and from greek characters within a single string, makes my
life so much easier.

I appreciate your help. I believe that the NCAR graphics programs will
suite our needs very nicely.

Thanks again!

Lena

Lena Iredell
SAIC
NASA Goddard Space Flight Center
Code 610
Phone: 301.286.9773

On 8/6/2012 12:23 PM, Mary Haley wrote:
>
> On Aug 6, 2012, at 9:49 AM, Lena Iredell wrote:
>
> > Hi Mary,
> >
> > Thanks for you timely response.
> >
> > We are migrating our code to new computers and our old outdated
> graphics package does not compile on the new system. The heritage
> graphics is imbedded within Fortran programs running scientific
> computation and called from them at certain processing steps. The NCAR
> graphics system seems to be the most compatible with this style of
> processing and the least disruptive to the heritage system. I can try
> to use the Autograph routines. I have found out that to use the CURVED
> routine I need to subset the data line calling several small segments
> surrounding the undefined data points.
> >
> > If I understand the documentation correctly NCL are script driven
> routines and GKS is callable from Fortran?
>
> Hi Lena,
>
> That is correct. NCL is similar to languages like IDL, Python, and
> Matlab. The GKS stuff is all Fortran or C based, and hence you need
> to write a program and then compile it.
>
> >
> > Did I misunderstand the use of the Null/1 and Null/2 for avoiding
> plotting missing values? I will also need develop routines for
> plotting and contouring data with missing values.
>
> The NULL values you are talking about *only* apply to Autograph code,
> and not to GKS code. I've attached a modified version of our agex01.f
> Autograph example, which assigns some dummy missing data, and then
> assigns NULL/1. to the same value, so you can see what happens.
>
> >
> > I can't seem to find the correct combination of calling routines to
> reset the null values from their defaults. If I understand the
> documentation correctly the FC = 'NULL/1' or 'NULL/2', but I can't
> seem to find the correct calling sequence to reset them
> >
> > for example:
> > CALL AGSETR('NULL/1', -999.9) produces and error message. Clearly
> I'm not interpreting something correctly. Maybe the use of the null
> value? Is there another name given to the missing values?
>
> You need a "." after the 1:
>
> CALL AGSETR('NULL/1.', -999.9)
>
> Please see the attached to see if it helps. I've even used the same
> missing value as yours, -999.9. I also attached an NCL version of the
> same script (the dummy values are slightly different) so you can see
> the difference.
>
> What format is your data in? I can show you how to create an XY plot
> or contour plot of your data if you can provide me with some samples.
>
> I think you will find NCL *much* easier to use, especially when it
> comes to dealing with missing values, because NCL will automatically
> recognize them, if you set the special attribute:
>
> y@_FillValue = …
>
>
> --Mary
>
> >
> > Thanks again for your help!
> >
> > Lena
> >
> >
> > On 8/6/2012 11:15 AM, Mary Haley wrote:
> >> Hi Lena,
> >>
> >> Is there a reason you're using GPL over Autograph?
> >>
> >> Any calls directly to GKS routines like GPL do not recognize
> missing values, unfortunately.
> >> You would need to loop over the values yourself and test for when
> you encounter a missing value.
> >>
> >> NCAR Graphics is considered dated, and we recommend people move to
> NCL if possible.
> >> With NCL, you will be able to easily read in a multitude of data
> formats, like NetCDF,
> >> HDF, and GRIB, do some calculations, and generate a plot.
> >>
> >> NCL has routines similar to GPL, called gsn_polyline (for drawing
> on an existing plot) and
> >> gsn_polyline_ndc (for drawing on a canvas, like GPL). These
> routines do recognize missing values.
> >>
> >> See the attached NCL script. If you have NCL, you should be able to
> run it with:
> >>
> >> ncl msg.ncl
> >>
> >> You need to click on the X11 window with your left mouse button to
> advance each frame.
> >>
> >> Let me know if you want to look some more into NCL, and I'll point
> you to some examples. You
> >> can also browse the whole page at:
> >>
> >> http://www.ncl.ucar.edu/Applications/
> >>
> >> --Mary
> >>
> >>
> >> On Aug 6, 2012, at 8:04 AM, Lena Iredell wrote:
> >>
> >> > I recently posted the following message, but forgot to include
> that I am
> >> > using GKS routines with the programs written in Fortran.
> >> >
> >> > I would like to plot a line plot, using either gpl, curve, or
> curved. My
> >> > data has missing values, which I would like displayed as gaps in the
> >> > line. How do I pass my missing value to the NCAR graphic programs
> so the
> >> > routines will ignore plotting the line segment at that point?
> >> >
> >> > I see in the Autograph documentation that the special values 'null/1'
> >> > and 'null/2' are available for use that seem to do this. Will setting
> >> > them work for gpl and curve as well? If so how do I actually set
> them?
> >> > What routines do I pass these function codes to? I am having some
> >> > difficulty finding the exact documentation on your web site that
> tells
> >> > how actually set and use these special values.
> >> >
> >> > Thanks for any help you can provide!
> >> >
> >> > Sincerely,
> >> >
> >> > Lena
> >> >
> >> >
> >> > --
> >> > Lena Iredell
> >> > SAIC
> >> > NASA Goddard Space Flight Center
> >> > Code 610
> >> > Phone: 301.286.9773
> >> >
> >> > _______________________________________________
> >> > ncarg-talk mailing list
> >> > ncarg-talk@ucar.edu
> >> > http://mailman.ucar.edu/mailman/listinfo/ncarg-talk
> >>
>
Received on Mon Aug 6 11:32:33 2012

This archive was generated by hypermail 2.1.8 : Wed May 15 2013 - 10:21:23 MDT