[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

20030619: IDV



>From: Greg Benson <address@hidden>
>Organization: UNAVCO
>Keywords: 200306191451.h5JEpDLd011597 IDV netCDF

Hi Greg-

>Sorry about the mis-send.  Here are the two data files in question.  the
>file '3dto220ref.nc' is the 3D mantle velocity model that I haven't been
>able to plot.  I'm not sure what the final status of the z-axis
>orientation is because I tried several.  The format is a 2x2 degree grid
>(x,y) with depth from 52 to 220 km on a 4 km interval.   I'm guessing that
>the error message I emailed to support@unidata is still on record but I
>can resend it as well as any other required information on request.  

You uncovered a bug in the netCDF grid adapter and I've fixed that.
I'm surprised it didn't show up sooner.  How are you using the
IDV - are you building from source or are you just using the compiled
code?  I'm trying to figure out the best way to get you the fix.

>The other attatched file is my successful plot of shear wave velocity at
>200km depth.  red is fast, blue is slow (reverse of the normal convention
>but it shows the idea).

Okay.  I have a couple of points to make on your 3D file.  From a
dump of the file:

netcdf 3dto220ref {
dimensions:
        lat = 89 ;
        lon = 180 ;
        level = 43 ;
variables:
        float v(lat, lon, level) ;
                v:long_name = "velocity" ;
                v:valid_range = 4., 6. ;
                v:precision = 3 ;
                v:units = "km/s" ;
        int lat(lat) ;
                lat:long_name = "Latitude" ;
                lat:units = "degrees_north" ;
                lat:actual_range = -88, 88 ;
        int lon(lon) ;
                lon:long_name = "Longitude" ;
                lon:units = "degrees_east" ;
                lon:actual_range = 0, 358 ;
        int level(level) ;
                level:long_name = "Depth" ;
                level:units = "kilometers" ;
                level:positive = "up" ;
data:

 v =
  -1.591, -1.247, -0.817, -0.344, 0.129, 0.538, 0.796, 1.011, 1.204, 1.376, 
    1.527, 1.656, 1.763, 1.849, 1.914, 1.871, 1.828, 1.785, 1.763, 1.763, 
    1.785, 1.828, 1.892, 1.935, 1.978, 2, 2.043, 2.065, 2.086, 2.108, 2.108, 
    2.065, 2.022, 2, 2.022, 2.022, 2.022, 2.022, 2.022, 2.022, 2.065, 2.108, 
    2.194,
  -2.559, -2.065, -1.441, -0.903, -0.366, 0.108, 0.473, 0.774, 1.011, 1.226, 
    1.398, 1.527, 1.634, 1.699, 1.785, 1.849, 1.871, 1.871, 1.871, 1.871, 
    1.871, 1.871, 1.892, 1.892, 1.892, 1.892, 1.871, 1.871, 1.849, 1.828, 
    1.828, 1.806, 1.806, 1.806, 1.849, 1.849, 1.871, 1.849, 1.849, 1.871, 
    1.914, 2, 2.043,
  -2.215, -1.699, -1.097, -0.495, 0.065, 0.538, 0.903, 1.183, 1.441, 1.613, 
    1.742, 1.871, 2, 2.086, 2.151, 2.151, 2.129, 2.108, 2.108, 2.108, 2.129, 
    2.108, 2.108, 2.108, 2.108, 2.108, 2.108, 2.129, 2.151, 2.151, 2.151, 
    2.151, 2.129, 2.129, 2.129, 2.086, 2.086, 2.086, 2.108, 2.151, 2.215, 
    2.28, 2.344,
  -2.28, -1.828, -1.312, -0.796, -0.215, 0.344, 0.753, 1.075, 1.333, 1.527, 
    1.72, 1.849, 1.935, 2, 2.043, 2.022, 2, 1.978, 1.957, 1.935, 1.914, 
    1.914, 1.935, 1.957, 1.957, 1.978, 1.935, 1.914, 1.892, 1.892, 1.871, 


There are a couple of things to note.  For v, you have a valid range
of 4. to 6..  Looking at the first few values, most will end up
being missing (NaN) because they fall outside the range.  Out of the
688860 values, only 12922 fall inside this range.  Maybe you know this,
but it was causing me problems when I was trying to show plots.  

Another point is that the "positive" attribute on level should 
have a value of "down" if this is depth.  Thus, a value of 52 would
be 52 km below sea level or -52000 meters.

The range of the depth is outside the normal range of the IDV
display window, so you will have to adjust it.  You can change
the vertical range from the View->Viewpoint->Vertical Scale... menus.
For my tests, I set the range to be from 52000 to 210000, but if
you change to positive down, you should set the range 
to -210000 to -52000.  Range is in meters.  We'll make that 
clearer in the entry widget in the next release.  If you 
are going to be using the IDV to generally show datasets like
this, you can bring it up, set the vertical scale, then go
to the File -> Defaults -> Save as default menu to save the
current state as your default state.  Then, the next time you bring
up the IDV, that range will be used.

Let me know how you are using the IDV (source or compiled).

Don Murray
****************************************************************************
Unidata User Support                                    UCAR Unidata Program
303 497 8643                                                  P.O. Box 3000
address@hidden                                   Boulder, CO 80307
----------------------------------------------------------------------------
Unidata WWW Service              http://my.unidata.ucar.edu/content/support
****************************************************************************