proc getSeed {field} {
set MAXINT [expr {pow(2, 31) - 1}]
expr srand([clock clicks])
set val [expr {int(rand() * $MAXINT)}]
if {[expr {$val % 2}] == 0} {
incr val -1
}
$field setCurrentValue $val
}
GuidoApp check_bm "CHECK BM CONNECTED"
$check_bm setParam functionName "BM GSLIB SGSIM"
set result [$check_bm invoke]
$check_bm destroy
if {$result == "0"} {
GuidoApp appHandle "BM GSLIB SGSIM"
$appHandle setParam license "test"
set appStatus [$appHandle invoke]
$appHandle destroy
if {$appStatus == "-10311"} {
return
}
if [catch {
set nuqs_rows [GuidoGetParamBufferValue [GuidoExecServer GetLastValues {function_name = "BM GSLIB SGSIM" form_name = "SGSIMParameters." table = "nuqs" table_row = 0 field_name = "__num_instances"}] constant]
} result] {
set nuqs_rows 1
}
if [catch {
set variograms_rows [GuidoGetParamBufferValue [GuidoExecServer GetLastValues {function_name = "BM GSLIB SGSIM" form_name = "SGSIMParameters." table = "variograms" table_row = 0 field_name = "__num_instances"}] constant]
} result] {
set variograms_rows 1
}
GuidoForm SGSIMParameters {
-help_id 597
-default_buttons
-label "GSLIB interface: Sequential Gaussian simulation (sgsim / postsim)"
-tip GSLIB_SGSIM_FORM_TIP
-defaults_management true
-layout BoxLayout Y_AXIS
GuidoTabbedPane tabPane {
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-label GUI_FILES
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Input"
-width 64
GuidoFileBrowserField string_file_location {
-display_length 26
-file_mask *.str
-link string_file_id
-format none
-input true
-label "Location"
-max_length 252
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
}
GuidoField string_file_id {
-display_length 10
-format none
-input true
-label "ID Number"
-max_length 16
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
}
GuidoField range {
-default 1
-display_length 10
-format range
-label "String range"
-max_length 26
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
-translate none
}
GuidoComboBox field {
-display_length 3
-exclusive true
-label "D-field"
-max_length 4
-default D1
-null false
-tip GSLIB_IK3D_STRING_FILE_TIP
-value_in D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100
}
GuidoComboBox weight_field {
-display_length 3
-exclusive true
-label "Weight"
-max_length 4
-null true
-tip GSLIB_SGSIM_WEIGHT_DFIELD_TIP
-value_in D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100
}
GuidoField tmin {
-display_length 10
-label "Minimum"
-default -1E+21
-null false
-tip GSLIB_IK3D_TMIN_TIP
-format double
}
GuidoField tmax {
-display_length 10
-label "Maximum"
-default 1E+21
-null false
-tip GSLIB_IK3D_TMAX_TIP
-format double
}
}
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Output"
-width 64
GuidoBMAttributeBrowser attribute_prefix {
-label "Estimate"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_SGSIM_PREFIX_TIP
}
GuidoField num_realizations {
-display_length 8
-label "Number of realizations"
-default 1
-low_bound 1
-null false
-tip GSLIB_SGSIM_REALIZATIONS_TIP
-format integer
}
GuidoLabel anonymous {
-label "Seed"
-height 1
}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoField seed {
-display_length 8
-default 1
-null false
-tip GSLIB_SGSIM_SEED_TIP
-format integer
}
GuidoButton button {
-height 1
-caption "Generate seed"
-action valueChanged {[getSeed $seed]}
-tip GSLIB_SGSIM_MAKE_SEED_TIP
}
}
GuidoCheckBox constrain_interpolation {
-label "Constrain interpolation"
-default false
-tip GSLIB_IK3D_CONSTRAIN_TIP
}
GuidoFileBrowserField debug_file {
-display_length 26
-file_mask *.dbg
-format none
-input true
-label "Debug file"
-max_length 252
-null false
-tip GSLIB_DEBUG_TIP
}
GuidoComboBox debug_level {
-dependency {"[ $debug_file getCurrentValue]" != ""}
-display_length 8
-exclusive true
-label "Debug level"
-null false
-tip GSLIB_DEBUG_LEVEL_TIP
-value_in 0 1 2 3
-alternative_values "none (0)" "low (1)" "medium (2)" "high (3)"
-default 0
}
GuidoCheckBox remove_intermediate_files {
-label "Clean up"
-default true
-tip GSLIB_IK3D_CLEANUP_TIP
}
}
}
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-label Transformation
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-border etched true
-label "Transformation"
-width 64
-height 31
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoCheckBox transformed {
-label "Transformed"
-default false
-tip GSLIB_SGSIM_TRANSFORMED_TIP
}
}
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Tail interpolation / extrapolation for back transformation"
-width 62
-dependency {"[$transformed getCurrentValue]" == "false"}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoField min_data_value {
-dependency {"[$transformed getCurrentValue]" == "false"}
-display_length 4
-format double
-input true
-label "Min data value"
-default 0
-max_length 16
-null false
-tip GSLIB_IK3D_MIN_DATA_VALUE_TIP
}
GuidoField max_data_value {
-dependency {"[$transformed getCurrentValue]" == "false"}
-display_length 4
-format double
-input true
-label "Max data value"
-default 0
-max_length 16
-null false
-tip GSLIB_IK3D_MAX_DATA_VALUE_TIP
}
}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoComboBox lower_tail {
-dependency {"[$transformed getCurrentValue]" == "false"}
-display_length 19
-exclusive true
-label "Lower tail"
-max_length 41
-null false
-tip GSLIB_IK3D_LOWER_TAIL_TIP
-value_in 1 2
-alternative_values "Linear interpolation (1)" "Power model interpolation (2)"
-default 1
}
GuidoComboBox upper_tail {
-display_length 19
-dependency {"[$transformed getCurrentValue]" == "false"}
-exclusive true
-label "Upper tail"
-max_length 41
-null false
-tip GSLIB_IK3D_UPPER_TAIL_TIP
-value_in 1 2
-alternative_values "Linear interpolation (1)" "Power model interpolation (2)"
-default 1
}
}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoField parameter1 {
-dependency {"[$transformed getCurrentValue]" == "false" && "[$lower_tail getCurrentValue]" == 2}
-display_length 4
-format double
-input true
-label "w"
-default 0
-max_length 16
-null false
-tip GSLIB_IK3D_PARAMETER1_TIP
}
GuidoField parameter2 {
-dependency {"[$transformed getCurrentValue]" == "false" && "[$upper_tail getCurrentValue]" == 2}
-display_length 4
-format double
-input true
-label "w"
-default 1
-max_length 16
-null false
-tip GSLIB_IK3D_PARAMETER3_TIP
}
}
}
}
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-width 52
-dependency {"[$transformed getCurrentValue]" == "false"}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoCheckBox reference {
-label "Smooth the distribution"
-default false
-tip GSLIB_SGSIM_SMOOTH_TIP
}
}
GuidoFiller fill {
-height 0.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoComboBox scaling {
-display_length 9
-exclusive true
-label "Scaling type"
-null false
-tip GSLIB_SGSIM_SCALING_TIP
-value_in 0 1
-alternative_values "Arithmetic (0)" "Logarithmic (1)"
-default 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoFiller fill {
-height 0.5
}
GuidoFiller fill {
-height 0.5
}
GuidoField nz {
-display_length 6
-label "Number of Z values"
-default 100
-null false
-tip GSLIB_SGSIM_NZ_TIP
-format integer
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField zmin {
-display_length 6
-label "Minimum Z"
-default 0.0
-null false
-tip GSLIB_SGSIM_ZMIN_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField zmax {
-display_length 6
-label "Maximum Z"
-default 1.0
-null false
-tip GSLIB_SGSIM_ZMAX_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
-next_focus maxpert
}
GuidoFiller fill {
-height 0.5
}
GuidoFiller fill {
-height 0.5
}
GuidoField smoothing_window_size {
-label "Smoothing window size"
-display_length 6
-format integer
-max_length 16
-null false
-tip GSLIB_SGSIM_WINDOW_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
-default 5
}
GuidoFiller fill {
-height 0.5
}
GuidoFiller fill {
-height 0.5
}
GuidoLabel closeness_to {
-label "Closeness to"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoFiller unused {
-width 2
}
GuidoLabel weight {
-label "Weight"
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
}
GuidoLabel close_mean_label {
-label "target mean"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoCheckBox close_mean {
-default false
-tip GSLIB_SGSIM_CLOSE_MEAN_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField mean_weight {
-display_length 6
-default 1
-null false
-tip GSLIB_SGSIM_MEAN_WGT_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true" && "[$close_mean getCurrentValue]" == "true"}
-height 1
}
}
GuidoLabel close_variance_label {
-label "target variance"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoCheckBox close_variance {
-default false
-tip GSLIB_SGSIM_CLOSE_VARIANCE_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField variance_weight {
-display_length 6
-default 1
-null false
-tip GSLIB_SGSIM_VARIANCE_WGT_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true" && "[$close_variance getCurrentValue]" == "true"}
-height 1
}
}
GuidoLabel close_smoothness_label {
-label "target smoothness"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoCheckBox close_smoothness {
-default false
-tip GSLIB_SGSIM_CLOSE_SMOOTHNESS_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField smoothness_weight {
-display_length 6
-default 2
-null false
-tip GSLIB_SGSIM_SMOOTHNESS_WGT_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true" && "[$close_smoothness getCurrentValue]" == "true"}
-height 1
}
}
GuidoLabel close_quantiles_label {
-label "specified quantiles"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoCheckBox close_quantiles {
-default false
-tip GSLIB_SGSIM_CLOSE_QUANTILES_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField quantile_weight {
-display_length 6
-default 2
-null false
-tip GSLIB_SGSIM_QUANTILES_WGT_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true" && "[$close_quantiles getCurrentValue]" == "true"}
-height 1
-next_focus specify_mean
}
}
GuidoFiller fill {
-height 0.5
}
GuidoFiller fill {
-height 0.5
}
}
GuidoFiller fill {
-width 1
}
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoFiller fill {
-height 1
}
GuidoFiller fill {
-height 1
}
GuidoFiller fill {
-height 0.5
}
GuidoFiller fill {
-height 0.5
}
GuidoField maxpert {
-display_length 6
-label "Max Perturbations"
-default 750
-null false
-tip GSLIB_SGSIM_MAXPERT_TIP
-format integer
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField report {
-display_length 6
-label "Report after"
-default 50
-null false
-tip GSLIB_SGSIM_REPORT_TIP
-format integer
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField omin {
-display_length 6
-label "Min objective"
-default 0.0001
-null false
-tip GSLIB_SGSIM_OBJECTIVE_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
-next_focus smoothing_window_size
}
GuidoFiller fill {
-height 3.6
}
GuidoFiller fill {
-height 3.6
}
GuidoLabel mean_label {
-label "Specify mean"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoCheckBox specify_mean {
-default false
-tip GSLIB_SGSIM_SPECIFY_MEAN_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField use_mean {
-display_length 6
-default 2
-null false
-tip GSLIB_SGSIM_SPECIFY_MEAN_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true" && "[$specify_mean getCurrentValue]" == "true"}
-height 1
}
}
GuidoLabel variance_label {
-label "Specify variance"
-height 1
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoCheckBox specify_variance {
-default false
-tip GSLIB_SGSIM_SPECIFY_VARIANCE_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField use_variance {
-display_length 6
-default 2
-null false
-tip GSLIB_SGSIM_SPECIFY_VARIANCE_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true" && "[$specify_variance getCurrentValue]" == "true"}
-height 1
-next_focus ndq
}
}
GuidoFiller filler {
-height 1.1
}
GuidoFiller filler {
-height 1.1
}
GuidoField ndq {
-label "Quantiles from data"
-display_length 6
-format integer
-max_length 16
-null false
-tip GSLIB_SGSIM_QUANTILES_TIP
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
-default 5
-next_focus nuqs
}
GuidoLabel anonymous {
-label "User defined quantiles"
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoScrollPane cdf_scroll {
-scroll_size 18 5
GuidoTable nuqs {
-instances $nuqs_rows 1 100
-interactive true
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
GuidoField cdf {
-label cdf
-display_length 5
-default 0.0
-null false
-tip GSLIB_SGSIM_USER_QUANTILES_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
GuidoField z {
-label z
-display_length 5
-default 0.0
-null false
-tip GSLIB_SGSIM_USER_QUANTILES_TIP
-format double
-dependency {"[$transformed getCurrentValue]" == "false" && "[$reference getCurrentValue]" == "true"}
}
}
}
}
}
}
}
}
}
GuidoPanel anonymous {
-label "Simulation Options"
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoPanel anonymous {
-border etched true
-label "Simulation parameters"
-layout BoxLayout Y_AXIS
-width 64
-height 31
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoComboBox kriging_type {
-label "Kriging type"
-display_length 32
-exclusive true
-null false
-tip GSLIB_SGSIM_KRIGING_TYPE_TIP
-value_in 0 1 2 3 4
-alternative_values "Simple kriging (0)" "Ordinary kriging (1)" "Simple kriging with a locally varying mean (2)" "Kriging with an external drift (3)" "Collocated kriging with one secondary variable (4)"
-default 0
}
GuidoFiller filler {
}
GuidoPanel anonymous {
-layout OverlayLayout
GuidoPanel anonymous {
-layout CentrelineLayout
-dependency {"[ $kriging_type getCurrentValue]" == "2"}
GuidoBMAttributeBrowser mean_attribute {
-label "Mean attribute"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive true
-attribute_types real integer calculated
-tip GSLIB_KT3D_MEAN_ATTRIBUTE_TIP
}
}
GuidoPanel anonymous {
-layout CentrelineLayout
-dependency {"[ $kriging_type getCurrentValue]" == "3"}
GuidoBMAttributeBrowser drift_attribute {
-label "Drift attribute"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive true
-attribute_types real integer calculated
-tip GSLIB_KT3D_DRIFT_ATTRIBUTE_TIP
}
GuidoComboBox drift_field {
-display_length 3
-exclusive true
-label "Drift D-field"
-max_length 4
-default D1
-null false
-tip GSLIB_KT3D_DRIFT_FIELD_TIP
-value_in D1 D2 D3 D4 D5 D6 D7 D8 D9 D10 D11 D12 D13 D14 D15 D16 D17 D18 D19 D20 D21 D22 D23 D24 D25 D26 D27 D28 D29 D30 D31 D32 D33 D34 D35 D36 D37 D38 D39 D40 D41 D42 D43 D44 D45 D46 D47 D48 D49 D50 D51 D52 D53 D54 D55 D56 D57 D58 D59 D60 D61 D62 D63 D64 D65 D66 D67 D68 D69 D70 D71 D72 D73 D74 D75 D76 D77 D78 D79 D80 D81 D82 D83 D84 D85 D86 D87 D88 D89 D90 D91 D92 D93 D94 D95 D96 D97 D98 D99 D100
}
}
GuidoPanel anonymous {
-layout CentrelineLayout
-dependency {"[ $kriging_type getCurrentValue]" == "4"}
GuidoBMAttributeBrowser secondary_attribute {
-label "Secondary attribute"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive true
-attribute_types real integer calculated
-tip GSLIB_SGSIM_SECONDARY_ATTRIBUTE_TIP
}
GuidoField correlation_coefficient {
-label "Correlation coefficient"
-display_length 6
-default 0.0
-null false
-tip GSLIB_SGSIM_CORRELATION_TIP
-format double
}
GuidoField varred {
-label "Variance reduction factor"
-display_length 6
-default 1.0
-null false
-tip GSLIB_SGSIM_VARRED_TIP
-format double
}
}
}
GuidoFiller fill1 {
-height 0.5
}
GuidoFiller fill1 {
-height 0.5
}
GuidoField max_per_octant {
-display_length 6
-label "Maximum samples per octant"
-default 0
-null false
-tip GSLIB_IK3D_MAX_PER_OCTANT_TIP
-format integer
}
GuidoField num_nodes {
-label "Number of simulated nodes to use"
-display_length 6
-default 12
-null false
-tip GSLIB_SGSIM_NUMSIM_TIP
-format integer
}
GuidoCheckBox multiple_grid_search {
-label "Multiple grid search"
-default true
-tip GSLIB_SGSIM_MULTIGRID_TIP
}
GuidoField num_grids {
-dependency {"[$multiple_grid_search getCurrentValue]"}
-label "Number of multiple grid refinements"
-display_length 6
-default 3
-null false
-tip GSLIB_SGSIM_NUM_REFINEMENTS_TIP
-format integer
}
GuidoCheckBox assign {
-label "Assign data to nodes"
-default false
-tip GSLIB_SGSIM_ASSIGN_TO_NODES_TIP
}
GuidoField min_samples {
-dependency {"[$assign getCurrentValue]" != "true"}
-display_length 6
-label "Minimum samples to simulate a block"
-default 4
-null false
-tip GSLIB_SGSIM_MIN_SAMPLES_TIP
-format integer
}
GuidoField max_samples {
-dependency {"[$assign getCurrentValue]" != "true"}
-display_length 6
-label "Maximum samples to simulate a block"
-default 8
-null false
-tip GSLIB_SISIM_MAX_SAMPLES_TIP
-format integer
}
GuidoFiller fill2 {
-height 0.5
}
GuidoFiller fill2 {
-height 0.5
}
GuidoLabel label {
-label " "
-height 1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoLabel hMaxlabel {
-label "hMax"
-width 6
}
GuidoLabel hMinlabel {
-label "hMin"
-width 6
}
GuidoLabel Vertlabel {
-label "Vert"
-width 6
}
}
GuidoLabel label {
-label "Search radius"
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoField x_search_radius {
-display_length 6
-default 20
-null false
-tip GSLIB_IK3D_X_SEARCH_RADIUS_TIP
-format double
}
GuidoField y_search_radius {
-display_length 6
-default 20
-null false
-tip GSLIB_IK3D_Y_SEARCH_RADIUS_TIP
-format double
}
GuidoField z_search_radius {
-display_length 6
-default 20
-null false
-tip GSLIB_IK3D_Z_SEARCH_RADIUS_TIP
-format double
}
}
GuidoLabel label {
-label ""
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoLabel labelx {
-width 6
-label "Angle1"
}
GuidoLabel labely {
-width 6
-label "Angle2"
}
GuidoLabel labelz {
-width 6
-label "Angle3"
}
}
GuidoLabel label {
-label "Search angles"
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoField x_search_angle {
-display_length 6
-default 0
-null false
-tip GSLIB_IK3D_X_SEARCH_ANGLE_TIP
-format double
}
GuidoField y_search_angle {
-display_length 6
-default 0
-null false
-tip GSLIB_IK3D_Y_SEARCH_ANGLE_TIP
-format double
}
GuidoField z_search_angle {
-display_length 6
-default 0
-null false
-tip GSLIB_IK3D_Z_SEARCH_ANGLE_TIP
-format double
}
}
GuidoLabel label {
-label ""
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoLabel labelx {
-width 6
-label "X"
}
GuidoLabel labely {
-width 6
-label "Y"
}
GuidoLabel labelz {
-width 6
-label "Z"
}
}
GuidoLabel label {
-label "Size of covariance lookup table"
-height 1.1
}
GuidoPanel anonymous {
-layout BoxLayout X_AXIS
GuidoField x_lookup_size {
-display_length 6
-default 0
-null false
-tip GSLIB_SGSIM_COVARIANCE_TABLE_TIP
-format integer
-low_bound 1
}
GuidoField y_lookup_size {
-display_length 6
-default 0
-null false
-tip GSLIB_SGSIM_COVARIANCE_TABLE_TIP
-format integer
-low_bound 1
}
GuidoField z_lookup_size {
-display_length 6
-default 0
-null false
-tip GSLIB_SGSIM_COVARIANCE_TABLE_TIP
-format integer
-low_bound 1
}
}
GuidoFiller fill2 {
-height 0.5
}
GuidoFiller fill2 {
-height 0.5
}
}
}
}
}
GuidoPanel anonymous {
-label "Variograms"
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
-border etched true
-label "Variograms"
-width 64
-height 31
GuidoPanel anonymous {
-layout CentreLineLayout
GuidoField nugget {
-display_length 5
-label "Nugget"
-default 1
-null false
-tip GSLIB_KT3D_NUGGET_TIP
-format double
-action valueChanged {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
}
GuidoLabel sill_label {
-label "Sill"
}
GuidoLabel sill {
-label "2"
}
}
GuidoScrollPane variogram_scroll {
-scroll_size 59 11
GuidoTable variograms {
-instances $variograms_rows 1 100
-interactive true
-action rowAdded {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
-action rowInserted {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
-action rowDeleted {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
GuidoComboBox type {
-display_length 9
-exclusive true
-label "Type"
-null false
-tip GSLIB_IK3D_TYPE_1_TIP
-value_in 1 2 3 5
-alternative_values "Spherical (1)" "Exponential (2)" "Gaussian (3)" "Hole effect (5)"
-default 1
}
GuidoField cc {
-display_length 5
-label "Cc"
-default 1
-null false
-tip GSLIB_IK3D_CC_1_TIP
-format double
-action valueChanged {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
}
GuidoField hmax {
-label "hMax"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HMAX_1_TIP
-format double
}
GuidoField hmin {
-label "hMin"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HMIN_1_TIP
-format double
}
GuidoField hvert {
-label "Vert"
-display_length 5
-default 1
-low_bound 0.0001
-null false
-tip GSLIB_IK3D_HVERT_1_TIP
-format double
}
GuidoField angle1 {
-label "Angle1"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
GuidoField angle2 {
-label "Angle2"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
GuidoField angle3 {
-label "Angle3"
-display_length 5
-default 0
-null false
-tip GSLIB_ROTATION_ANGLE_TIP
-format double
}
}
}
}
}
GuidoPanel anonymous {
-label "Post Processing"
-layout OverlayLayout
GuidoPanel anonymous {
-layout BoxLayout Y_AXIS
GuidoPanel anonymous {
-layout CentreLineLayout
-border etched true
-label "Output type"
-width 64
-height 31
GuidoComboBox output_type {
-display_length 28
-exclusive true
-label "Output type"
-tip GSLIB_POSTIK_TIP
-value_in 1 2 3 4 5
-alternative_values "E-type estimate (1)" "Probability and means above and below ... (2)" "Z percentile corresponding to ... (3)" "Symmetric probability interval with width... (4)" "Conditional variance (5)"
-default ""
}
GuidoFiller fill0 {
-height 0.5
}
GuidoPanel panel1bb {
-layout OverlayLayout
GuidoPanel panel_output1 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "1"}
GuidoBMAttributeBrowser attribute {
-label "Estimate"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_ATTRIBUTE_TIP
}
}
GuidoPanel panel_output2 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "2"}
GuidoField output_threshold {
-label "Threshold"
-display_length 10
-default 0.25
-null false
-tip GSLIB_IK3D_OUTPUT_THRESHOLD_TIP
-format double
}
GuidoBMAttributeBrowser probability_attribute {
-label "probability > Threshold"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_PROBABILITY_ATTRIBUTE_TIP
}
GuidoBMAttributeBrowser mean_greater {
-label "mean > Threshold"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_MEAN_GREATER_TIP
}
GuidoBMAttributeBrowser mean_less {
-label "mean < Threshold"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_MEAN_LESS_TIP
}
}
GuidoPanel panel_output3 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "3"}
GuidoField output_cdf {
-label "cdf"
-display_length 10
-default 0.25
-null false
-tip GSLIB_IK3D_OUTPUT_CDF_TIP
-format double
}
GuidoBMAttributeBrowser z_value {
-label "z value"
-display_length 7.6
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_Z_VALUE_TIP
}
}
GuidoPanel panel_output4 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "4"}
GuidoField total_width {
-label "Total width"
-display_length 10
-null false
-tip GSLIB_SGSIM_TOTAL_WIDTH_TIP
-format double
}
GuidoBMAttributeBrowser lower {
-label "Lower"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_SGSIM_PROBABILITY_INTERVAL_TIP
}
GuidoBMAttributeBrowser upper {
-label "Upper"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_SGSIM_PROBABILITY_INTERVAL_TIP
}
}
GuidoPanel panel_output5 {
-layout CentrelineLayout
-dependency {"[$output_type getCurrentValue]" == "5"}
GuidoBMAttributeBrowser conditional_variance {
-label "Conditional variance"
-display_length 10
-max_length BM_MAX_ATT_NAME_LEN
-null false
-format none
-translate none
-exclusive false
-attribute_types real
-tip GSLIB_IK3D_CONDITIONAL_VARIANCE_TIP
}
}
}
}
}
}
}
}
$tabPane setActionCallback mousePressed {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
$tabPane setActionCallback keyReleased {[
set sill_value [$nugget getCurrentValue]
for {set row_idx 0} {$row_idx < [$variograms getRowCount]} {incr row_idx} {
set val [$cc getCurrentValue $row_idx]
set sill_value [expr $sill_value + $val]
}
$sill setCurrentValue $sill_value
]}
$attribute_prefix updateBrowserList
$mean_attribute updateBrowserList
$drift_attribute updateBrowserList
$secondary_attribute updateBrowserList
$attribute updateBrowserList
$probability_attribute updateBrowserList
$mean_greater updateBrowserList
$mean_less updateBrowserList
$z_value updateBrowserList
$lower updateBrowserList
$upper updateBrowserList
$conditional_variance updateBrowserList
getSeed $seed
set dataBuffer [GuidoExecServer GetBlockModelParameters {}]
set xorg [GuidoGetParamBufferValue $dataBuffer Origin(0)]
set yorg [GuidoGetParamBufferValue $dataBuffer Origin(1)]
set zorg [GuidoGetParamBufferValue $dataBuffer Origin(2)]
set xext [GuidoGetParamBufferValue $dataBuffer Extents(0)]
set yext [GuidoGetParamBufferValue $dataBuffer Extents(1)]
set zext [GuidoGetParamBufferValue $dataBuffer Extents(2)]
set xsiz [GuidoGetParamBufferValue $dataBuffer UserBlock(0)]
set ysiz [GuidoGetParamBufferValue $dataBuffer UserBlock(1)]
set zsiz [GuidoGetParamBufferValue $dataBuffer UserBlock(2)]
$x_lookup_size setCurrentValue [expr ($xext - $xorg) / $xsiz + 1]
$y_lookup_size setCurrentValue [expr ($yext - $yorg) / $ysiz + 1]
$z_lookup_size setCurrentValue [expr ($zext - $zorg) / $zsiz + 1]
set formStatus [$SGSIMParameters interact]
if {$formStatus == "apply"} {
GuidoApp appHandle "BM GSLIB SGSIM"
$appHandle setParam string_file_location [$string_file_location getCurrentValue]
$appHandle setParam string_file_id [$string_file_id getCurrentValue]
$appHandle setParam range [$range getCurrentValue]
$appHandle setParam field [$field getCurrentValue]
$appHandle setParam weight_field [$weight_field getCurrentValue]
$appHandle setParam tmin [$tmin getCurrentValue]
$appHandle setParam tmax [$tmax getCurrentValue]
$appHandle setParam attribute_prefix [$attribute_prefix getCurrentValue]
$appHandle setParam num_realizations [$num_realizations getCurrentValue]
$appHandle setParam seed [$seed getCurrentValue]
$appHandle setParam constrain_interpolation [$constrain_interpolation getCurrentValue]
$appHandle setParam debug_file [$debug_file getCurrentValue]
$appHandle setParam debug_level [$debug_level getCurrentValue]
$appHandle setParam remove_intermediate_files [$remove_intermediate_files getCurrentValue]
$appHandle setParam transformed [$transformed getCurrentValue]
if {"[$transformed getCurrentValue]" == "false"} {
$appHandle setParam min_data_value [$min_data_value getCurrentValue]
$appHandle setParam max_data_value [$max_data_value getCurrentValue]
$appHandle setParam lower_tail [$lower_tail getCurrentValue]
$appHandle setParam upper_tail [$upper_tail getCurrentValue]
$appHandle setParam parameter1 [$parameter1 getCurrentValue]
$appHandle setParam parameter2 [$parameter2 getCurrentValue]
$appHandle setParam reference [$reference getCurrentValue]
if {"[$reference getCurrentValue]" == "true"} {
$appHandle setParam nz [$nz getCurrentValue]
$appHandle setParam zmin [$zmin getCurrentValue]
$appHandle setParam zmax [$zmax getCurrentValue]
$appHandle setParam scaling [$scaling getCurrentValue]
$appHandle setParam maxpert [$maxpert getCurrentValue]
$appHandle setParam report [$report getCurrentValue]
$appHandle setParam omin [$omin getCurrentValue]
$appHandle setParam close_mean [$close_mean getCurrentValue]
$appHandle setParam mean_weight [$mean_weight getCurrentValue]
$appHandle setParam close_variance [$close_variance getCurrentValue]
$appHandle setParam variance_weight [$variance_weight getCurrentValue]
$appHandle setParam close_smoothness [$close_smoothness getCurrentValue]
$appHandle setParam smoothness_weight [$smoothness_weight getCurrentValue]
$appHandle setParam close_quantiles [$close_quantiles getCurrentValue]
$appHandle setParam quantile_weight [$quantile_weight getCurrentValue]
$appHandle setParam smoothing_window_size [$smoothing_window_size getCurrentValue]
$appHandle setParam ndq [$ndq getCurrentValue]
$appHandle setParam specify_mean [$specify_mean getCurrentValue]
if {[$specify_mean getCurrentValue]} {
$appHandle setParam use_mean [$use_mean getCurrentValue]
}
$appHandle setParam specify_variance [$specify_variance getCurrentValue]
if {[$specify_variance getCurrentValue]} {
$appHandle setParam use_variance [$use_variance getCurrentValue]
}
for {set row_idx 0} {$row_idx < [$nuqs getRowCount]} {incr row_idx} {
$appHandle setParam "cdf\($row_idx\)" [$cdf getCurrentValue $row_idx]
$appHandle setParam "z\($row_idx\)" [$z getCurrentValue $row_idx]
}
}
}
$appHandle setParam kriging_type [$kriging_type getCurrentValue]
if {"[$kriging_type getCurrentValue]" == "2"} {
$appHandle setParam secondary_attribute [$mean_attribute getCurrentValue]
}
if {"[$kriging_type getCurrentValue]" == "3"} {
$appHandle setParam secondary_attribute [$drift_attribute getCurrentValue]
$appHandle setParam drift_field [$drift_field getCurrentValue]
}
if {"[$kriging_type getCurrentValue]" == "4"} {
$appHandle setParam secondary_attribute [$secondary_attribute getCurrentValue]
$appHandle setParam correlation_coefficient [$correlation_coefficient getCurrentValue]
$appHandle setParam varred [$varred getCurrentValue]
}
$appHandle setParam max_per_octant [$max_per_octant getCurrentValue]
$appHandle setParam min_samples [$min_samples getCurrentValue]
$appHandle setParam max_samples [$max_samples getCurrentValue]
$appHandle setParam x_search_radius [$x_search_radius getCurrentValue]
$appHandle setParam y_search_radius [$y_search_radius getCurrentValue]
$appHandle setParam z_search_radius [$z_search_radius getCurrentValue]
$appHandle setParam x_search_angle [$x_search_angle getCurrentValue]
$appHandle setParam y_search_angle [$y_search_angle getCurrentValue]
$appHandle setParam z_search_angle [$z_search_angle getCurrentValue]
$appHandle setParam x_lookup_size [$x_lookup_size getCurrentValue]
$appHandle setParam y_lookup_size [$y_lookup_size getCurrentValue]
$appHandle setParam z_lookup_size [$z_lookup_size getCurrentValue]
$appHandle setParam num_nodes [$num_nodes getCurrentValue]
$appHandle setParam assign [$assign getCurrentValue]
$appHandle setParam multiple_grid_search [$multiple_grid_search getCurrentValue]
if {[$multiple_grid_search getCurrentValue]} {
$appHandle setParam num_grids [$num_grids getCurrentValue]
}
$appHandle setParam nugget [$nugget getCurrentValue]
$appHandle setParam nrows [$variograms getRowCount]
for {set vrow_idx 0} {$vrow_idx < [$variograms getRowCount]} {incr vrow_idx} {
set variogramType [$type getCurrentValue $vrow_idx]
regexp {([0-9]+)} $variogramType number
$appHandle setParam "type\($vrow_idx\)" $number
$appHandle setParam "cc\($vrow_idx\)"     [$cc getCurrentValue $vrow_idx]
$appHandle setParam "angle1\($vrow_idx\)" [$angle1 getCurrentValue $vrow_idx]
$appHandle setParam "angle2\($vrow_idx\)" [$angle2 getCurrentValue $vrow_idx]
$appHandle setParam "angle3\($vrow_idx\)" [$angle3 getCurrentValue $vrow_idx]
$appHandle setParam "hmin\($vrow_idx\)"   [$hmin getCurrentValue $vrow_idx]
$appHandle setParam "hmax\($vrow_idx\)"   [$hmax getCurrentValue $vrow_idx]
$appHandle setParam "hvert\($vrow_idx\)"  [$hvert getCurrentValue $vrow_idx]
}
$appHandle setParam output_type [$output_type getCurrentValue]
if {[$output_type getCurrentValue] == 1} {
$appHandle setParam parameter 0.0
$appHandle setParam attribute [$attribute getCurrentValue]
}
if {[$output_type getCurrentValue] == 2} {
$appHandle setParam parameter [$output_threshold getCurrentValue]
$appHandle setParam probability_attribute [$probability_attribute getCurrentValue]
$appHandle setParam mean_greater [$mean_greater getCurrentValue]
$appHandle setParam mean_less [$mean_less getCurrentValue]
}
if {[$output_type getCurrentValue] == 3} {
$appHandle setParam parameter [$output_cdf getCurrentValue]
$appHandle setParam attribute [$z_value getCurrentValue]
}
if {[$output_type getCurrentValue] == 4} {
$appHandle setParam parameter [$total_width getCurrentValue]
$appHandle setParam lower [$lower getCurrentValue]
$appHandle setParam upper [$upper getCurrentValue]
}
if {[$output_type getCurrentValue] == 5} {
$appHandle setParam parameter 0.0
$appHandle setParam attribute [$conditional_variance getCurrentValue]
}
$appHandle invoke
$appHandle destroy
}
$SGSIMParameters destroy
}
