|
Re: Contour dimension problem [message #78426 is a reply to message #78424] |
Sat, 26 November 2011 13:55  |
Mat
Messages: 14 Registered: December 2009
|
Junior Member |
|
|
Hi Ken,
Thanks for your help that’s done the trick. You are right I'm a
beginner, I'm buying your book for kindle right now!
CONTOUR, temp.FIELD1, time.FIELD1, depth.FIELD1, /irregular,
nlevels=10
|
|
|
Re: Contour dimension problem [message #78428 is a reply to message #78426] |
Sat, 26 November 2011 13:23  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <edd5e854-16f7-4e76-903a-2728823af6cd@d37g2000prg.googlegroups.com>,
Mat <mga1@waikato.ac.nz> wrote:
> I thought depth_time was 2d but I see its not. Anyway here is the
> result of help:
> IDL> help, temp, time, depth
> TEMP STRUCT = -> <Anonymous> Array[1]
> TIME STRUCT = -> <Anonymous> Array[1]
> DEPTH STRUCT = -> <Anonymous> Array[1]
>
> I thought this would work for vectors but I get:
>
> IDL> contour, temp,time,depth, /Irregular
> % CONTOUR: Struct expression not allowed in this context: TIME.
> % Execution halted at: $MAIN$
CONTOUR is expecting an array, and you are giving it a structure. The data you
want is probably inside the structure TEMP.
Try
HELP, temp, time, depth, /STR
to find out what is inside your structures.
Then you need to do something like
CONTOUR, temp.something, time.something, depth.something
where "something" is the name of the array inside each structure.
Also, it sounds like you are an IDL beginner. I recommend you get an IDL book
(like mine, which is aimed at beginners). Go to Amazon and search for "bowman
idl"
Ken
|
|
|
Re: Contour dimension problem [message #78429 is a reply to message #78428] |
Sat, 26 November 2011 12:40  |
Mat
Messages: 14 Registered: December 2009
|
Junior Member |
|
|
On Nov 27, 2:57 am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> In article < f717fe01-26a2-47db-b9f8-1a1157eac...@a2g2000prb.googlegroups .com >,
>
>
>
>
>
>
>
>
>
> Mat <m...@waikato.ac.nz> wrote:
>> On Nov 26, 5:02 am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
>>> In article
>>> < cca14042-fbbd-40da-a693-70828da8c...@s17g2000pra.googlegroup s.com >,
>
>>> Mat <m...@waikato.ac.nz> wrote:
>>>> I'm trying to create a contour plot of temperature, depth and time.
>>>> Right now I have the temperature at 13 depths and 30169 date/times as
>>>> "temp" FLOAT [13, 30169], "depths" Int[13], and "time" FLOAT[30169].
>
>>>> I don't have my dimensions right for the following command:
>
>>>> IDL> contour, temp, time, depths
>>>> % CONTOUR: Array must have 2 dimensions: TEMP.
>>>> % Execution halted at: $MAIN$
>
>>>> Does anyone know the command to contour this data with one degree
>>>> contours?
>
>>>> Thanks for your help
>
>>> Try
>
>>> HELP, temp, time, depths
>
>>> If temp = temp(depth, time)
>
>>> Then you should call
>
>>> CONTOUR, temp, depth, time
>
>>> I hope your data is very smooth in the time dimension.
>
>>> Ken Bowman
>
>> Hi Ken,
>
>> Thanks for your help. My data is in 15 min intervals. I would think a
>> matrix is 2d but it still gives me the same error when I create a
>> matrix of temperature and depth! Is there an ideal way to format the
>> data to make this easier. What if I put all the data into a matrix of
>> time, depth, temp. OR separate into 3 vectors?
>
> What is the result when you do this?
>
> HELP, temp, time, depths
>
> It sounds like you think that temp is a 2-D array, but it is not.
>
> Ken
Hi Ken,
I thought depth_time was 2d but I see its not. Anyway here is the
result of help:
IDL> help, temp, time, depth
TEMP STRUCT = -> <Anonymous> Array[1]
TIME STRUCT = -> <Anonymous> Array[1]
DEPTH STRUCT = -> <Anonymous> Array[1]
I thought this would work for vectors but I get:
IDL> contour, temp,time,depth, /Irregular
% CONTOUR: Struct expression not allowed in this context: TIME.
% Execution halted at: $MAIN$
One thing to note is that this is a very large dataset, with depth,
time, and temp all FLOAT[392197].
Cheers,
Mat
|
|
|
Re: Contour dimension problem [message #78430 is a reply to message #78429] |
Sat, 26 November 2011 05:57  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <f717fe01-26a2-47db-b9f8-1a1157eac29c@a2g2000prb.googlegroups.com>,
Mat <mga1@waikato.ac.nz> wrote:
> On Nov 26, 5:02�am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
>> In article
>> < cca14042-fbbd-40da-a693-70828da8c...@s17g2000pra.googlegroup s.com >,
>>
>> �Mat <m...@waikato.ac.nz> wrote:
>>> I'm trying to create a contour plot of temperature, depth and time.
>>> Right now I have the temperature at 13 depths and 30169 date/times as
>>> "temp" FLOAT [13, 30169], "depths" Int[13], and "time" FLOAT[30169].
>>
>>> I don't have my dimensions right for the following command:
>>
>>> IDL> contour, temp, time, depths
>>> % CONTOUR: Array must have 2 dimensions: TEMP.
>>> % Execution halted at: $MAIN$
>>
>>> Does anyone know the command to contour this data with one degree
>>> contours?
>>
>>> Thanks for your help
>>
>> Try
>>
>> � �HELP, temp, time, depths
>>
>> If temp = temp(depth, time)
>>
>> Then you should call
>>
>> � �CONTOUR, temp, depth, time
>>
>> I hope your data is very smooth in the time dimension.
>>
>> Ken Bowman
>
> Hi Ken,
>
> Thanks for your help. My data is in 15 min intervals. I would think a
> matrix is 2d but it still gives me the same error when I create a
> matrix of temperature and depth! Is there an ideal way to format the
> data to make this easier. What if I put all the data into a matrix of
> time, depth, temp. OR separate into 3 vectors?
What is the result when you do this?
HELP, temp, time, depths
It sounds like you think that temp is a 2-D array, but it is not.
Ken
|
|
|
Re: Contour dimension problem [message #78432 is a reply to message #78430] |
Fri, 25 November 2011 14:18  |
Mat
Messages: 14 Registered: December 2009
|
Junior Member |
|
|
On Nov 26, 5:02 am, "Kenneth P. Bowman" <k-bow...@null.edu> wrote:
> In article < cca14042-fbbd-40da-a693-70828da8c...@s17g2000pra.googlegroup s.com >,
>
> Mat <m...@waikato.ac.nz> wrote:
>> I'm trying to create a contour plot of temperature, depth and time.
>> Right now I have the temperature at 13 depths and 30169 date/times as
>> "temp" FLOAT [13, 30169], "depths" Int[13], and "time" FLOAT[30169].
>
>> I don't have my dimensions right for the following command:
>
>> IDL> contour, temp, time, depths
>> % CONTOUR: Array must have 2 dimensions: TEMP.
>> % Execution halted at: $MAIN$
>
>> Does anyone know the command to contour this data with one degree
>> contours?
>
>> Thanks for your help
>
> Try
>
> HELP, temp, time, depths
>
> If temp = temp(depth, time)
>
> Then you should call
>
> CONTOUR, temp, depth, time
>
> I hope your data is very smooth in the time dimension.
>
> Ken Bowman
Hi Ken,
Thanks for your help. My data is in 15 min intervals. I would think a
matrix is 2d but it still gives me the same error when I create a
matrix of temperature and depth! Is there an ideal way to format the
data to make this easier. What if I put all the data into a matrix of
time, depth, temp. OR separate into 3 vectors?
|
|
|
Re: Contour dimension problem [message #78433 is a reply to message #78432] |
Fri, 25 November 2011 08:02  |
Kenneth P. Bowman
Messages: 585 Registered: May 2000
|
Senior Member |
|
|
In article <cca14042-fbbd-40da-a693-70828da8c455@s17g2000pra.googlegroups.com>,
Mat <mga1@waikato.ac.nz> wrote:
> I'm trying to create a contour plot of temperature, depth and time.
> Right now I have the temperature at 13 depths and 30169 date/times as
> "temp" FLOAT [13, 30169], "depths" Int[13], and "time" FLOAT[30169].
>
> I don't have my dimensions right for the following command:
>
> IDL> contour, temp, time, depths
> % CONTOUR: Array must have 2 dimensions: TEMP.
> % Execution halted at: $MAIN$
>
> Does anyone know the command to contour this data with one degree
> contours?
>
> Thanks for your help
Try
HELP, temp, time, depths
If temp = temp(depth, time)
Then you should call
CONTOUR, temp, depth, time
I hope your data is very smooth in the time dimension.
Ken Bowman
|
|
|