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

Home » Public Forums » archive » Re: Weird behaviour in SURFACE procedure
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: Weird behaviour in SURFACE procedure [message #60885] Tue, 17 June 2008 08:54
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Bob Crawford wrote:
> On Jun 17, 10:05 am, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
>> Hello,
>>
>> I put together the following test case:
>>
>> pro testit, lego=lego
>> t = [273.0,279.0,285.0,291.0,297.0,303.0]
>> s = [20.0,22.0,24.0,26.0,28.0,30.0,32.0,34.0,36.0,38.0,40.0]
>> e = [[79.3482,77.6361,75.9746,74.5451,73.0994,71.4641],$
>> [79.1002,77.3120,75.5867,74.0939,72.6238,71.0040],$
>> [78.8522,76.9879,75.1988,73.6427,72.1483,70.5440],$
>> [78.6042,76.6638,74.8109,73.1916,71.6728,70.0839],$
>> [78.3561,76.3397,74.4230,72.7404,71.1973,69.6238],$
>> [78.1081,76.0156,74.0351,72.2892,70.7218,69.1638],$
>> [77.8601,75.6915,73.6473,71.8380,70.2463,68.7037],$
>> [77.6121,75.3674,73.2594,71.3869,69.7708,68.2436],$
>> [77.3641,75.0433,72.8715,70.9357,69.2953,67.7836],$
>> [77.1161,74.7192,72.4836,70.4845,68.8198,67.3235],$
>> [76.8680,74.3951,72.0957,70.0333,68.3443,66.8634]]
>> window,0
>> surface, e, t, s,$
>> xtitle='Temperature (K)',$
>> ytitle='Salinity (ppt)',$
>> ztitle='Static permittivity',$
>> charsize=3.0, lego=lego
>> window,1
>> contour, e, t, s,$
>> xtitle='Temperature (K)',$
>> ytitle='Salinity (ppt)',$
>> title='Static permittivity', $
>> levels=[66,68,70,72,74,76,78,80], $
>> c_labels=[1,1,1,1,1,1,1,1], $
>> c_charsize=1.0
>> isurface, e, t, s,$
>> xtitle='Temperature (K)',$
>> ytitle='Salinity (ppt)',$
>> ztitle='Static permittivity'
>> end
>>
>> If I simply run the above, the result of the SURFACE procedure does not match either the
>> CONTOUR or ISURFACE output. It's as though there has been a rotation of 90deg clockwise in
>> the surface, but not the axes. If you count the number of datapoints in the x- (or
>> temperature) direction of the surface plot, I see 11 values and it should be 6.
>>
>> However, if I use the /LEGO keyword, then the SURFACE output seems correct compared to the
>> other two plots.
>>
>> Note that the max value of the data should occur on the T=273K, S=20.0ppt corner, and the
>> min value in the T=303K, S=40.0ppt corner.
>>
>> Can someone else run the above test code and verify?
>>
>> I'm running:
>>
>> IDL> print, !version
>> { x86 linux unix linux 7.0 Oct 25 2007 32 64}
>>
>> on RHE 4.0
>>
>> Thanks for any feedback.
>>
>> cheers,
>>
>> paulv
>
> Same result here (WinXp) ... but I think what you're seeing is the
> underside of the surface on the surface plot.

Ahhh......

Or should I say, "D'oh!" ?

You're a genius!

I changed the above code to do

surface, e, t, s,$
xtitle='Temperature (K)',$
ytitle='Salinity (ppt)',$
ztitle='Static permittivity',$
charsize=3.0, lego=lego,/save
plots, [273,273],[20,20],[66,79.3482],/t3d

and, sure enough, the line goes to the correct point. Using the /UPPER_ONLY keyword also
confirms.

Man, I've got to print out that surface and see if its eyes follow me as I walk around the
room...... (ehem).

Thanks again!

cheers,

paulv
Re: Weird behaviour in SURFACE procedure [message #60886 is a reply to message #60885] Tue, 17 June 2008 08:43 Go to previous message
Bob[3] is currently offline  Bob[3]
Messages: 60
Registered: December 2006
Member
On Jun 17, 11:37 am, Bob Crawford <Snowma...@gmail.com> wrote:
> On Jun 17, 10:05 am, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
>
>
>
>
>
>> Hello,
>
>> I put together the following test case:
>
>> pro testit, lego=lego
>>    t = [273.0,279.0,285.0,291.0,297.0,303.0]
>>    s = [20.0,22.0,24.0,26.0,28.0,30.0,32.0,34.0,36.0,38.0,40.0]
>>    e = [[79.3482,77.6361,75.9746,74.5451,73.0994,71.4641],$
>>         [79.1002,77.3120,75.5867,74.0939,72.6238,71.0040],$
>>         [78.8522,76.9879,75.1988,73.6427,72.1483,70.5440],$
>>         [78.6042,76.6638,74.8109,73.1916,71.6728,70.0839],$
>>         [78.3561,76.3397,74.4230,72.7404,71.1973,69.6238],$
>>         [78.1081,76.0156,74.0351,72.2892,70.7218,69.1638],$
>>         [77.8601,75.6915,73.6473,71.8380,70.2463,68.7037],$
>>         [77.6121,75.3674,73.2594,71.3869,69.7708,68.2436],$
>>         [77.3641,75.0433,72.8715,70.9357,69.2953,67.7836],$
>>         [77.1161,74.7192,72.4836,70.4845,68.8198,67.3235],$
>>         [76.8680,74.3951,72.0957,70.0333,68.3443,66.8634]]
>>    window,0
>>    surface, e, t, s,$
>>             xtitle='Temperature (K)',$
>>             ytitle='Salinity (ppt)',$
>>             ztitle='Static permittivity',$
>>             charsize=3.0, lego=lego
>>    window,1
>>    contour, e, t, s,$
>>             xtitle='Temperature (K)',$
>>             ytitle='Salinity (ppt)',$
>>             title='Static permittivity', $
>>             levels=[66,68,70,72,74,76,78,80], $
>>             c_labels=[1,1,1,1,1,1,1,1], $
>>             c_charsize=1.0
>>    isurface, e, t, s,$
>>              xtitle='Temperature (K)',$
>>              ytitle='Salinity (ppt)',$
>>              ztitle='Static permittivity'
>> end
>
>> If I simply run the above, the result of the SURFACE procedure does not match either the
>> CONTOUR or ISURFACE output. It's as though there has been a rotation of 90deg clockwise in
>> the surface, but not the axes. If you count the number of datapoints in the x- (or
>> temperature) direction of the surface plot, I see 11 values and it should be 6.
>
>> However, if I use the /LEGO keyword, then the SURFACE output seems correct compared to the
>> other two plots.
>
>> Note that the max value of the data should occur on the T=273K, S=20.0ppt corner, and the
>> min value in the T=303K, S=40.0ppt corner.
>
>> Can someone else run the above test code and verify?
>
>> I'm running:
>
>> IDL> print, !version
>> { x86 linux unix linux 7.0 Oct 25 2007      32      64}
>
>> on RHE 4.0
>
>> Thanks for any feedback.
>
>> cheers,
>
>> paulv
>
> Same result here (WinXp) ... but I think what you're seeing is the
> underside of the surface on the surface plot.
>
> Bob.- Hide quoted text -
>
> - Show quoted text -

Try adding /upper_only or /lower_only or a skirt parameter to the
SURFACE command to see what is happening.
Re: Weird behaviour in SURFACE procedure [message #60887 is a reply to message #60886] Tue, 17 June 2008 08:37 Go to previous message
Bob[3] is currently offline  Bob[3]
Messages: 60
Registered: December 2006
Member
On Jun 17, 10:05 am, Paul van Delst <Paul.vanDe...@noaa.gov> wrote:
> Hello,
>
> I put together the following test case:
>
> pro testit, lego=lego
>    t = [273.0,279.0,285.0,291.0,297.0,303.0]
>    s = [20.0,22.0,24.0,26.0,28.0,30.0,32.0,34.0,36.0,38.0,40.0]
>    e = [[79.3482,77.6361,75.9746,74.5451,73.0994,71.4641],$
>         [79.1002,77.3120,75.5867,74.0939,72.6238,71.0040],$
>         [78.8522,76.9879,75.1988,73.6427,72.1483,70.5440],$
>         [78.6042,76.6638,74.8109,73.1916,71.6728,70.0839],$
>         [78.3561,76.3397,74.4230,72.7404,71.1973,69.6238],$
>         [78.1081,76.0156,74.0351,72.2892,70.7218,69.1638],$
>         [77.8601,75.6915,73.6473,71.8380,70.2463,68.7037],$
>         [77.6121,75.3674,73.2594,71.3869,69.7708,68.2436],$
>         [77.3641,75.0433,72.8715,70.9357,69.2953,67.7836],$
>         [77.1161,74.7192,72.4836,70.4845,68.8198,67.3235],$
>         [76.8680,74.3951,72.0957,70.0333,68.3443,66.8634]]
>    window,0
>    surface, e, t, s,$
>             xtitle='Temperature (K)',$
>             ytitle='Salinity (ppt)',$
>             ztitle='Static permittivity',$
>             charsize=3.0, lego=lego
>    window,1
>    contour, e, t, s,$
>             xtitle='Temperature (K)',$
>             ytitle='Salinity (ppt)',$
>             title='Static permittivity', $
>             levels=[66,68,70,72,74,76,78,80], $
>             c_labels=[1,1,1,1,1,1,1,1], $
>             c_charsize=1.0
>    isurface, e, t, s,$
>              xtitle='Temperature (K)',$
>              ytitle='Salinity (ppt)',$
>              ztitle='Static permittivity'
> end
>
> If I simply run the above, the result of the SURFACE procedure does not match either the
> CONTOUR or ISURFACE output. It's as though there has been a rotation of 90deg clockwise in
> the surface, but not the axes. If you count the number of datapoints in the x- (or
> temperature) direction of the surface plot, I see 11 values and it should be 6.
>
> However, if I use the /LEGO keyword, then the SURFACE output seems correct compared to the
> other two plots.
>
> Note that the max value of the data should occur on the T=273K, S=20.0ppt corner, and the
> min value in the T=303K, S=40.0ppt corner.
>
> Can someone else run the above test code and verify?
>
> I'm running:
>
> IDL> print, !version
> { x86 linux unix linux 7.0 Oct 25 2007      32      64}
>
> on RHE 4.0
>
> Thanks for any feedback.
>
> cheers,
>
> paulv

Same result here (WinXp) ... but I think what you're seeing is the
underside of the surface on the surface plot.

Bob.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Weird behaviour in SURFACE procedure
Next Topic: Use of STOP inside an IF statement

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

Current Time: Wed Oct 08 15:28:18 PDT 2025

Total time taken to generate the page: 0.00479 seconds