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

Home » Public Forums » archive » Hovmoller
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
Hovmoller [message #89105] Thu, 24 July 2014 12:39 Go to next message
tjc0010 is currently offline  tjc0010
Messages: 5
Registered: July 2014
Junior Member
I have been able to read in several NetCDF files, and now I am attempting to create Hovmoller diagrams, but cannot get the data to cooperate with me. The data is as follows:
temp=[2000,2000, 2]
lon=[2000,2000,2]
lat=[2000,2000,2]
time=[2]

Any suggestions on how to create these plots would be much appreciated.

Thanks
Re: Hovmoller [message #89114 is a reply to message #89105] Fri, 25 July 2014 06:36 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tjc0010@uah.edu writes:

> I have been able to read in several NetCDF files, and now I am attempting to create Hovmoller diagrams, but cannot get the data to cooperate with me. The data is as follows:
> temp=[2000,2000, 2]
> lon=[2000,2000,2]
> lat=[2000,2000,2]
> time=[2]
>
> Any suggestions on how to create these plots would be much appreciated.

Movmoller plots are time vs latitude or time vs longitude plots. You
will have an EXTREMELY difficult time producing such plots with only two
time points! :-)

Are you sure this is what you want?

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Hovmoller [message #89118 is a reply to message #89114] Fri, 25 July 2014 11:27 Go to previous messageGo to next message
tjc0010 is currently offline  tjc0010
Messages: 5
Registered: July 2014
Junior Member
On Friday, July 25, 2014 8:36:40 AM UTC-5, David Fanning wrote:
> tjc0010@uah.edu writes:
>
>
>
>> I have been able to read in several NetCDF files, and now I am attempting to create Hovmoller diagrams, but cannot get the data to cooperate with me. The data is as follows:
>
>> temp=[2000,2000, 2]
>
>> lon=[2000,2000,2]
>
>> lat=[2000,2000,2]
>
>> time=[2]
>
>>
>
>> Any suggestions on how to create these plots would be much appreciated.
>
>
>
> Movmoller plots are time vs latitude or time vs longitude plots. You
>
> will have an EXTREMELY difficult time producing such plots with only two
>
> time points! :-)
>
>
>
> Are you sure this is what you want?
>
>
>
> Cheers,
>
>
>
> David
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

When I use the WHERE function to limit the temperature values and use that index on over the time array I get an equal number of time and longitude values.
Re: Hovmoller [message #89119 is a reply to message #89118] Fri, 25 July 2014 11:47 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tjc0010@uah.edu writes:

> When I use the WHERE function to limit the temperature values and use that index on over the time array I get an equal number of time and longitude values.

Well, then you are doing it wrong. :-)

Believe me, you only have two temperature values in this file. Print out
your time array.

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Hovmoller [message #89120 is a reply to message #89119] Fri, 25 July 2014 12:41 Go to previous messageGo to next message
tjc0010 is currently offline  tjc0010
Messages: 5
Registered: July 2014
Junior Member
On Friday, July 25, 2014 1:47:23 PM UTC-5, David Fanning wrote:
> tjc0010@uah.edu writes:
>
>
>
>> When I use the WHERE function to limit the temperature values and use that index on over the time array I get an equal number of time and longitude values.
>
>
>
> Well, then you are doing it wrong. :-)
>
>
>
> Believe me, you only have two temperature values in this file. Print out
>
> your time array.
>
>
>
> Cheers,
>
>
>
> David
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Here is my time array after I read in 2 files:

TIME FLOAT = Array[2]

Then I try to find where the temps are less than 220:
IND=WHERE(temp LE 220, count)
temp=temp[IND]
help, temp
TEMP FLOAT = Array[205967]
Re: Hovmoller [message #89121 is a reply to message #89120] Fri, 25 July 2014 13:20 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tjc0010@uah.edu writes:

> Here is my time array after I read in 2 files:
>
> TIME FLOAT = Array[2]
>
> Then I try to find where the temps are less than 220:
> IND=WHERE(temp LE 220, count)
> temp=temp[IND]
> help, temp
> TEMP FLOAT = Array[205967]

Yes, but I'm not sure why you are telling me this. A Hovmoller plot is a
plot of temperature with longitude (or latitude) along one axis and time
along the other. You have two time points. What do you expect the
"plot" to look like?

If I were you, I would just contour the two temperature "images" you
have next to each other and label them with the two times you have. You
will have the advantage that people will understand what you are
showing. :-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Hovmoller [message #89122 is a reply to message #89105] Fri, 25 July 2014 13:22 Go to previous messageGo to next message
tjc0010 is currently offline  tjc0010
Messages: 5
Registered: July 2014
Junior Member
On Thursday, July 24, 2014 2:39:06 PM UTC-5, tjc...@uah.edu wrote:
> I have been able to read in several NetCDF files, and now I am attempting to create Hovmoller diagrams, but cannot get the data to cooperate with me. The data is as follows:
>
> temp=[2000,2000, 2]
>
> lon=[2000,2000,2]
>
> lat=[2000,2000,2]
>
> time=[2]
>
>
>
> Any suggestions on how to create these plots would be much appreciated.
>
>
>
> Thanks

Well I have about 20 files and will want to show eastward propagation with time
Re: Hovmoller [message #89123 is a reply to message #89122] Fri, 25 July 2014 13:49 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
tjc0010@uah.edu writes:

> Well I have about 20 files and will want to show eastward propagation with time

Ah, so you have more than one file. As Wesley says in the Princess
Bride, "Why didn't you mention the wheelbarrow among our assets the
first time?"

Presumably these files contain data points at different times. Perhaps
you have 20 such times. Now we are getting somewhere!

What you have to do is build up a 2D array by selecting for longitude
and saving the temperatures at those longitudes.

ntimes = 20

; Read the first file, just to see how big array has to be.
... read the data file, extract variables, etc.
lonIndices = where(lons gt -25 and lons lt 40)

; Temperature at longitude and time
data = FltArr(N_Elements(lonIndices), ntimes)
temps = temps[lonIndices]
times = FltArr(ntimes)

; Read the files in a loop and extract info for Hovmoller plot.
for j=0,19 DO BEGIN
... Read file, extract variables, etc.
times = time[0]
data[*,j] = temps[lonIndices]
endfor

Now, make your plot...

cgContour, data, times, lons[lonIndices], ... ; Hovmoller plot

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Hovmoller [message #89147 is a reply to message #89105] Mon, 28 July 2014 12:41 Go to previous messageGo to next message
tjc0010 is currently offline  tjc0010
Messages: 5
Registered: July 2014
Junior Member
On Thursday, July 24, 2014 2:39:06 PM UTC-5, tjc...@uah.edu wrote:
> I have been able to read in several NetCDF files, and now I am attempting to create Hovmoller diagrams, but cannot get the data to cooperate with me. The data is as follows:
>
> temp=[2000,2000, 2]
>
> lon=[2000,2000,2]
>
> lat=[2000,2000,2]
>
> time=[2]
>
>
>
> Any suggestions on how to create these plots would be much appreciated.
>
>
>
> Thanks

Thanks David
Re: Hovmoller [message #94943 is a reply to message #89123] Wed, 27 December 2017 12:30 Go to previous messageGo to next message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
No disrespect intended, but what if we want to make said plot without using Coyote graphics?


On Friday, July 25, 2014 at 1:49:02 PM UTC-7, David Fanning wrote:
> tjc0010@uah.edu writes:
>
>> Well I have about 20 files and will want to show eastward propagation with time
>
> Ah, so you have more than one file. As Wesley says in the Princess
> Bride, "Why didn't you mention the wheelbarrow among our assets the
> first time?"
>
> Presumably these files contain data points at different times. Perhaps
> you have 20 such times. Now we are getting somewhere!
>
> What you have to do is build up a 2D array by selecting for longitude
> and saving the temperatures at those longitudes.
>
> ntimes = 20
>
> ; Read the first file, just to see how big array has to be.
> ... read the data file, extract variables, etc.
> lonIndices = where(lons gt -25 and lons lt 40)
>
> ; Temperature at longitude and time
> data = FltArr(N_Elements(lonIndices), ntimes)
> temps = temps[lonIndices]
> times = FltArr(ntimes)
>
> ; Read the files in a loop and extract info for Hovmoller plot.
> for j=0,19 DO BEGIN
> ... Read file, extract variables, etc.
> times = time[0]
> data[*,j] = temps[lonIndices]
> endfor
>
> Now, make your plot...
>
> cgContour, data, times, lons[lonIndices], ... ; Hovmoller plot
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: Hovmoller [message #94944 is a reply to message #94943] Wed, 27 December 2017 18:52 Go to previous messageGo to next message
Jim  Pendleton is currently offline  Jim Pendleton
Messages: 165
Registered: November 2011
Senior Member
On Wednesday, December 27, 2017 at 1:30:05 PM UTC-7, laura...@gmail.com wrote:
> No disrespect intended, but what if we want to make said plot without using Coyote graphics?
>
>
> On Friday, July 25, 2014 at 1:49:02 PM UTC-7, David Fanning wrote:
>> tjc0010@uah.edu writes:
>>
>>> Well I have about 20 files and will want to show eastward propagation with time
>>
>> Ah, so you have more than one file. As Wesley says in the Princess
>> Bride, "Why didn't you mention the wheelbarrow among our assets the
>> first time?"
>>
>> Presumably these files contain data points at different times. Perhaps
>> you have 20 such times. Now we are getting somewhere!
>>
>> What you have to do is build up a 2D array by selecting for longitude
>> and saving the temperatures at those longitudes.
>>
>> ntimes = 20
>>
>> ; Read the first file, just to see how big array has to be.
>> ... read the data file, extract variables, etc.
>> lonIndices = where(lons gt -25 and lons lt 40)
>>
>> ; Temperature at longitude and time
>> data = FltArr(N_Elements(lonIndices), ntimes)
>> temps = temps[lonIndices]
>> times = FltArr(ntimes)
>>
>> ; Read the files in a loop and extract info for Hovmoller plot.
>> for j=0,19 DO BEGIN
>> ... Read file, extract variables, etc.
>> times = time[0]
>> data[*,j] = temps[lonIndices]
>> endfor
>>
>> Now, make your plot...
>>
>> cgContour, data, times, lons[lonIndices], ... ; Hovmoller plot
>>
>> Cheers,
>>
>> David
>> --
>> David Fanning, Ph.D.
>> Fanning Software Consulting, Inc.
>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

IDL has a built-in CONTOUR function that doesn't rely on the David's Coyote library.

https://www.harrisgeospatial.com/docs/contour.html
Re: Hovmoller [message #94946 is a reply to message #94944] Fri, 29 December 2017 14:22 Go to previous message
laura.hike is currently offline  laura.hike
Messages: 87
Registered: September 2013
Member
On Wednesday, December 27, 2017 at 6:52:46 PM UTC-8, Jim P wrote:
> On Wednesday, December 27, 2017 at 1:30:05 PM UTC-7, laura...@gmail.com wrote:
>> No disrespect intended, but what if we want to make said plot without using Coyote graphics?
>>
>>
>> On Friday, July 25, 2014 at 1:49:02 PM UTC-7, David Fanning wrote:
>>> tjc0010@uah.edu writes:
>>>
>>>> Well I have about 20 files and will want to show eastward propagation with time
>>>
>>> Ah, so you have more than one file. As Wesley says in the Princess
>>> Bride, "Why didn't you mention the wheelbarrow among our assets the
>>> first time?"
>>>
>>> Presumably these files contain data points at different times. Perhaps
>>> you have 20 such times. Now we are getting somewhere!
>>>
>>> What you have to do is build up a 2D array by selecting for longitude
>>> and saving the temperatures at those longitudes.
>>>
>>> ntimes = 20
>>>
>>> ; Read the first file, just to see how big array has to be.
>>> ... read the data file, extract variables, etc.
>>> lonIndices = where(lons gt -25 and lons lt 40)
>>>
>>> ; Temperature at longitude and time
>>> data = FltArr(N_Elements(lonIndices), ntimes)
>>> temps = temps[lonIndices]
>>> times = FltArr(ntimes)
>>>
>>> ; Read the files in a loop and extract info for Hovmoller plot.
>>> for j=0,19 DO BEGIN
>>> ... Read file, extract variables, etc.
>>> times = time[0]
>>> data[*,j] = temps[lonIndices]
>>> endfor
>>>
>>> Now, make your plot...
>>>
>>> cgContour, data, times, lons[lonIndices], ... ; Hovmoller plot
>>>
>>> Cheers,
>>>
>>> David
>>> --
>>> David Fanning, Ph.D.
>>> Fanning Software Consulting, Inc.
>>> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>>> Sepore ma de ni thue. ("Perhaps thou speakest truth.")
>
> IDL has a built-in CONTOUR function that doesn't rely on the David's Coyote library.
>
> https://www.harrisgeospatial.com/docs/contour.html

I don't think contour is what I want. Doesn't it always filter/interpolate the data? Maybe "image" will do.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: spam is destroying this group
Next Topic: New Google Group: idl-pvwave

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

Current Time: Wed Oct 08 07:17:06 PDT 2025

Total time taken to generate the page: 0.00507 seconds