I think the following 2-D construction I have done may be
illuminating:
netcdf plot_12 {
dimensions:
t = UNLIMITED ; // (307 currently)
x = 301 ;
strings = 256 ;
naxes = 2 ;
variables:
float t(t) ;
t:long_name = "Time" ;
float x(x) ;
x:long_name = "Position" ;
float t_axis(t, naxes) ;
t_axis:long_name = "Time Axis" ;
float x_axis(x, naxes) ;
x_axis:long_name = "Space Axis" ;
float p(t, x) ;
p:long_name = "Pressure" ;
p:field = "Pressure" ;
p:positions = "t_axis, product; x_axis, product" ;
data:
t = 0, 0.04637847, 0.08549727, 0.124886, 0.1640534, 0.2035511,
0.2431422,
0.2827758, 0.3224163, 0.3620925, 0.4017066, 0.4410848, 0.4803005,
*SNIP*
x = 0, 0.01, 0.02, 0.03, 0.04, 0.05, 0.06, 0.07, 0.08, 0.09, 0.1, 0.11,
0.12, 0.13, 0.14, 0.15, 0.16, 0.17, 0.18, 0.19, 0.2, 0.21, 0.22,
0.23,
*SNIP*
t_axis =
0, 0,
0.04637847, 0,
0.08549727, 0,
0.124886, 0,
*SNIP*
x_axis =
0, 0,
0, 0.01,
0, 0.02,
0, 0.03,
*SNIP*
You just need to change naxes to 3 and put 0's in the
correct places.
-- Kevin
On Wed, 2001-10-24 at 21:40, [EMAIL PROTECTED] wrote:
>
> OS: Redhat 7.1
> DX: 4.1.3
>
>
> DX'ers,
>
> I am having problems getting the position attribute correct on
> a netcdf file that I am creating. Here is a small example CDL
> file that has one 3d field "cw_mr" and three arrays of earth
> location positions of lon (x), lat (y), level (z).
>
> The following use of "positions" and "product" came from the
> usersguide in section B5. I think it is correct as far as I can tell.
> DX crashes trying to import and before I can get any describe
> messages.
>
> Am I doing this wrong?
>
> Bill
>
> ----------------------- cdl example --------------------------
> netcdf testnetcdf {
> dimensions:
> lon = 61 ;
> lat = 91 ;
> level = 41 ;
> variables:
> double cw_mr(lon, lat, level) ;
> cw_mr:long_name = "Cloud water mixing ratio" ;
> cw_mr:units = "kg/kg" ;
> cw_mr:navigation = "nav" ;
> cw_mr:field = "cw_mr, scalar" ;
> cw_mr:positions = "lon,product;
> lat,product;
> level,product" ;
> float lat(lat) ;
> float lon(lon) ;
> float level(level) ;
>
> // global attributes:
> :title = "Cloud Data" ;
> data:
>
> cw_mr = 0,0, *DATA REMOVED*, 0, 0 ;
>
> lat = 33, 33.0989, *DATA REMOVED*, 41.8022, 41.9011 ;
>
> lon = 124, 124.0984, *DATA REMOVED*, 129.8033, 129.9016 ;
>
> level = 9975, 9935, *DATA REMOVED*, 290, 90 ;
> }
>
> --
> ---------------------------------------------------
> --- Bill Thorson
> --- Software Engineer
> --- Mission Research Corporation / *Aster Division
> --- Ft. Collins, CO
> ---
> --- Phone: 970-282-4400 #27
> --- Email: [EMAIL PROTECTED]
> ---------------------------------------------------