// // time: Fri Aug 30 14:44:11 1996 // // version: 3.0.0 (format), 3.1.2 (DX) // // // Begin MDF // MODULE SigmaZScale // CATEGORY Macros // DESCRIPTION Stretches sigma coordinate points depending on the bathymetry // INPUT data_3D_sigma_coord; field; (none); // INPUT bathymetry; scalar or vector or field; (none); // OUTPUT Z_scaled_data; field; // End MDF // // comment: SigmaZScale // comment: ----------- // comment: // comment: (C) Duncan Galloway 1996 // comment: duncang@ibm590.aims.gov.au // comment: // comment: This module accepts a 3D grid and a 2D grid where each horizontal slice of the 3D grid is the same as the 2D grid. The macro then scales the positions of the 3D grid differentially in the Z-direction depending upon the data value of the 2D grid at each point. // comment: // comment: Useful e.g. to scale the layers in a grid from a sigma coordinate model with the bathymetry. // workspace: width = 283, height = 1038 // layout: snap = 0, width = 50, height = 50, align = UL // macro SigmaZScale( data_3D_sigma_coord ,bathymetry ) -> ( Z_scaled_data ) { // // node Input[25]: x = 63, y = 32, inputs = 0, label = Input // parameter: position = 1, name = 'data_3D_sigma_coord', value = ' ', descriptive = 0, description = ' ', required = 1, visible = 1 // SigmaZScale_Input_25_out_1 = data_3D_sigma_coord; // // node Mark[12]: x = 93, y = 186, inputs = 2, label = Mark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // SigmaZScale_Mark_12_out_1 = Mark( SigmaZScale_Input_25_out_1, "positions" ) [instance: 12, cache: 1]; // // node Compute[36]: x = 91, y = 256, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.x,$0.y]" // expression: value = [a.x,a.y] // name[2]: value = a // name[3]: value = b // SigmaZScale_Compute_36_out_1 = Compute( "[$0.x,$0.y]", SigmaZScale_Mark_12_out_1, NULL ) [instance: 36, cache: 1]; // // node Unmark[10]: x = 100, y = 331, inputs = 2, label = Unmark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // SigmaZScale_Unmark_10_out_1 = Unmark( SigmaZScale_Compute_36_out_1, "positions" ) [instance: 10, cache: 1]; // // node Input[26]: x = 240, y = 31, inputs = 0, label = Input // parameter: position = 2, name = 'bathymetry', value = ' ', descriptive = 0, description = ' ', required = 1, visible = 1 // SigmaZScale_Input_26_out_1 = bathymetry; // // node Map[4]: x = 145, y = 421, inputs = 4, label = Map // SigmaZScale_Map_4_out_1 = Map( SigmaZScale_Unmark_10_out_1, SigmaZScale_Input_26_out_1, NULL, NULL ) [instance: 4, cache: 1]; // // node Replace[5]: x = 73, y = 511, inputs = 4, label = Replace // input[3]: defaulting = 0, visible = 1, type = 32, value = "positions" // input[4]: defaulting = 0, visible = 1, type = 32, value = "positions" // SigmaZScale_Replace_5_out_1 = Replace( SigmaZScale_Input_25_out_1, SigmaZScale_Map_4_out_1, "positions", "positions" ) [instance: 5, cache: 1]; // // node Mark[13]: x = 99, y = 586, inputs = 2, label = Mark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // SigmaZScale_Mark_13_out_1 = Mark( SigmaZScale_Replace_5_out_1, "positions" ) [instance: 13, cache: 1]; // // node Compute[37]: x = 128, y = 673, inputs = 3, label = Compute // input[1]: defaulting = 0, visible = 0, type = 32, value = "[$0.x,$0.y,$0.z*$1]" // expression: value = [a.x,a.y,a.z*b] // name[2]: value = a // name[3]: value = b // SigmaZScale_Compute_37_out_1 = Compute( "[$0.x,$0.y,$0.z*$1]", SigmaZScale_Mark_13_out_1, SigmaZScale_Map_4_out_1 ) [instance: 37, cache: 1]; // // node Unmark[11]: x = 217, y = 711, inputs = 2, label = Unmark // input[2]: defaulting = 0, visible = 1, type = 32, value = "positions" // SigmaZScale_Unmark_11_out_1 = Unmark( SigmaZScale_Compute_37_out_1, "positions" ) [instance: 11, cache: 1]; // // node Replace[6]: x = 125, y = 854, inputs = 4, label = Replace // SigmaZScale_Replace_6_out_1 = Replace( SigmaZScale_Input_25_out_1, SigmaZScale_Unmark_11_out_1, NULL, NULL ) [instance: 6, cache: 1]; // // node Output[3]: x = 139, y = 975, inputs = 1, label = Output // parameter: position = 1, name = 'Z_scaled_data', value = ' ', descriptive = 0, description = ' ', required = 0, visible = 1 // Z_scaled_data = SigmaZScale_Replace_6_out_1; // network: end of macro body } SigmaZScale_Input_25_out_1 = NULL; SigmaZScale_Mark_12_out_1 = NULL; SigmaZScale_Compute_36_out_1 = NULL; SigmaZScale_Unmark_10_out_1 = NULL; SigmaZScale_Input_26_out_1 = NULL; SigmaZScale_Map_4_out_1 = NULL; SigmaZScale_Replace_5_out_1 = NULL; SigmaZScale_Mark_13_out_1 = NULL; SigmaZScale_Compute_37_out_1 = NULL; SigmaZScale_Unmark_11_out_1 = NULL; SigmaZScale_Replace_6_out_1 = NULL;