// // time: Fri Aug 30 15:51:17 1996 // // version: 3.0.0 (format), 3.1.2 (DX) // // // Begin MDF // MODULE TSExtract // CATEGORY Transformation // DESCRIPTION Stacks a series, then extracts time series at a point given the coords of a corner point // INPUT series_data; field or field series; (none); // INPUT ts_point; value list or field; (none); // INPUT corner; value list or field; [1,1]; // OUTPUT ts_data; field; // OUTPUT position; field; // End MDF // // comment: Macro TSExtract // comment: ------------- // comment: // comment: (C) Duncan Galloway 10/5/96 // comment: duncang@ibm590.aims.gov.au // comment: // comment: This macro is designed to accept a series of 2D fields and 2 2-vectors. The first vector represents the coordinate you want to extract time series information from. The second vector represents the offset of the bottom corner vector. For example, for the Deleersnijder 2-layer model around Mururoa Atoll, the first point is at (2,2) so I want to subtract this value from the vector before I slab because DX refers to locations starting at (0,0). // comment: // comment: The macro stacks the fields in the z direction, slabs the resulting block twice to extract the correct set of points, then reduces the positions to one dimension. It also now outputs the (x,y) position corresponding to that node. // workspace: width = 468, height = 744 // layout: snap = 0, width = 50, height = 50, align = UL // macro TSExtract( series_data ,ts_point ,corner = [1,1] ) -> ( ts_data ,position ) { // // node Input[47]: x = 61, y = 16, inputs = 0, label = Input // parameter: position = 1, name = 'series_data', value = '(none)', descriptive = 1, description = ' ', required = 1, visible = 1 // TSExtract_Input_47_out_1 = series_data; // // node Stack[4]: x = 70, y = 193, inputs = 2, label = Stack // input[2]: defaulting = 0, visible = 1, type = 32, value = "z" // TSExtract_Stack_4_out_1 = Stack( TSExtract_Input_47_out_1, "z" ) [instance: 4, cache: 1]; // // node Input[48]: x = 155, y = 23, inputs = 0, label = Input // parameter: position = 2, name = 'ts_point', value = '(none)', descriptive = 1, description = ' ', required = 1, visible = 1 // TSExtract_Input_48_out_1 = ts_point; // // node Input[49]: x = 292, y = 19, inputs = 0, label = Input // parameter: position = 3, name = 'corner', value = '[1,1]', descriptive = 0, description = ' ', required = 0, visible = 1 // TSExtract_Input_49_out_1 = corner; // // node Compute[100]: x = 200, y = 186, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "int($0.x-$1.x)" // expression: value = int(a.x-b.x) // name[2]: value = a // name[3]: value = b // TSExtract_Compute_100_out_1 = Compute( "int($0.x-$1.x)", TSExtract_Input_48_out_1, TSExtract_Input_49_out_1 ) [instance: 100, cache: 1]; // // node Slab[1]: x = 127, y = 287, inputs = 4, label = Slab // input[2]: defaulting = 0, visible = 1, type = 32, value = "x" // input[4]: defaulting = 0, visible = 1, type = 1, value = 0 // TSExtract_Slab_1_out_1 = Slab( TSExtract_Stack_4_out_1, "x", TSExtract_Compute_100_out_1, 0 ) [instance: 1, cache: 1]; // // node Compute[101]: x = 323, y = 221, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "int($0.y-$1.y)" // expression: value = int(a.y-b.y) // name[2]: value = a // name[3]: value = b // TSExtract_Compute_101_out_1 = Compute( "int($0.y-$1.y)", TSExtract_Input_48_out_1, TSExtract_Input_49_out_1 ) [instance: 101, cache: 1]; // // node Slab[2]: x = 181, y = 363, inputs = 4, label = Slab // input[2]: defaulting = 0, visible = 1, type = 32, value = "x" // input[4]: defaulting = 0, visible = 1, type = 1, value = 0 // TSExtract_Slab_2_out_1 = Slab( TSExtract_Slab_1_out_1, "x", TSExtract_Compute_101_out_1, 0 ) [instance: 2, cache: 1]; // // node Slab[3]: x = 294, y = 456, inputs = 4, label = Slab // input[2]: defaulting = 0, visible = 1, type = 1, value = NULL // input[3]: defaulting = 0, visible = 1, type = 1, value = 0 // input[4]: defaulting = 0, visible = 1, type = 1, value = 0 // TSExtract_Slab_3_out_1 = Slab( TSExtract_Slab_2_out_1, NULL, 0, 0 ) [instance: 3, cache: 1]; // // node Extract[1]: x = 296, y = 549, inputs = 2, label = Extract // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // TSExtract_Extract_1_out_1 = Extract( TSExtract_Slab_3_out_1, "positions" ) [instance: 1, cache: 1]; // // node Construct[1]: x = 296, y = 626, inputs = 4, label = Construct // input[3]: defaulting = 0, visible = 1, type = 8, value = [1,1] // input[4]: defaulting = 0, visible = 1, type = 16777245, value = {1.0} // TSExtract_Construct_1_out_1 = Construct( TSExtract_Extract_1_out_1, NULL, [1,1], {1.0} ) [instance: 1, cache: 1]; // // node Output[11]: x = 412, y = 681, inputs = 1, label = Output // parameter: position = 2, name = 'position', value = ' ', descriptive = 0, description = ' ', required = 0, visible = 1 // position = TSExtract_Construct_1_out_1; // // node Mark[22]: x = 202, y = 459, inputs = 2, label = Mark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // TSExtract_Mark_22_out_1 = Mark( TSExtract_Slab_2_out_1, "positions" ) [instance: 22, cache: 1]; // // node Compute[102]: x = 183, y = 541, inputs = 2, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.z" // expression: value = a.z // name[2]: value = a // TSExtract_Compute_102_out_1 = Compute( "$0.z", TSExtract_Mark_22_out_1 ) [instance: 102, cache: 1]; // // node Unmark[6]: x = 173, y = 616, inputs = 2, label = Unmark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // TSExtract_Unmark_6_out_1 = Unmark( TSExtract_Compute_102_out_1, "positions" ) [instance: 6, cache: 1]; // // node Output[10]: x = 175, y = 681, inputs = 1, label = Output // parameter: position = 1, name = 'ts_data', value = ' ', descriptive = 0, description = ' ', required = 0, visible = 1 // ts_data = TSExtract_Unmark_6_out_1; // network: end of macro body } TSExtract_Input_47_out_1 = NULL; TSExtract_Stack_4_out_1 = NULL; TSExtract_Input_48_out_1 = NULL; TSExtract_Input_49_out_1 = NULL; TSExtract_Compute_100_out_1 = NULL; TSExtract_Slab_1_out_1 = NULL; TSExtract_Compute_101_out_1 = NULL; TSExtract_Slab_2_out_1 = NULL; TSExtract_Slab_3_out_1 = NULL; TSExtract_Extract_1_out_1 = NULL; TSExtract_Construct_1_out_1 = NULL; TSExtract_Mark_22_out_1 = NULL; TSExtract_Compute_102_out_1 = NULL; TSExtract_Unmark_6_out_1 = NULL;