comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Latitude/longitude, contours, map_set, iMap?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Latitude/longitude, contours, map_set, iMap? [message #43850] Fri, 06 May 2005 01:58
wmconnolley is currently offline  wmconnolley
Messages: 106
Registered: November 2000
Senior Member
jamiesmyth_uni@yahoo.ca <jamiesmyth_uni@yahoo.ca> wrote:
> pp-routines????

> Where can one find these? The data is not UKMO data but it was written
> out to look just like it ;)

If its written out to look like pp-data, you might be able to use them.
Your data is pp-data if... the files end in .pp; they consist of 64
words header followed by the data (making them 28304 bytes long for a std
field); if http://www.antarctica.ac.uk/met/wmc/pp/pp2txt.f will read them.

If thats true, you can probably get the pp-routines, which will read, write,
plot and do arithmetic and any number of other things to them. Mail me if
so.

-W.

--
William M Connolley | wmc@bas.ac.uk | http://www.antarctica.ac.uk/met/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
I'm a .signature virus! copy me into your .signature file & help me spread!
Re: Latitude/longitude, contours, map_set, iMap? [message #43882 is a reply to message #43850] Wed, 04 May 2005 14:55 Go to previous message
Chris[2] is currently offline  Chris[2]
Messages: 39
Registered: August 2003
Member
In iMap you can use the VIEW_GRID and VIEW_NEXT keywords to do multiple
plots per window.

-Chris
RSI

<jamiesmyth_uni@yahoo.ca> wrote in message
news:1115235175.314631.140600@z14g2000cwz.googlegroups.com.. .
> pp-routines????
>
> Where can one find these? The data is not UKMO data but it was written
> out to look just like it ;)
>
> Many thanks to both David and Ken for their suggestions! They were
> both very helpful. For what it is worth, iMap works ok, but it is way
> too slow for this. Likewise, I need to be able to script up 9 plots
> per page (aka !p.multi) and this seems to be impossible with iMap. I
> can change the 'Layout' in the GUI but there doesn't appear to be any
> way to do this in a script? I searched in vain for scripts that use
> iMap.
>
Re: Latitude/longitude, contours, map_set, iMap? [message #43884 is a reply to message #43882] Wed, 04 May 2005 12:51 Go to previous message
Ken Mankoff is currently offline  Ken Mankoff
Messages: 158
Registered: February 2000
Senior Member
On Wed, 4 May 2005, jamiesmyth_uni@yahoo.ca wrote:
> Likewise, I need to be able to script up 9 plots per page (aka
> !p.multi) and this seems to be impossible with iMap. I can
> change the 'Layout' in the GUI but there doesn't appear to be any
> way to do this in a script? I searched in vain for scripts that
> use iMap.

I never managed to get iMap working with a !p.multi-ish setup. But a
hack that I have used that works OK is to produce your multiple
images, open them all together, and then print them as a multi-page
document. The print dialog lets you put multiple pages on one sheet.
Then, print to PDF and convert the PDF to whatever image format you
want.

-k.

--
http://spacebit.dyndns.org/
Re: Latitude/longitude, contours, map_set, iMap? [message #43885 is a reply to message #43884] Wed, 04 May 2005 12:32 Go to previous message
jamiesmyth_uni@yahoo. is currently offline  jamiesmyth_uni@yahoo.
Messages: 6
Registered: July 2004
Junior Member
pp-routines????

Where can one find these? The data is not UKMO data but it was written
out to look just like it ;)

Many thanks to both David and Ken for their suggestions! They were
both very helpful. For what it is worth, iMap works ok, but it is way
too slow for this. Likewise, I need to be able to script up 9 plots
per page (aka !p.multi) and this seems to be impossible with iMap. I
can change the 'Layout' in the GUI but there doesn't appear to be any
way to do this in a script? I searched in vain for scripts that use
iMap.
Re: Latitude/longitude, contours, map_set, iMap? [message #43886 is a reply to message #43885] Wed, 04 May 2005 12:15 Go to previous message
wmconnolley is currently offline  wmconnolley
Messages: 106
Registered: November 2000
Senior Member
jamiesmyth_uni@yahoo.ca <jamiesmyth_uni@yahoo.ca> wrote:
> TEMPERATURE FLOAT Array[73, 96, 22]

This wouldn't be UKMO model data? 73x96 is familiar... if so, use the
pp-routines.

-W.

--
William M Connolley | wmc@bas.ac.uk | http://www.antarctica.ac.uk/met/wmc/
Climate Modeller, British Antarctic Survey | Disclaimer: I speak for myself
I'm a .signature virus! copy me into your .signature file & help me spread!
Re: Latitude/longitude, contours, map_set, iMap? [message #43910 is a reply to message #43886] Tue, 03 May 2005 20:05 Go to previous message
Kenneth P. Bowman is currently offline  Kenneth P. Bowman
Messages: 585
Registered: May 2000
Senior Member
In article <1115172826.358757.121050@z14g2000cwz.googlegroups.com>,
"jamiesmyth_uni@yahoo.ca" <jamiesmyth_uni@yahoo.ca> wrote:

> The first
> problem I have is that the longitude data goes from 0-360 degrees.

That should not be a problem with MAP_SET. There is no reason to change
the coordinates.

> map_set, /continents, /mercator, /isotropic

This could be a problem, however, as the Mercator projection maps the
poles to +/- infinity in the y-direction. You might want to try the
cylindrical equidistant projection instead.

> contour, transpose(data.pv[*,*,0]), data.xlon, data.xlat, /overplot,
> nlevels=12
>
> The first command brings up a dialog box for the 'gridding wizzard' but
> when I click ok, nothing happens. The second looks 'more-or-less' ok
> but there seems to be a gap at 0 degrees. The gap is rather apparent
> when I fill the contours... Do I need to re-grid or triangulate the
> data? Is there a quick way to do any of this?

You just need to copy data on the Greenwich meridian to the "other end"
of the data array to make it contiguous, e.g,

pdata = TRANSPOSE(REFORM(data.pv[*,*,0]))
CONTOUR, [pdata, pdata[0,*]], [data.lon, 359.99], data.lat

That should work with either MAP_SET or iMAP (but I have never used
iMAP).

> Any ideas and help would be much appreciated... I'm supposed to be
> putting these figures (along with some polar stereographic projections)
> into a talk for thursday! Reaching for brown-paper bag... taking
> deep-breaths...
>
> Thanks
> Jamie
>

I can never make MAP_GRID work right with cylindrical equidistant
projections, so send me an e-mail and I'll send you a routine that draws
gridlines correctly. (k-bowman_AT_tamu.edu ... replace the _AT_)

Ken Bowman
Re: Latitude/longitude, contours, map_set, iMap? [message #43912 is a reply to message #43910] Tue, 03 May 2005 19:40 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
jamiesmyth_uni@yahoo.ca writes:

> I should caveat this by saying I need to plot data on maps about twice
> a year and every time it is more difficult than I expect it to be.

I suspect most of it is figuring out how to get EMACS installed
again. :-)


> I have some atmospheric model data for temperature (originally grib data)
> on a latitude/longitude grid and I'm having quite a difficult time
> plotting it with the iMap and/or the map_set routines. The first
> problem I have is that the longitude data goes from 0-360 degrees. So
> I have:
>
> LAT FLOAT Array[73]
> LON FLOAT Array[96]
> PRESSURE FLOAT Array[22]
> TEMPERATURE FLOAT Array[73, 96, 22]
>
> where the latitdes go from -90 to +90 in 2.5 degree steps and the
> longitudes go from 0 to +360 in 3.75 degree steps. I've read some past
> messages on how to re-work the longitude to -180 to 180 degrees and
> have:
>
> lon_new = lon - (long(lon)/180L)*360.0
>
> Do I have to also alter the temperature array to reflect this change or
> can I simply plot the data with:
>
> imap, transpose(data.pv[*,*,0]), data.lon, data.lat

No, you don't have to change your temperature values.
They will be fine.


> or
>
> map_set, /continents, /mercator, /isotropic
> contour, transpose(data.pv[*,*,0]), data.xlon, data.xlat, /overplot,
> nlevels=12
>
> The first command brings up a dialog box for the 'gridding wizzard' but
> when I click ok, nothing happens. The second looks 'more-or-less' ok
> but there seems to be a gap at 0 degrees. The gap is rather apparent
> when I fill the contours... Do I need to re-grid or triangulate the
> data? Is there a quick way to do any of this?

You need to specify the center of your map projection on
the MAP_SET command. Here is an article that explains what
the problem is:

http://www.dfanning.com/tips/map_center.html

> I'd much prefer to use imap here as it makes figures that look much
> better in powerpoint.

Yeah, well, I don't know anything about iTools. (My tutorials
don't seem to be arriving anymore. I don't know why.) But a quick
look at a half dozen graphics keywords would probably improve
your direct graphic results. In particular, I would have a look
at FONT, THICK, CHARTHICK, and maybe CHARSIZE.

> Any ideas and help would be much appreciated... I'm supposed to be
> putting these figures (along with some polar stereographic projections)
> into a talk for thursday! Reaching for brown-paper bag... taking
> deep-breaths...

Oh, you are almost there! Just a few more minutes. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Oceans
Next Topic: Re: Muddling Through XML Files

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:52:20 PDT 2025

Total time taken to generate the page: 0.00905 seconds