//
// time: Wed Apr  9 15:25:55 1997
//
// version: 3.1.1 (format), 3.1.4 (DX Beta)
//
//
// MODULE main
//
// comment: This visual program uses a data-driven integer interactor to control the slab position.  We do not want the slab position to be allowed to go outside the range of the data. The Inquire module is used to find out how many counts there are in each dimension; Compute is then use to select the third dimension. Since the Slab positions are zero-based, the value 1 is subtracted from the counts before the value is passed to the Integer interactor.
// comment: 
// comment: The Colormap editor is also data-driven. The data field is passed to it. This controls the limits set on the colormap editor.
// comment: 
// comment: The Scalar interactor which chooses the isosurface value is also data-driven, so that it cannot exceed the range of the data.
// comment: 
// comment: You can use the interactors in the Control Panel (choose "Open All Control Panels" from the Windows menu) to control which variable to look at and which slab position to look at.
// page assignment: caption	order=6, windowed=0, showing=0
// page assignment: image	order=7, windowed=0, showing=0
// page assignment: import	order=3, windowed=0, showing=0
// page assignment: isosurface	order=4, windowed=0, showing=0
// page assignment: select	order=2, windowed=0, showing=1
// page assignment: slab	order=5, windowed=0, showing=0
// workspace: width = 402, height = 322
// layout: snap = 0, width = 50, height = 50, align = CC
//
macro main(
) -> (
) {
    // 
    // node Selector[4]: x = 129, y = 159, inputs = 7, label = Selector
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Selector_4"
    // input[2]: defaulting = 0, visible = 0, type = 32, value = "temperature" 
    // input[3]: defaulting = 0, visible = 0, type = 29, value = 2 
    // input[4]: defaulting = 1, visible = 1, type = 16777248, value = { "wind" "temperature" "cloudwater" "rainwater" }
    // input[5]: defaulting = 1, visible = 0, type = 16777245, value = { 1 2 3 4 }
    // input[6]: defaulting = 1, visible = 0, type = 3, value = 0
    // output[1]: visible = 1, type = 29, value = 2 
    // output[2]: visible = 1, type = 32, value = "temperature" 
    // page group: select
    //
    // 
    // node Transmitter[2]: x = 174, y = 260, inputs = 1, label = selected_name
    // page group: select
    //
selected_name = main_Selector_4_out_2;
    // 
    // node Receiver[4]: x = 159, y = 122, inputs = 1, label = selected_name
    // page group: import
    //
main_Receiver_4_out_1[cache: 0] = selected_name;
    // 
    // node Format[3]: x = 178, y = 224, inputs = 2, label = Format
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "%s"
    // page group: import
    //
main_Format_3_out_1 = 
    Format(
    main_Format_3_in_1,
    main_Receiver_4_out_1
    ) [instance: 3, cache: 1];
    // 
    // node Import[6]: x = 163, y = 308, inputs = 6, label = Import
    // page group: import
    //
main_Import_6_out_1 = 
    Import(
    main_Format_3_out_1,
    main_Import_6_in_2,
    main_Import_6_in_3,
    main_Import_6_in_4,
    main_Import_6_in_5,
    main_Import_6_in_6
    ) [instance: 6, cache: 1];
    // 
    // node Transmitter[1]: x = 178, y = 395, inputs = 1, label = imported
    // page group: import
    //
imported = main_Import_6_out_1;
    // 
    // node Receiver[9]: x = 176, y = 96, inputs = 1, label = imported
    // page group: isosurface
    //
main_Receiver_9_out_1[cache: 0] = imported;
    // 
    // node Inquire[1]: x = 175, y = 244, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "is scalar"
    // page group: isosurface
    //
main_Inquire_1_out_1 = 
    Inquire(
    main_Receiver_9_out_1,
    main_Inquire_1_in_2,
    main_Inquire_1_in_3
    ) [instance: 1, cache: 1];
    // 
    // node Compute[1]: x = 204, y = 321, inputs = 3, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0 ? $1 : mag($1)"
    // page group: isosurface
    // expression: value = scalar ? field : mag(field)
    // name[2]: value = scalar
    // name[3]: value = field
    //
main_Compute_1_out_1 = 
    Compute(
    main_Compute_1_in_1,
    main_Inquire_1_out_1,
    main_Receiver_9_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Scalar[1]: x = 293, y = 330, inputs = 11, label = Scalar
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Scalar_1"
    // input[3]: defaulting = 0, visible = 0, type = 5, value = 2.0856111
    // input[4]: defaulting = 1, visible = 0, type = 3, value = 0
    // input[5]: defaulting = 1, visible = 0, type = 5, value = -17.252
    // input[6]: defaulting = 1, visible = 0, type = 5, value = 13.9919
    // input[7]: defaulting = 0, visible = 1, type = 5, value = .05
    // input[9]: defaulting = 1, visible = 0, type = 1, value = 1
    // output[1]: visible = 1, type = 5, value = 2.0856111
    // page group: isosurface
    //
main_Scalar_1_out_1[cache: 2] = 
    Scalar(
    main_Scalar_1_in_1,
    main_Compute_1_out_1,
    main_Scalar_1_in_3,
    main_Scalar_1_in_4,
    main_Scalar_1_in_5,
    main_Scalar_1_in_6,
    main_Scalar_1_in_7,
    main_Scalar_1_in_8,
    main_Scalar_1_in_9,
    main_Scalar_1_in_10,
    main_Scalar_1_in_11
    ) [instance: 1, cache: 1];
    // 
    // node Isosurface[5]: x = 213, y = 400, inputs = 6, label = Isosurface
    // page group: isosurface
    //
main_Isosurface_5_out_1 = 
    Isosurface(
    main_Compute_1_out_1,
    main_Scalar_1_out_1,
    main_Isosurface_5_in_3,
    main_Isosurface_5_in_4,
    main_Isosurface_5_in_5,
    main_Isosurface_5_in_6
    ) [instance: 5, cache: 1];
    // 
    // node Color[8]: x = 209, y = 492, inputs = 5, label = Color
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "wheat"
    // input[3]: defaulting = 0, visible = 1, type = 5, value = .4
    // page group: isosurface
    //
main_Color_8_out_1 = 
    Color(
    main_Isosurface_5_out_1,
    main_Color_8_in_2,
    main_Color_8_in_3,
    main_Color_8_in_4,
    main_Color_8_in_5
    ) [instance: 8, cache: 1];
    // 
    // node Transmitter[5]: x = 227, y = 564, inputs = 1, label = isosurface
    // page group: isosurface
    //
isosurface = main_Color_8_out_1;
    // 
    // node Receiver[8]: x = 211, y = 171, inputs = 1, label = isosurface
    // page group: caption
    //
main_Receiver_8_out_1[cache: 0] = isosurface;
    // 
    // node Attribute[1]: x = 239, y = 267, inputs = 2, label = Attribute
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "Isosurface value"
    // page group: caption
    //
main_Attribute_1_out_1 = 
    Attribute(
    main_Receiver_8_out_1,
    main_Attribute_1_in_2
    ) [instance: 1, cache: 1];
    // 
    // node Receiver[2]: x = 82, y = 170, inputs = 1, label = selected_name
    // page group: caption
    //
main_Receiver_2_out_1[cache: 0] = selected_name;
    // 
    // node Format[4]: x = 129, y = 338, inputs = 3, label = Format
    // input[1]: defaulting = 0, visible = 1, type = 32, value = "variable = %s     isosurface value = %5.2f"
    // page group: caption
    //
main_Format_4_out_1 = 
    Format(
    main_Format_4_in_1,
    main_Receiver_2_out_1,
    main_Attribute_1_out_1
    ) [instance: 4, cache: 1];
    // 
    // node Caption[10]: x = 162, y = 431, inputs = 9, label = Caption
    // input[7]: defaulting = 0, visible = 1, type = 32, value = "area"
    // page group: caption
    //
main_Caption_10_out_1 = 
    Caption(
    main_Format_4_out_1,
    main_Caption_10_in_2,
    main_Caption_10_in_3,
    main_Caption_10_in_4,
    main_Caption_10_in_5,
    main_Caption_10_in_6,
    main_Caption_10_in_7,
    main_Caption_10_in_8,
    main_Caption_10_in_9
    ) [instance: 10, cache: 1];
    // 
    // node Transmitter[4]: x = 161, y = 504, inputs = 1, label = caption
    // page group: caption
    //
caption = main_Caption_10_out_1;
    // 
    // node Receiver[6]: x = 95, y = 154, inputs = 1, label = caption
    // page group: image
    //
main_Receiver_6_out_1[cache: 0] = caption;
    // 
    // node Receiver[7]: x = 174, y = 153, inputs = 1, label = isosurface
    // page group: image
    //
main_Receiver_7_out_1[cache: 0] = isosurface;
    // 
    // node Receiver[1]: x = 25, y = 107, inputs = 1, label = imported
    // page group: slab
    //
main_Receiver_1_out_1[cache: 0] = imported;
    // 
    // node Inquire[2]: x = 135, y = 232, inputs = 3, label = Inquire
    // input[2]: defaulting = 0, visible = 1, type = 32, value = "connection gridcounts"
    // page group: slab
    //
main_Inquire_2_out_1 = 
    Inquire(
    main_Receiver_1_out_1,
    main_Inquire_2_in_2,
    main_Inquire_2_in_3
    ) [instance: 2, cache: 1];
    // 
    // node Compute[2]: x = 142, y = 304, inputs = 2, label = Compute
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "$0.2 - 1"
    // page group: slab
    // expression: value = a.2 - 1
    // name[2]: value = a
    //
main_Compute_2_out_1 = 
    Compute(
    main_Compute_2_in_1,
    main_Inquire_2_out_1
    ) [instance: 2, cache: 1];
    // 
    // node Integer[1]: x = 135, y = 390, inputs = 11, label = Integer
    // input[1]: defaulting = 0, visible = 0, type = 32, value = "Integer_1"
    // input[3]: defaulting = 0, visible = 0, type = 1, value = 3 
    // input[4]: defaulting = 1, visible = 0, type = 1, value = 0
    // input[5]: defaulting = 0, visible = 1, type = 1, value = 0
    // input[6]: defaulting = 1, visible = 1, type = 1, value = 7
    // input[7]: defaulting = 1, visible = 0, type = 5, value = 1.00000
    // input[8]: defaulting = 1, visible = 0, type = 32, value = "0"
    // input[9]: defaulting = 1, visible = 0, type = 1, value = 0
    // output[1]: visible = 1, type = 1, value = 3 
    // page group: slab
    //
main_Integer_1_out_1[cache: 2] = 
    Integer(
    main_Integer_1_in_1,
    main_Integer_1_in_2,
    main_Integer_1_in_3,
    main_Integer_1_in_4,
    main_Integer_1_in_5,
    main_Compute_2_out_1,
    main_Integer_1_in_7,
    main_Integer_1_in_8,
    main_Integer_1_in_9,
    main_Integer_1_in_10,
    main_Integer_1_in_11
    ) [instance: 1, cache: 1];
    // 
    // node Slab[1]: x = 0, y = 407, inputs = 4, label = Slab
    // input[2]: defaulting = 0, visible = 1, type = 1, value = 2
    // input[4]: defaulting = 0, visible = 1, type = 1, value = 0
    // page group: slab
    //
main_Slab_1_out_1 = 
    Slab(
    main_Receiver_1_out_1,
    main_Slab_1_in_2,
    main_Integer_1_out_1,
    main_Slab_1_in_4
    ) [instance: 1, cache: 1];
    // 
    // node Colormap[4]: x = 299, y = 339, inputs = 19, label = Colormap
    // input[1]: defaulting = 0, visible = 0, type = 16777224, value = { [0.0 0.86315789] [0.067307692 0.63157895] [0.19871795 0.34736842] [0.33653846 0.24210526] [0.53205128 0.12631579] [0.7275641 0.073684211] [1.0 0.0] }
    // input[2]: defaulting = 0, visible = 0, type = 16777224, value = { [0.0 0.55789474] [0.060897436 0.64210526] [0.11217949 0.75789474] [0.24358974 0.95789474] [0.44551282 0.97894737] [1.0 1.0] }
    // input[3]: defaulting = 0, visible = 0, type = 16777224, value = { [0.0 1.0] [1.0 1.0] }
    // input[4]: defaulting = 0, visible = 0, type = 16777224, value = { [0.0 1.0] [1.0 1.0] }
    // input[5]: defaulting = 0, visible = 0, type = 32, value = "Colormap_4"
    // input[7]: defaulting = 1, visible = 0, type = 5, value = -17.251976
    // input[8]: defaulting = 1, visible = 0, type = 5, value = 13.991945
    // input[9]: defaulting = 1, visible = 0, type = 1, value = 20
    // input[12]: defaulting = 0, visible = 0, type = 16777221, value = { -17.251976 13.991945 }
    // input[17]: defaulting = 0, visible = 0, type = 5, value = -17.251976
    // input[18]: defaulting = 0, visible = 0, type = 5, value = 13.991945
    // page group: slab
    // window: position = (0.3773,0.5000), size = 0.5078x0.4395
    //
main_Colormap_4_out_1[cache: 2],
main_Colormap_4_out_2[cache: 2] = 
    Colormap(
    main_Colormap_4_in_1,
    main_Colormap_4_in_2,
    main_Colormap_4_in_3,
    main_Colormap_4_in_4,
    main_Colormap_4_in_5,
    main_Receiver_1_out_1,
    main_Colormap_4_in_7,
    main_Colormap_4_in_8,
    main_Colormap_4_in_9,
    main_Colormap_4_in_10,
    main_Colormap_4_in_11,
    main_Colormap_4_in_12,
    main_Colormap_4_in_13,
    main_Colormap_4_in_14,
    main_Colormap_4_in_15,
    main_Colormap_4_in_16,
    main_Colormap_4_in_17,
    main_Colormap_4_in_18,
    main_Colormap_4_in_19
    ) [instance: 4, cache: 1];
    // 
    // node Color[7]: x = 55, y = 522, inputs = 5, label = Color
    // page group: slab
    //
main_Color_7_out_1 = 
    Color(
    main_Slab_1_out_1,
    main_Colormap_4_out_1,
    main_Color_7_in_3,
    main_Color_7_in_4,
    main_Color_7_in_5
    ) [instance: 7, cache: 1];
    // 
    // node Transmitter[3]: x = 54, y = 256, inputs = 1, label = selected_value
    // page group: select
    //
selected_value = main_Selector_4_out_1;
    // 
    // node Receiver[3]: x = 333, y = 102, inputs = 1, label = selected_value
    // page group: slab
    //
main_Receiver_3_out_1[cache: 0] = selected_value;
    // 
    // node Switch[8]: x = 418, y = 275, inputs = 5, label = Switch
    // input[2]: defaulting = 0, visible = 1, type = 16777248, value = {"meters per second"}
    // input[3]: defaulting = 0, visible = 1, type = 16777248, value = {"degrees celsius"}
    // input[4]: defaulting = 0, visible = 1, type = 16777248, value = {"cloudwater density"}
    // input[5]: defaulting = 0, visible = 1, type = 16777248, value = {"rainwater density"}
    // page group: slab
    //
main_Switch_8_out_1 = 
    Switch(
    main_Receiver_3_out_1,
    main_Switch_8_in_2,
    main_Switch_8_in_3,
    main_Switch_8_in_4,
    main_Switch_8_in_5
    ) [instance: 8, cache: 1];
    // 
    // node ColorBar[2]: x = 307, y = 528, inputs = 14, label = ColorBar
    // input[4]: defaulting = 0, visible = 1, type = 3, value = 1
    // input[12]: defaulting = 0, visible = 1, type = 32, value = "area"
    // page group: slab
    //
main_ColorBar_2_out_1 = 
    ColorBar(
    main_Colormap_4_out_1,
    main_ColorBar_2_in_2,
    main_ColorBar_2_in_3,
    main_ColorBar_2_in_4,
    main_ColorBar_2_in_5,
    main_ColorBar_2_in_6,
    main_ColorBar_2_in_7,
    main_Switch_8_out_1,
    main_ColorBar_2_in_9,
    main_ColorBar_2_in_10,
    main_ColorBar_2_in_11,
    main_ColorBar_2_in_12,
    main_ColorBar_2_in_13,
    main_ColorBar_2_in_14
    ) [instance: 2, cache: 1];
    // 
    // node Collect[11]: x = 159, y = 564, inputs = 2, label = Collect
    // page group: slab
    //
main_Collect_11_out_1 = 
    Collect(
    main_Color_7_out_1,
    main_ColorBar_2_out_1
    ) [instance: 11, cache: 1];
    // 
    // node Transmitter[6]: x = 190, y = 646, inputs = 1, label = slab
    // page group: slab
    //
slab = main_Collect_11_out_1;
    // 
    // node Receiver[10]: x = 275, y = 152, inputs = 1, label = slab
    // page group: image
    //
main_Receiver_10_out_1[cache: 0] = slab;
    // 
    // node Receiver[11]: x = 339, y = 154, inputs = 1, label = imported
    // page group: image
    //
main_Receiver_11_out_1[cache: 0] = imported;
    // 
    // node ShowBox[1]: x = 330, y = 285, inputs = 1, label = ShowBox
    // page group: image
    //
main_ShowBox_1_out_1,
main_ShowBox_1_out_2 = 
    ShowBox(
    main_Receiver_11_out_1
    ) [instance: 1, cache: 1];
    // 
    // node Collect[10]: x = 189, y = 373, inputs = 4, label = Collect
    // page group: image
    //
main_Collect_10_out_1 = 
    Collect(
    main_Receiver_6_out_1,
    main_Receiver_7_out_1,
    main_Receiver_10_out_1,
    main_ShowBox_1_out_1
    ) [instance: 10, cache: 1];
    // 
    // node Image[5]: x = 229, y = 449, inputs = 48, label = Image
    // input[1]: defaulting = 0, visible = 0, type = 67108863, value = "Image_5"
    // input[4]: defaulting = 0, visible = 0, type = 1, value = 1
    // input[5]: defaulting = 0, visible = 0, type = 8, value = [50000 7750 27000]
    // input[6]: defaulting = 0, visible = 0, type = 8, value = [-102667 130295 238549]
    // input[7]: defaulting = 0, visible = 0, type = 5, value = 154464.0
    // input[8]: defaulting = 0, visible = 0, type = 1, value = 640
    // input[9]: defaulting = 0, visible = 0, type = 5, value = 0.75
    // input[10]: defaulting = 0, visible = 0, type = 8, value = [0.103227 0.891182 -0.441745]
    // input[11]: defaulting = 1, visible = 0, type = 5, value = 30.0002
    // input[12]: defaulting = 0, visible = 0, type = 1, value = 0
    // input[14]: defaulting = 0, visible = 0, type = 1, value = 1
    // input[19]: defaulting = 0, visible = 0, type = 3, value = 0
    // input[29]: defaulting = 1, visible = 0, type = 3, value = 0
    // page group: image
    // depth: value = 24
    // window: position = (0.4273,0.0381), size = 0.5109x0.5117
    // internal caching: 1
    //
main_Image_5_out_1,
main_Image_5_out_2,
main_Image_5_out_3 = 
    Image(
    main_Image_5_in_1,
    main_Collect_10_out_1,
    main_Image_5_in_3,
    main_Image_5_in_4,
    main_Image_5_in_5,
    main_Image_5_in_6,
    main_Image_5_in_7,
    main_Image_5_in_8,
    main_Image_5_in_9,
    main_Image_5_in_10,
    main_Image_5_in_11,
    main_Image_5_in_12,
    main_Image_5_in_13,
    main_Image_5_in_14,
    main_Image_5_in_15,
    main_Image_5_in_16,
    main_Image_5_in_17,
    main_Image_5_in_18,
    main_Image_5_in_19,
    main_Image_5_in_20,
    main_Image_5_in_21,
    main_Image_5_in_22,
    main_Image_5_in_23,
    main_Image_5_in_24,
    main_Image_5_in_25,
    main_Image_5_in_26,
    main_Image_5_in_27,
    main_Image_5_in_28,
    main_Image_5_in_29,
    main_Image_5_in_30,
    main_Image_5_in_31,
    main_Image_5_in_32,
    main_Image_5_in_33,
    main_Image_5_in_34,
    main_Image_5_in_35,
    main_Image_5_in_36,
    main_Image_5_in_37,
    main_Image_5_in_38,
    main_Image_5_in_39,
    main_Image_5_in_40,
    main_Image_5_in_41,
    main_Image_5_in_42,
    main_Image_5_in_43,
    main_Image_5_in_44,
    main_Image_5_in_45,
    main_Image_5_in_46,
    main_Image_5_in_47,
    main_Image_5_in_48
    ) [instance: 5, cache: 1];
    //
    // decorator Annotate	pos=(0,65) size=402x28 style(Label), font=bold, value = <NULL>
    // annotation user_begin: 58
    // annotation user: This page allows the user to select the variable to import
    // annotation user_end: <NULL>
    // page group: select
    //
    // decorator Annotate	pos=(114,37) size=283x28 style(Label), font=bold, value = <NULL>
    // annotation user_begin: 39
    // annotation user: This page imports the selected variable
    // annotation user_end: <NULL>
    // page group: import
    //
    // decorator Annotate	pos=(69,38) size=448x28 style(Label), font=bold, value = <NULL>
    // annotation user_begin: 63
    // annotation user: This page creates an isosurface (of the magnitude if necessary)
    // annotation user_end: <NULL>
    // page group: isosurface
    //
    // decorator Annotate	pos=(23,16) size=531x76 style(Label), font=bold, value = <NULL>
    // annotation user_begin: 268
    // annotation user: This page creates a data-driven integer interactor for the slab position,
    // annotation user: based on the number of connection elements in the data set. It also creates
    // annotation user: a data-driven colormap with which to color the data, and uses Switch to
    // annotation user: provide an appropriate label for the colorbar.
    // annotation user_end: <NULL>
    // resource *decorator.alignment:XmALIGNMENT_BEGINNING
    // page group: slab
    //
    // decorator Annotate	pos=(47,57) size=494x44 style(Label), font=bold, value = <NULL>
    // annotation user_begin: 126
    // annotation user: This page collects the various portions of the visualization, along with
    // annotation user: a box around the imported data, and creates an image.
    // annotation user_end: <NULL>
    // resource *decorator.alignment:XmALIGNMENT_BEGINNING
    // page group: image
    //
    // decorator Annotate	pos=(61,64) size=431x44 style(Label), font=bold, value = <NULL>
    // annotation user_begin: 109
    // annotation user: This page creates an appropriate caption based on the name
    // annotation user: of the selected variable and the isosurface value.
    // annotation user_end: <NULL>
    // resource *decorator.alignment:XmALIGNMENT_BEGINNING
    // page group: caption
// network: end of macro body
CacheScene("Image_5", main_Image_5_out_1, main_Image_5_out_2);
}
main_Selector_4_in_1 = "Selector_4";
main_Selector_4_in_2 = "temperature" ;
main_Selector_4_in_3 = 2 ;
main_Selector_4_in_4 = NULL;
main_Selector_4_in_5 = NULL;
main_Selector_4_in_6 = NULL;
main_Selector_4_in_7 = NULL;
main_Selector_4_out_1 = 2 ;
main_Selector_4_out_2 = "temperature" ;
main_Transmitter_2_out_1 = NULL;
main_Receiver_4_out_1 = NULL;
main_Format_3_in_1 = "%s";
main_Format_3_out_1 = NULL;
main_Import_6_in_2 = NULL;
main_Import_6_in_3 = NULL;
main_Import_6_in_4 = NULL;
main_Import_6_in_5 = NULL;
main_Import_6_in_6 = NULL;
main_Import_6_out_1 = NULL;
main_Transmitter_1_out_1 = NULL;
main_Receiver_9_out_1 = NULL;
main_Inquire_1_in_2 = "is scalar";
main_Inquire_1_in_3 = NULL;
main_Inquire_1_out_1 = NULL;
main_Compute_1_in_1 = "$0 ? $1 : mag($1)";
main_Compute_1_out_1 = NULL;
main_Scalar_1_in_1 = "Scalar_1";
main_Scalar_1_in_3 = 2.0856111;
main_Scalar_1_in_4 = NULL;
main_Scalar_1_in_5 = NULL;
main_Scalar_1_in_6 = NULL;
main_Scalar_1_in_7 = .05;
main_Scalar_1_in_8 = NULL;
main_Scalar_1_in_9 = NULL;
main_Scalar_1_in_10 = NULL;
main_Scalar_1_in_11 = NULL;
main_Scalar_1_out_1 = 2.0856111;
main_Isosurface_5_in_3 = NULL;
main_Isosurface_5_in_4 = NULL;
main_Isosurface_5_in_5 = NULL;
main_Isosurface_5_in_6 = NULL;
main_Isosurface_5_out_1 = NULL;
main_Color_8_in_2 = "wheat";
main_Color_8_in_3 = .4;
main_Color_8_in_4 = NULL;
main_Color_8_in_5 = NULL;
main_Color_8_out_1 = NULL;
main_Transmitter_5_out_1 = NULL;
main_Receiver_8_out_1 = NULL;
main_Attribute_1_in_2 = "Isosurface value";
main_Attribute_1_out_1 = NULL;
main_Receiver_2_out_1 = NULL;
main_Format_4_in_1 = "variable = %s     isosurface value = %5.2f";
main_Format_4_out_1 = NULL;
main_Caption_10_in_2 = NULL;
main_Caption_10_in_3 = NULL;
main_Caption_10_in_4 = NULL;
main_Caption_10_in_5 = NULL;
main_Caption_10_in_6 = NULL;
main_Caption_10_in_7 = "area";
main_Caption_10_in_8 = NULL;
main_Caption_10_in_9 = NULL;
main_Caption_10_out_1 = NULL;
main_Transmitter_4_out_1 = NULL;
main_Receiver_6_out_1 = NULL;
main_Receiver_7_out_1 = NULL;
main_Receiver_1_out_1 = NULL;
main_Inquire_2_in_2 = "connection gridcounts";
main_Inquire_2_in_3 = NULL;
main_Inquire_2_out_1 = NULL;
main_Compute_2_in_1 = "$0.2 - 1";
main_Compute_2_out_1 = NULL;
main_Integer_1_in_1 = "Integer_1";
main_Integer_1_in_2 = NULL;
main_Integer_1_in_3 = 3 ;
main_Integer_1_in_4 = NULL;
main_Integer_1_in_5 = 0;
main_Integer_1_in_7 = NULL;
main_Integer_1_in_8 = NULL;
main_Integer_1_in_9 = NULL;
main_Integer_1_in_10 = NULL;
main_Integer_1_in_11 = NULL;
main_Integer_1_out_1 = 3 ;
main_Slab_1_in_2 = 2;
main_Slab_1_in_4 = 0;
main_Slab_1_out_1 = NULL;
main_Colormap_4_in_1 = { [0.0 0.86315789] [0.067307692 0.63157895] [0.19871795 0.34736842] [0.33653846 0.24210526] [0.53205128 0.12631579] [0.7275641 0.073684211] [1.0 0.0] };
main_Colormap_4_in_2 = { [0.0 0.55789474] [0.060897436 0.64210526] [0.11217949 0.75789474] [0.24358974 0.95789474] [0.44551282 0.97894737] [1.0 1.0] };
main_Colormap_4_in_3 = { [0.0 1.0] [1.0 1.0] };
main_Colormap_4_in_4 = { [0.0 1.0] [1.0 1.0] };
main_Colormap_4_in_5 = "Colormap_4";
main_Colormap_4_in_7 = NULL;
main_Colormap_4_in_8 = NULL;
main_Colormap_4_in_9 = NULL;
main_Colormap_4_in_10 = NULL;
main_Colormap_4_in_11 = NULL;
main_Colormap_4_in_12 = { -17.251976 13.991945 };
main_Colormap_4_in_13 = NULL;
main_Colormap_4_in_14 = NULL;
main_Colormap_4_in_15 = NULL;
main_Colormap_4_in_16 = NULL;
main_Colormap_4_in_17 = -17.251976;
main_Colormap_4_in_18 = 13.991945;
main_Colormap_4_in_19 = NULL;
main_Colormap_4_out_1 = NULL;
main_Color_7_in_3 = NULL;
main_Color_7_in_4 = NULL;
main_Color_7_in_5 = NULL;
main_Color_7_out_1 = NULL;
main_Transmitter_3_out_1 = NULL;
main_Receiver_3_out_1 = NULL;
main_Switch_8_in_2 = {"meters per second"};
main_Switch_8_in_3 = {"degrees celsius"};
main_Switch_8_in_4 = {"cloudwater density"};
main_Switch_8_in_5 = {"rainwater density"};
main_Switch_8_out_1 = NULL;
main_ColorBar_2_in_2 = NULL;
main_ColorBar_2_in_3 = NULL;
main_ColorBar_2_in_4 = 1;
main_ColorBar_2_in_5 = NULL;
main_ColorBar_2_in_6 = NULL;
main_ColorBar_2_in_7 = NULL;
main_ColorBar_2_in_9 = NULL;
main_ColorBar_2_in_10 = NULL;
main_ColorBar_2_in_11 = NULL;
main_ColorBar_2_in_12 = "area";
main_ColorBar_2_in_13 = NULL;
main_ColorBar_2_in_14 = NULL;
main_ColorBar_2_out_1 = NULL;
main_Collect_11_out_1 = NULL;
main_Transmitter_6_out_1 = NULL;
main_Receiver_10_out_1 = NULL;
main_Receiver_11_out_1 = NULL;
main_ShowBox_1_out_1 = NULL;
main_Collect_10_out_1 = NULL;
macro Image(
        id,
        object,
        where,
        useVector,
        to,
        from,
        width,
        resolution,
        aspect,
        up,
        viewAngle,
        perspective,
        options,
        buttonState = 1,
        buttonUpApprox = "none",
        buttonDownApprox = "none",
        buttonUpDensity = 1,
        buttonDownDensity = 1,
        renderMode = 0,
        defaultCamera,
        reset,
        backgroundColor,
        throttle,
        RECenable = 0,
        RECfile,
        RECformat,
        RECresolution,
        RECaspect,
        AAenable = 0,
        AAlabels,
        AAticks,
        AAcorners,
        AAframe,
        AAadjust,
        AAcursor,
        AAgrid,
        AAcolors,
        AAannotation,
        AAlabelscale,
        AAfont,
        interactionMode,
        title,
        AAxTickLocs,
        AAyTickLocs,
        AAzTickLocs,
        AAxTickLabels,
        AAyTickLabels,
        AAzTickLabels) -> (
        object,
        camera,
        where)
{
    ImageMessage(
        id,
        backgroundColor,
        throttle,
        RECenable,
        RECfile,
        RECformat,
        RECresolution,
        RECaspect,
        AAenable,
        AAlabels,
        AAticks,
        AAcorners,
        AAframe,
        AAadjust,
        AAcursor,
        AAgrid,
        AAcolors,
        AAannotation,
        AAlabelscale,
        AAfont,
        AAxTickLocs,
        AAyTickLocs,
        AAzTickLocs,
        AAxTickLabels,
        AAyTickLabels,
        AAzTickLabels,
        interactionMode,
        title,
        renderMode,
        buttonUpApprox,
        buttonDownApprox,
        buttonUpDensity,
        buttonDownDensity) [instance: 1, cache: 1];
    autoCamera =
        AutoCamera(
            object,
            "front",
            object,
            resolution,
            aspect,
            [0,1,0],
            perspective,
            viewAngle,
            backgroundColor) [instance: 1, cache: 1];
    realCamera =
        Camera(
            to,
            from,
            width,
            resolution,
            aspect,
            up,
            perspective,
            viewAngle,
            backgroundColor) [instance: 1, cache: 1];
    coloredDefaultCamera = 
	 UpdateCamera(defaultCamera,
            background=backgroundColor) [instance: 1, cache: 1];
    nullDefaultCamera =
        Inquire(defaultCamera,
            "is null + 1") [instance: 1, cache: 1];
    resetCamera =
        Switch(
            nullDefaultCamera,
            coloredDefaultCamera,
            autoCamera) [instance: 1, cache: 1];
    resetNull = 
        Inquire(
            reset,
            "is null + 1") [instance: 2, cache: 1];
    reset =
        Switch(
            resetNull,
            reset,
            0) [instance: 2, cache: 1];
    whichCamera =
        Compute(
            "($0 != 0 || $1 == 0) ? 1 : 2",
            reset,
            useVector) [instance: 1, cache: 1];
    camera = Switch(
            whichCamera,
            resetCamera,
            realCamera) [instance: 3, cache: 1];
    AAobject =
        AutoAxes(
            object,
            camera,
            AAlabels,
            AAticks,
            AAcorners,
            AAframe,
            AAadjust,
            AAcursor,
            AAgrid,
            AAcolors,
            AAannotation,
            AAlabelscale,
            AAfont,
            AAxTickLocs,
            AAyTickLocs,
            AAzTickLocs,
            AAxTickLabels,
            AAyTickLabels,
            AAzTickLabels) [instance: 1, cache: 1];
    switchAAenable = Compute("$0+1",
	     AAenable) [instance: 2, cache: 1];
    object = Switch(
	     switchAAenable,
	     object,
	     AAobject) [instance:4, cache: 1];
    SWapproximation_options =
        Switch(
            buttonState,
            buttonUpApprox,
            buttonDownApprox) [instance: 5, cache: 1];
    SWdensity_options =
        Switch(
            buttonState,
            buttonUpDensity,
            buttonDownDensity) [instance: 6, cache: 1];
    HWapproximation_options =
        Format(
            "%s,%s",
            buttonDownApprox,
            buttonUpApprox) [instance: 1, cache: 1];
    HWdensity_options =
        Format(
            "%d,%d",
            buttonDownDensity,
            buttonUpDensity) [instance: 2, cache: 1];
    switchRenderMode = Compute(
	     "$0+1",
	     renderMode) [instance: 3, cache: 1];
    approximation_options = Switch(
	     switchRenderMode,
            SWapproximation_options,
	     HWapproximation_options) [instance: 7, cache: 1];
    density_options = Switch(
	     switchRenderMode,
            SWdensity_options,
            HWdensity_options) [instance: 8, cache: 1];
    renderModeString = Switch(
            switchRenderMode,
            "software",
            "hardware")[instance: 9, cache: 1];
    object_tag = Inquire(
            object,
            "object tag")[instance: 3, cache: 1];
    annoted_object =
        Options(
            object,
            "send boxes",
            0,
            "cache",
            1,
            "object tag",
            object_tag,
            "ddcamera",
            whichCamera,
            "rendering approximation",
            approximation_options,
            "render every",
            density_options,
            "button state",
            buttonState,
            "rendering mode",
            renderModeString) [instance: 1, cache: 1];
    RECresNull =
        Inquire(
            RECresolution,
            "is null + 1") [instance: 4, cache: 1];
    ImageResolution =
        Inquire(
            camera,
            "camera resolution") [instance: 5, cache: 1];
    RECresolution =
        Switch(
            RECresNull,
            RECresolution,
            ImageResolution) [instance: 10, cache: 1];
    RECaspectNull =
        Inquire(
            RECaspect,
            "is null + 1") [instance: 6, cache: 1];
    ImageAspect =
        Inquire(
            camera,
            "camera aspect") [instance: 7, cache: 1];
    RECaspect =
        Switch(
            RECaspectNull,
            RECaspect,
            ImageAspect) [instance: 11, cache: 1];
    switchRECenable = Compute(
          "$0 == 0 ? 1 : (($2 == $3) && ($4 == $5)) ? ($1 == 1 ? 2 : 3) : 4",
            RECenable,
            switchRenderMode,
            RECresolution,
            ImageResolution,
            RECaspect,
	     ImageAspect) [instance: 4, cache: 1];
    NoRECobject, RECNoRerenderObject, RECNoRerHW, RECRerenderObject = Route(switchRECenable, annoted_object);
    Display(
        NoRECobject,
        camera,
        where,
        throttle) [instance: 1, cache: 1];
    image =
        Render(
            RECNoRerenderObject,
            camera) [instance: 1, cache: 1];
    Display(
        image,
        NULL,
        where,
        throttle) [instance: 2, cache: 1];
    WriteImage(
        image,
        RECfile,
        RECformat) [instance: 1, cache: 1];
    rec_where = Display(
        RECNoRerHW,
        camera,
        where,
        throttle) [instance: 1, cache: 0];
    rec_image = ReadImageWindow(
        rec_where) [instance: 1, cache: 1];
    WriteImage(
        rec_image,
        RECfile,
        RECformat) [instance: 1, cache: 1];
    RECupdateCamera =
	UpdateCamera(
	    camera,
	    resolution=RECresolution,
	    aspect=RECaspect) [instance: 2, cache: 1];
    Display(
        RECRerenderObject,
        camera,
        where,
        throttle) [instance: 1, cache: 1];
    RECRerenderObject =
	ScaleScreen(
	    RECRerenderObject,
	    NULL,
	    RECresolution,
	    camera) [instance: 1, cache: 1];
    image =
        Render(
            RECRerenderObject,
            RECupdateCamera) [instance: 2, cache: 1];
    WriteImage(
        image,
        RECfile,
        RECformat) [instance: 2, cache: 1];
}
main_Image_5_in_1 = "Image_5";
main_Image_5_in_3 = "X24,,";
main_Image_5_in_4 = 1;
main_Image_5_in_5 = [50000 7750 27000];
main_Image_5_in_6 = [-102667 130295 238549];
main_Image_5_in_7 = 154464.0;
main_Image_5_in_8 = 640;
main_Image_5_in_9 = 0.75;
main_Image_5_in_10 = [0.103227 0.891182 -0.441745];
main_Image_5_in_11 = NULL;
main_Image_5_in_12 = 0;
main_Image_5_in_13 = NULL;
main_Image_5_in_14 = 1;
main_Image_5_in_15 = NULL;
main_Image_5_in_16 = NULL;
main_Image_5_in_17 = NULL;
main_Image_5_in_18 = NULL;
main_Image_5_in_19 = 0;
main_Image_5_in_20 = NULL;
main_Image_5_in_21 = NULL;
main_Image_5_in_22 = NULL;
main_Image_5_in_23 = NULL;
main_Image_5_in_25 = NULL;
main_Image_5_in_26 = NULL;
main_Image_5_in_27 = NULL;
main_Image_5_in_28 = NULL;
main_Image_5_in_29 = NULL;
main_Image_5_in_30 = NULL;
main_Image_5_in_31 = NULL;
main_Image_5_in_32 = NULL;
main_Image_5_in_33 = NULL;
main_Image_5_in_34 = NULL;
main_Image_5_in_35 = NULL;
main_Image_5_in_36 = NULL;
main_Image_5_in_37 = NULL;
main_Image_5_in_38 = NULL;
main_Image_5_in_39 = NULL;
main_Image_5_in_40 = NULL;
main_Image_5_in_41 = NULL;
main_Image_5_in_42 = NULL;
main_Image_5_in_43 = NULL;
main_Image_5_in_44 = NULL;
main_Image_5_in_45 = NULL;
main_Image_5_in_46 = NULL;
main_Image_5_in_47 = NULL;
main_Image_5_in_48 = NULL;
Executive("product version 3 1 4");
$sync
main();
