Hello all,

I am importing a netcdf file into dx with 4 different arrays:

x:  [x.0, x.1, ....., x.n]
y:  [y.0, y.1, ....., y.m]
z:  [z.0, z.1, ....., z.p]

data:  [data.(x.0, y.0, z.o), data.(x.1, y.0, z.0), ...., data.(x.n,
y.m, z.p)]

What I want to do is match each data point up to its corresponding
postion.  I have tried Make3DField (see attachment), but it gives the
following error :


ERROR: Make3dField: Compute:  Bad parameter: Inputs must be of same
length / Input 1 not matching the master (input 0)

The Make3dField module does not specify that the x, y, and z positions
must be the same dimensions, so I must be doing something else wrong.
Please help!

Katherine White
CDF
latlontimelat

ÜlonètimeüzxA
 A Ã[EMAIL PROTECTED]
//
// time: Thu Jan  3 16:58:27 2002
//
// version: 3.1.2 (format), 4.1.3 (DX)
//
//
//
// macro reference (direct): Make3DField 
/usr/local/dx/samples/macros/Make3DFieldMacro.net
include "Make3DFieldMacro.net"
//
// MODULE main
// workspace: width = 462, height = 476
// layout: snap = 0, width = 50, height = 50, align = NN
//
macro main(
) -> (
) {
    // 
    // node Import[1]: x = 123, y = 86, inputs = 6, label = Import
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "./foo.nc"
    // input[3]: defaulting = 0, visible = 1, type = 32, value = "netCDF"
    //
main_Import_1_out_1 = 
    Import(
    main_Import_1_in_1,
    main_Import_1_in_2,
    main_Import_1_in_3,
    main_Import_1_in_4,
    main_Import_1_in_5,
    main_Import_1_in_6
    ) [instance: 1, cache: 1];
    // 
    // node Select[4]: x = 413, y = 166, inputs = 3, label = Select
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "z"
    //
main_Select_4_out_1 = 
    Select(
    main_Import_1_out_1,
    main_Select_4_in_2,
    main_Select_4_in_3
    ) [instance: 4, cache: 1];
    // 
    // node Extract[18]: x = 383, y = 262, inputs = 2, label = Extract
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "data"
    //
main_Extract_18_out_1 = 
    Extract(
    main_Select_4_out_1,
    main_Extract_18_in_2
    ) [instance: 18, cache: 1];
    // 
    // node Select[1]: x = 78, y = 172, inputs = 3, label = Select
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "lat"
    //
main_Select_1_out_1 = 
    Select(
    main_Import_1_out_1,
    main_Select_1_in_2,
    main_Select_1_in_3
    ) [instance: 1, cache: 1];
    // 
    // node Select[2]: x = 157, y = 168, inputs = 3, label = Select
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "lon"
    //
main_Select_2_out_1 = 
    Select(
    main_Import_1_out_1,
    main_Select_2_in_2,
    main_Select_2_in_3
    ) [instance: 2, cache: 1];
    // 
    // node Select[3]: x = 288, y = 168, inputs = 3, label = Select
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "time"
    //
main_Select_3_out_1 = 
    Select(
    main_Import_1_out_1,
    main_Select_3_in_2,
    main_Select_3_in_3
    ) [instance: 3, cache: 1];
    // 
    // node Make3DField[2]: x = 106, y = 358, inputs = 4, label = Make3DField
    // input[3]: defaulting = 1, visible = 1, type = 16777245, value = {0}
    //
main_Make3DField_2_out_1 = 
    Make3DField(
    main_Select_1_out_1,
    main_Select_2_out_1,
    main_Select_3_out_1,
    main_Extract_18_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Print[1]: x = 221, y = 414, inputs = 3, label = Print
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "rd"
    //
    Print(
    main_Make3DField_2_out_1,
    main_Print_1_in_2,
    main_Print_1_in_3
    ) [instance: 1, cache: 1];
// network: end of macro body
}
main_Import_1_in_1 = "./foo.nc";
main_Import_1_in_2 = NULL;
main_Import_1_in_3 = "netCDF";
main_Import_1_in_4 = NULL;
main_Import_1_in_5 = NULL;
main_Import_1_in_6 = NULL;
main_Import_1_out_1 = NULL;
main_Select_4_in_2 = "z";
main_Select_4_in_3 = NULL;
main_Select_4_out_1 = NULL;
main_Extract_18_in_2 = "data";
main_Extract_18_out_1 = NULL;
main_Select_1_in_2 = "lat";
main_Select_1_in_3 = NULL;
main_Select_1_out_1 = NULL;
main_Select_2_in_2 = "lon";
main_Select_2_in_3 = NULL;
main_Select_2_out_1 = NULL;
main_Select_3_in_2 = "time";
main_Select_3_in_3 = NULL;
main_Select_3_out_1 = NULL;
main_Make3DField_2_out_1 = NULL;
main_Print_1_in_2 = "rd";
main_Print_1_in_3 = NULL;
Executive("product version 4 1 3");
$sync
main();

Reply via email to