Hovmoller [message #89105] |
Thu, 24 July 2014 12:39  |
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   |
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   |
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 #89120 is a reply to message #89119] |
Fri, 25 July 2014 12:41   |
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 #89122 is a reply to message #89105] |
Fri, 25 July 2014 13:22   |
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   |
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   |
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   |
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   |
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  |
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.
|
|
|