about contour [message #28256] |
Tue, 27 November 2001 16:49  |
tom
Messages: 28 Registered: April 1995
|
Junior Member |
|
|
Hi,I will plot a contour for Z=f(X,Y),
contour,Z,X,Y
I hope only area in which Z<0 to be filled, how to do that?
thanks,
Tom.
|
|
|
Re: about contour [message #36773 is a reply to message #28256] |
Wed, 29 October 2003 01:22   |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <eceee805.0310282257.1de74ee3@posting.google.com>, "Park Kyung
Won" <parkkw@mail1.pknu.ac.kr> wrote:
> Hello
> I want to draw contour.
> Array must be 2 dimension.
> I have ground rainfall data and longitute,latitute data about weather
> station. This data is all 1 dimension data.
> rainfall(300)
> longitute(300)
> latitute(300)
> How can I draw using contour?
Hi,
I'm guessing you want to do a spherical triangulation (instead of a
'regular' triangulation).
Use SPH_SCAT...e.g.
r = SPH_SCAT(longitude, latitude, rainfall, BOUNDS=[0, -90, 360, 90], $
GS=[10,5], gout=gout,bout=bout)
;gout and bout contain the information about the new regular grid,
; stored in r.
;GS is the grid resolution in degrees
x=findgen((gout[0]+bout[2]-bout[0])/gout[0])*gout[0]+bout[0]
y=findgen((gout[1]+bout[3]-bout[1])/gout[1])*gout[1]+bout[1]
contour, r, x,y
;;;;;;;
If you do want a non-spherical triangulation, use TRIANGULATE and
TRIGRID, the help file can tell you how to use them much better than I
can.
Chris.
|
|
|
Re: about contour [message #36851 is a reply to message #28256] |
Fri, 31 October 2003 06:08  |
btt
Messages: 345 Registered: December 2000
|
Senior Member |
|
|
Christopher Lee wrote:
> In article <oGVnb.4174$Nm6.241992@news20.bellglobal.com>, "Chris"
> <not@this.address> wrote:
>
>
>
>> news:20031029.092226.1398295499.15916@buckley.atm.ox.ac.uk.. .
>>
>>> In article <eceee805.0310282257.1de74ee3@posting.google.com>, "Park
>>> Kyung Won" <parkkw@mail1.pknu.ac.kr> wrote:
>
> <snip>
>
>>> Use SPH_SCAT...e.g.
>>>
>
>
>> Can't he use just:
>> contour,rainfall,longitude,latitude,/irregular ;; (assuming lat & lon
>> are in decimal degrees)
>> something like that; plus play around with levels, etc. I don't have IDL
>> up and running right now, so I don't remember :( (another) Chris
>
>
>
>
> You can use /irregular (even though my contour wrapper seems to make a
> dog's breakfast out of it...) to plot the data, but it looks "better" on
> the plot with sph_scat, how much non-existent data the interpolation has
> added I don't know.
>
> In the IDL helpfile example for SPH_SCAT (a sine wave in longitude and
> cosine in latitude I think) the circles on the map appear as circles using
> SPH_SCAT, but they appear as jaggy polygons (reflecting the data) using
> /irregular.
>
> Chris.
Hi,
A couple of other options:
Use the newish GRID_INPUT/GRIDDATA functions that appeared with IDL5.5 These
functions provide many features for sampling the data onto a grid before
contouring.
Use the new iTools contour tool that provides a nice GUI to the GRIDDATA function.
Ben
|
|
|
Re: about contour [message #36856 is a reply to message #28256] |
Thu, 30 October 2003 01:13  |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <eceee805.0310292103.52910172@posting.google.com>, "Park Kyung
Won" <parkkw@mail1.pknu.ac.kr> wrote:
> Thanks relpy.
> Sorry, I didn't give detail information. This area is korea region.
> rainfall(k) : ground weather staion
> longitute(k) : weather sation longitute latitute(k) :weather sation
> latitute
> k : number of weather station
> example
> longitute latitute rainfall
> 128.140 38.285 21.000
> 128.383 38.267 4.000
> 127.306 38.145 22.000
> 128.210 38.217 30.000
> 127.951 38.208 30.000
> . . .
> . . .
> . . .
> I want to use mecartor map projection and draw contour map in korea
> region. Thanks
> Park
Range...ok, just change the ranges I gave from 'whole world' to 126-130
long, 36-38 lat, or whatever the data really is, change GS=[10,5] to
GS=[0.1,0.05] or something, depends on the resolution YOU want.
Ah, fun with maps..
map_set, /mercator, limit=[lower_long, lower_lat, upper_long,upper_lat]
contour,r,x,y, /over
; you will have to play with the contour and the map_set to get the image
; you want, check the helpfile for continent and lat-long lines plotting.
Whether you use the SPH_SCAT or the /irregular keyword on contour, the map
projection method is the same.
Chris.
|
|
|
Re: about contour [message #36857 is a reply to message #28256] |
Thu, 30 October 2003 01:06  |
Chris Lee
Messages: 101 Registered: August 2003
|
Senior Member |
|
|
In article <oGVnb.4174$Nm6.241992@news20.bellglobal.com>, "Chris"
<not@this.address> wrote:
> news:20031029.092226.1398295499.15916@buckley.atm.ox.ac.uk.. .
>> In article <eceee805.0310282257.1de74ee3@posting.google.com>, "Park
>> Kyung Won" <parkkw@mail1.pknu.ac.kr> wrote:
<snip>
>> Use SPH_SCAT...e.g.
>>
> Can't he use just:
> contour,rainfall,longitude,latitude,/irregular ;; (assuming lat & lon
> are in decimal degrees)
> something like that; plus play around with levels, etc. I don't have IDL
> up and running right now, so I don't remember :( (another) Chris
You can use /irregular (even though my contour wrapper seems to make a
dog's breakfast out of it...) to plot the data, but it looks "better" on
the plot with sph_scat, how much non-existent data the interpolation has
added I don't know.
In the IDL helpfile example for SPH_SCAT (a sine wave in longitude and
cosine in latitude I think) the circles on the map appear as circles using
SPH_SCAT, but they appear as jaggy polygons (reflecting the data) using
/irregular.
Chris.
|
|
|
Re: about contour [message #36858 is a reply to message #28256] |
Wed, 29 October 2003 21:03  |
parkkw
Messages: 4 Registered: October 2003
|
Junior Member |
|
|
Thanks relpy.
Sorry, I didn't give detail information.
This area is korea region.
rainfall(k) : ground weather staion
longitute(k) : weather sation longitute
latitute(k) :weather sation latitute
k : number of weather station
example
longitute latitute rainfall
128.140 38.285 21.000
128.383 38.267 4.000
127.306 38.145 22.000
128.210 38.217 30.000
127.951 38.208 30.000
. . .
. . .
. . .
I want to use mecartor map projection and draw contour map in korea region.
Thanks
Park
|
|
|
Re: about contour [message #36866 is a reply to message #36773] |
Wed, 29 October 2003 12:56  |
Chris[1]
Messages: 23 Registered: January 2003
|
Junior Member |
|
|
"Christopher Lee" <cl@127.0.0.1> wrote in message
news:20031029.092226.1398295499.15916@buckley.atm.ox.ac.uk.. .
> In article <eceee805.0310282257.1de74ee3@posting.google.com>, "Park Kyung
> Won" <parkkw@mail1.pknu.ac.kr> wrote:
>
>
>> Hello
>> I want to draw contour.
>> Array must be 2 dimension.
>> I have ground rainfall data and longitute,latitute data about weather
>> station. This data is all 1 dimension data.
>> rainfall(300)
>> longitute(300)
>> latitute(300)
>> How can I draw using contour?
>
> Hi,
>
> I'm guessing you want to do a spherical triangulation (instead of a
> 'regular' triangulation).
>
> Use SPH_SCAT...e.g.
>
> r = SPH_SCAT(longitude, latitude, rainfall, BOUNDS=[0, -90, 360, 90], $
> GS=[10,5], gout=gout,bout=bout)
>
> ;gout and bout contain the information about the new regular grid,
> ; stored in r.
> ;GS is the grid resolution in degrees
>
> x=findgen((gout[0]+bout[2]-bout[0])/gout[0])*gout[0]+bout[0]
> y=findgen((gout[1]+bout[3]-bout[1])/gout[1])*gout[1]+bout[1]
> contour, r, x,y
>
> ;;;;;;;
>
> If you do want a non-spherical triangulation, use TRIANGULATE and
> TRIGRID, the help file can tell you how to use them much better than I
> can.
>
> Chris.
Can't he use just:
contour,rainfall,longitude,latitude,/irregular ;; (assuming lat & lon are in
decimal degrees)
something like that; plus play around with levels, etc.
I don't have IDL up and running right now, so I don't remember :(
(another) Chris
|
|
|