• Hovmoller

    From laura.hike@gmail.com@21:1/5 to David Fanning on Wed Dec 27 12:30:02 2017
    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.")

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jim P@21:1/5 to laura...@gmail.com on Wed Dec 27 18:52:42 2017
    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

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From laura.hike@gmail.com@21:1/5 to Jim P on Fri Dec 29 14:22:19 2017
    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.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)