Re: Manually adding points/values in NCL script

From: <valkhorn_at_nyahnyahspammersnyahnyah>
Date: Tue, 15 Apr 2008 18:45:36 -0400

 Let me see if I can find a graphic example of what I want:

http://www.ncl.ucar.edu/Applications/Scripts/native_3.ncl

I have data for hundreds of stations for highs, lows, precip, snowfall, etc. I want to generate a map that looks like that (although not rotated slightly to the right) that gives me high, low, precip, etc. maps for each day that I have data.

I want a map to look like that, but I want to ability to manually add points line by line and not by using an external ASCII file.

In the example above how would I change it to manually add the points one by one by one, line by line instead of an array, using latitude and longitude?

Also does it get just the data from the .grb file or does it get the map info from there too?

Does that clarify it a bit?

-William

 

 

-----Original Message-----
From: Mary Haley <haley_at_ucar.edu>
To: valkhorn_at_aol.com
Cc: ncl-talk_at_ucar.edu
Sent: Tue, 15 Apr 2008 5:16 pm
Subject: Re: Manually adding points/values in NCL script

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?

>?

 
Received on Tue Apr 15 2008 - 16:45:36 MDT

This archive was generated by hypermail 2.2.0 : Mon Apr 21 2008 - 08:22:49 MDT