Re: Manually adding points/values in NCL script

From: Mary Haley <haley_at_nyahnyahspammersnyahnyah>
Date: Tue, 15 Apr 2008 16:16:22 -0600 (MDT)

Hi,

Sorry for the lack of response. I'm still trying to figure out what
you want. You said you want to write a script that generates an NCL
script into a file that you run later. This is a bit confusing
because it sounds like you are talking about three executable scripts
here.

I guess the way I would do this is write a big script, like a C-shell
or Python script that is capable of reading and/or processing the SQL
databases into a format that NCL can handle, like a simple ASCII file,
or maybe even a NetCDF file.

You can then have this script either generate an NCL script on the
fly, or else have an NCL script already written that takes command
line arguments to intialize things, like what the name of your data
files are, how many points you have, etc. For information on
command line options, see:

http://www.ncl.ucar.edu/Document/Manuals/Ref_Manual/NclCLO.shtml

These can really come in handy when you need to write
a generic NCL script, and pass it values from another script.

This NCL script can be set up to write the graphical output to a PS or
PDF file that will be saved.

I think the hardest part will be figuring out how to get the data from
the SQL database into something NCL can read. I don't have experience
with this, but perhaps somebody else can jump in here.

--Mary

On Tue, 15 Apr 2008 valkhorn_at_aol.com wrote:

> I posted this a few days ago but still haven't gotten a response. I have a very large SQL database of weather data and I was hoping to produce contoured weather maps with this data.
>
> Of course NCL doesn't interface with SQL, so what I wanted to do is write a script that automatically generates the NCL script into a file that I can run later but which adds all of the points I need and generates the image.
>
> In general, this is what I hope to do just to clarify what I'm asking:
>
> ncl script generation script:
> -----------------------------
> Write the script to a .ncl which does the following {
> ??? Initialize graph
> ??? Pull all data from SQL tables and add each point manually in a loop
> ??? Plot points
> ??? Save graph
> }
>
> Then batch run the script generator for the days I need.
>
> In pseudocode, what I'm looking for is something like
>
> AddPoint(latitude, longitude, value);
> AddPoint(latitude, longitude, value);
>
> Can anyone help me out? Thanks!
>
> -William
>
_______________________________________________
ncl-talk mailing list
ncl-talk_at_ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Tue Apr 15 2008 - 16:16:22 MDT

This archive was generated by hypermail 2.2.0 : Tue Apr 15 2008 - 19:45:53 MDT