App-SeismicUnixGui

 view release on metacpan or  search on metacpan

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $Vbot_file = $immodpg->{_Vbot_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $Vbot_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $Vbot;
                                $format = $var_immodpg->{_format_real};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_isVbot_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $Vbot_upper_layer_file = $immodpg->{_Vbot_upper_layer_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $Vbot_upper_layer_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
 
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $Vbot_upper_layer;
                                $format = $var_immodpg->{_format_real};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_isVbot_upper_layer_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $VbotNtop_factor_file = $immodpg->{_VbotNtop_factor_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $VbotNtop_factor_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $VbotNtop_factor;
                                $format = '  0.0';
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_isVbotNtop_factor_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $file = $immodpg->{_VbotNtop_multiply_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0]   = $immodpg->{_Vbot_multiplied};
                                $X[1]   = $immodpg->{_Vtop_multiplied};
                                $format = $var_immodpg->{_format_real};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        else {
                print("immodpg, _setVbotNtop_multiply, unexpected answer\n");
        }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $Vincrement_file = $immodpg->{_Vincrement_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $Vincrement_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                 
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $Vincrement;
                         
                                $format = $var_immodpg->{_format51f};                                   
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_isVincrement_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $Vtop_file = $immodpg->{_Vtop_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $Vtop_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $Vtop;
                                $format = $var_immodpg->{_format_real};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_isVtop_changed_in_gui} eq $no ) {
 
                # NADA
                print("immodpg, _setVtop, no change\n");

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $Vtop_lower_layer_file = $immodpg->{_Vtop_lower_layer_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $Vtop_lower_layer_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $Vtop_lower_layer;
                                $format = $var_immodpg->{_format_real};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_isVtop_lower_layer_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $test   = $yes;
                my $change = $immodpg->{_change_file};
 
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $change;
                my $outbound_locked = $outbound . '_locked';
                my $format          = $var_immodpg->{_format_string};
 
                my $count      = 0;
                my $max_counts = 1000;
                for (
                        my $i = 0 ;
                        ( $test eq $yes ) and ( $count < $max_counts ) ;
                        $i++
                  )
                {
 
                        #                       print("1. immodpg,_set_change, in loop count=$count \n");
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
 
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                # print("immodpg, _set_change, outbound_locked=$outbound_locked\n");
                # print("immodpg, _set_change, IMMODPG_INVISIBLE=$IMMODPG_INVISIBLE\n");
                # print("immodpg, _set_change, created empty locked file=$X[0]\n");
 
                # print("immodpg, _set_change, outbound=$outbound\n");
                # print("immodpg, _set_change, IMMODPG_INVISIBLE=$IMMODPG_INVISIBLE\n");
 
                                # do not overwrite a waiting change (= yes)
                                my $response_aref = $files->read_1col_aref( \$outbound );
                                my $ans           = @{$response_aref}[0];
 
                                if ( $ans eq $yes ) {
 
                                 # do not overwrite a waiting change (= yes)
                                 # print("2. immodpg, _set_change, SKIP\n");
                                 # print("immodpg, _set_change,do not overwrite change_file\n");
 
                                        unlink($outbound_locked);
 
                                }
                                elsif ( $ans eq $no ) {
 
                                        # overwrite change_file(=no) with no or yes
                                        $X[0] = $yes_or_no;
                                        $files->write_1col_aref( \@X, \$outbound, \$format );
 
                        # print("immodpg, _set_change, overwrite change file with $X[0]\n");
 
                                        unlink($outbound_locked);
 
                                        # print("3. immodpg, _set_change, delete locked file\n");
                                        # print("4. immodpg, _set_change, yes_or_no=$X[0]\n");
 
                                        $test = $no;
 
                                }
                                else {
                                        print("immodpg, _set_change, unexpected result \n");
                                }    # test change_file's content
 
                        }
                        else {
 
                                # print("immodpg,_set_change, locked change file\n");
                                $count++;    # governor on finding an unlocked change_file
                        }    # if unlocked file is missing and change_file is free
 
                        $count++;    # governor on checking for a change_file = yes
                }    # for
 
        }
        else {
                print("immodpg, _set_change, missing values\n");
        }
        return ();
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $clip_file = $immodpg->{_clip_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $clip_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $clip;
                                $format = $var_immodpg->{_format51f};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                # print("immodpg, _set_clip, output clip = $clip\n");
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_is_clip_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $thickness_m_file = $immodpg->{_thickness_m_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $thickness_m_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $thickness_m;
                                $format = $var_immodpg->{_format51f};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_is_thickness_m_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
variables
 
=cut           
 
                my @X;
                my $thickness_increment_m_file =
                  $immodpg->{_thickness_increment_m_file};
 
                my $test     = $no;
                my $outbound = $IMMODPG_INVISIBLE . '/' . $thickness_increment_m_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $thickness_increment_m;
                                print("thickness_increment_m=$thickness_increment_m\n");
                                $format = $var_immodpg->{_format51f};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
                                $test = $yes;
 
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_is_layer_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $layer_file = $immodpg->{_layer_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $layer_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        # print("in loop \n");
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $layer;
                                $format = $var_immodpg->{_format_integer};
                                $files->write_1col_aref( \@X, \$outbound, \$format );
                                unlink($outbound_locked);
 
                                $test = $yes;
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_is_layer_changed_in_gui} eq $no ) {
 
                # NADA

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $option_file = $immodpg->{_option_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $option_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        # print("immodpg,_set_option, in loop \n");
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $option;
                                $format = $var_immodpg->{_format2i};
 
#                               print("2.immodpg,_set_option,option:$option\n");
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
 
                                $test = $yes;
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_is_option_changed} eq $no ) {
                # NADA
        }
        else {

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
                _set_change($yes);
 
   #                                    print("immodpg, setVbot_minus, Vbot is changed: $yes \n");
   #                                    print("immodpg, setVbot_minus,option:$Vbot_minus_opt\n");
   #                                    print("immodpg, setVbot_minus, V=$immodpg->{_Vbot_current}\n");
 
        }
        else {
 
                #       negative cases are reset by fortran program
                #       and so eliminate need to read locked files
                #       while use of locked files helps most of the time
                #       creation and deletion of locked files in perl are not
                #       failsafe
                #
                # print("immodpg, setVbot_minus, same Vbot NADA\n");
        }
 
}
else {
        print("immodpg, setVbot_minus, Vbot value missing\n");
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
                # for fortran program to read
                _set_option($Vbot_plus_opt);
                _set_change($yes);
 
  #                                     print("immodpg, setVbot_plus, Vbot_plus_opt:$Vbot_plus_opt \n");
 
        }
        else {
 
                #       negative cases are reset by fortran program
                #       and so eliminate need to read locked files
                #       while use of locked files helps most of the time
                #       creation and deletion of locked files in perl are not
                #       failsafe
                #
                #                               print("immodpg, setVbot_plus, same Vbot NADA\n");
        }
 
}
else {
        print("immodpg, setVbot_plus, Vbot value missing\n");
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
                _set_option($Vtop_minus_opt);
                _set_change($yes);
 
        #                               print("immodpg, setVtop_minus,option:$Vtop_minus_opt\n");
        #                               print("immodpg, setVtop_minus, V=$immodpg->{_Vtop_current}\n");
 
        }
        else {
 
                #       negative cases are reset by fortran program
                #       and so eliminate need to read locked files
                #       while use of locked files helps most of the time
                #       creation and deletion of locked files in perl are not
                #       failsafe
                #
                print("immodpg, setVtop_minus, same Vtop NADA\n");
        }
 
}
else {
        print("immodpg, setVtop_minus, Vtop value missing\n");
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
                        #                                       print("immodpg, setVtop_plus,option:$Vtop_plus_opt\n");
                        #                                       print("immodpg, setVtop_plus, V=$immodpg->{_Vtop_current}\n");
 
                        }
                        else {
 
#                               print("immodpg, setVtop_plus, VtopEntry=$immodpg->{_VtopEntry}\n");
#                               print("immodpg, setVtop_plus, Vincrement=$immodpg->{_Vincrement_current}\n");
 
                                #       negative cases are reset by fortran program
                                #       and so eliminate need to read locked files
                                #       while use of locked files helps most of the time
                                #       creation and deletion of locked files in perl are not
                                #       failsafe
                                #
                                #                               print("immodpg, setVtop_plus, same Vtop NADA\n");
                        }
 
                }
                else {
                        print("immodpg, setVtop_plus, Vtop value missing\n");
 
#                       print("immodpg, setVtop_plus, VtopEntry=$immodpg->{_VtopEntry}\n");

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
                $immodpg->{_note} = $immodpg->{_note} . ' cdp=' . $immodpg->{_cdp};
                $immodpg->{_Step} = $immodpg->{_Step} . ' cdp=' . $immodpg->{_cdp};
 
        }
        else {
                print("immodpg, cdp, missing cdp,\n");
        }
}
 
=head2 sub clean_trash
delete remaining locked files
reset default files as well
 
=cut
 
sub clean_trash {
        my ($self) = @_;
        use File::stat;
 
        my $xk    = xk->new();
        my $files = manage_files_by2->new();
        my ( $outbound_locked, $outbound );
 
        my @X;
        my $Vbot_file                  = $immodpg->{_Vbot_file};
        my $VbotNtop_factor_file       = $immodpg->{_VbotNtop_factor_file};
        my $Vbot_upper_layer_file      = $immodpg->{_Vbot_upper_layer_file};
        my $Vincrement_file            = $immodpg->{_Vincrement_file};
        my $Vtop_file                  = $immodpg->{_Vtop_file};
        my $Vtop_lower_layer_file      = $immodpg->{_Vtop_lower_layer_file};
        my $change_file                = $immodpg->{_change_file};
        my $clip_file                  = $immodpg->{_clip_file};

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
# kill previous processes
$xk->set_process('immodpg1.1');
$xk->kill_process();
 
$xk->set_process('pgxwin_server');
 
# print("immodpg,exit: kill pgxwin_server\n");
$xk->kill_process();
 
# deleted lock files
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $Vbot_file . '_locked';
unlink($outbound_locked);
$outbound_locked =
  $IMMODPG_INVISIBLE . '/' . $VbotNtop_factor_file . '_locked';
unlink($outbound_locked);
$outbound_locked =
  $IMMODPG_INVISIBLE . '/' . $Vbot_upper_layer_file . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $Vincrement_file . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $Vtop_file . '_locked';
unlink($outbound_locked);
$outbound_locked =
  $IMMODPG_INVISIBLE . '/' . $Vtop_lower_layer_file . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $change_file . '_locked';
 
#       print("immodpg, clean_trash, delete $outbound_locked\n");
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $clip_file . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG . '/' . $immodpg_model . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $layer_file . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $option_file . '_locked';
unlink($outbound_locked);
$outbound_locked = $IMMODPG_INVISIBLE . '/' . $thickness_m_file . '_locked';
unlink($outbound_locked);
$outbound_locked =
  $IMMODPG_INVISIBLE . '/' . $thickness_increment_m_file . '_locked';
unlink($outbound_locked);
 
# reset files to their default options
$outbound = $IMMODPG_INVISIBLE . '/' . $change_file;
unlink($outbound);
my $format = $var_immodpg->{_format_string};
$X[0] = $immodpg->{_change_default};
$files->write_1col_aref( \@X, \$outbound, \$format );
 
_fortran_layer( $immodpg->{_layer_default} );
_set_option( $immodpg->{_option_default} );
_set_change( $immodpg->{_change_default} );
 
# delete empty files (including surviving lock files)
# remove weird, locked files from the current directory
my $CD = `pwd`;
$files->set_directory($CD);
$files->clear_empty_files();
 
# remove weird lock files from the main directory
$files->set_directory($IMMODPG);
$files->clear_empty_files();
 
# remove weird lock files from the IMMODPG_INVISIBLE
$files->set_directory($IMMODPG_INVISIBLE);

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
                        #                               print("immodpg, setVbot, V=$immodpg->{_Vbot_current}\n");
 
                        _setVbot( $immodpg->{_Vbot_current} );
                        _set_option($Vbot_opt);
                        _set_change($yes);
 
                }
                else {
 
                        #                       negative cases are reset by fortran program
                        #                       and so eliminate need to read locked files
                        #                       while use of locked files helps most of the time
                        #                       creation and deletion of locked files in perl are not
                        #                       failsafe
 
                        #  print("immodpg, setVbot, same Vbot NADA\n");
                }
 
        }
        else {
 
        }
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
                                _set_option($Vbot_upper_layer_opt);
                                _set_change($yes);
 
#                               print("immodpg, setVbot_upper_layer,option:$Vbot_upper_layer_opt\n");
#                               print("immodpg, setVbot_upper_layer,V= $immodpg->{_Vbot_upper_layer_current}\n");
 
                        }
                        else {
 
                                #                       negative cases are reset by fortran program
                                #                       and so eliminate need to read locked files
                                #                       while use of locked files helps most of the time
                                #                       creation and deletion of locked files in perl are not
                                #                       failsafe
 
                                # print("immodpg, setVbot_upper_layer, same Vbot NADA\n");
                        }
 
                }
                else {
 
 # print("immodpg, setVbot_upper_layer, Velocity is empty in non-layer NADA\n");
                }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
                                _set_option($VbotNVtop_lower_layer_minus_opt);
                                _set_change($yes);
 
#                               print("immodpg, setVbotNVtop_lower_layer_minus,option:$VbotNVtop_lower_layer_minus_opt\n");
#                               print("immodpg, setVbotNVtop_lower_layer_minus, V=$immodpg->{_Vtop_lower_layer_current}\n");
 
                        }
                        else {
 
#       negative cases are reset by fortran program
#       and so eliminate need to read locked files
#       while use of locked files helps most of the time
#       creation and deletion of locked files in perl are not
#       failsafe
#
#                               print("immodpg, setVbotNVtop_lower_layer_minus, same Vbot and Vtop_lower_layer; NADA\n");
                        }
 
                }
                else {
                        print(
"immodpg, setVbotNVtop_lower_layer_minus, Vbot or Vtop_lower_layer value missing\n"
                        );

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
                                _set_option($VbotNVtop_lower_layer_plus_opt);
                                _set_change($yes);
 
#                               print("immodpg, setVbotNVtop_lower_layer_plus,option:$VbotNVtop_lower_layer_plus_opt\n");
#                               print("immodpg, setVbotNVtop_lower_layer_plus, V=$immodpg->{_Vtop_lower_layer_current}\n");
 
                        }
                        else {
 
#       negative cases are reset by fortran program
#       and so eliminate need to read locked files
#       while use of locked files helps most of the time
#       creation and deletion of locked files in perl are not
#       failsafe
#
#                               print("immodpg, setVbotNVtop_lower_layer_plus, same Vbot and Vtop_lower_layer; NADA\n");
                        }
 
                }
                else {
                        print(
"immodpg, setVbotNVtop_lower_layer_plus, Vbot or Vtop_lower_layer value missing\n"
                        );

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
                                _set_option($VtopNVbot_upper_layer_minus_opt);
                                _set_change($yes);
 
#                               print("immodpg, setVtopNVbot_upper_layer_minus,option:$VtopNVbot_upper_layer_minus_opt\n");
#                               print("immodpg, setVtopNVbot_upper_layer_minus, V=$immodpg->{_Vbot_upper_layer_current}\n");
 
                        }
                        else {
 
#       negative cases are reset by fortran program
#       and so eliminate need to read locked files
#       while use of locked files helps most of the time
#       creation and deletion of locked files in perl are not
#       failsafe
#
# print("immodpg, setVtopNVbot_upper_layer_minus, same Vtop and Vbot_upper_layer; NADA\n");
                        }
 
                }
                else {
 
# print("immodpg, setVtopNVbot_upper_layer_minus, Vtop or Vbot_upper_layer value missing-NADA\n");
                }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
                                _set_option($VtopNVbot_upper_layer_plus_opt);
                                _set_change($yes);
 
#                               print("immodpg, setVtopNVbot_upper_layer_plus,option:$VtopNVbot_upper_layer_plus_opt\n");
#                               print("immodpg, setVtopNVbot_upper_layer_plus, V=$immodpg->{_Vbot_upper_layer_current}\n");
 
                        }
                        else {
 
#       negative cases are reset by fortran program
#       and so eliminate need to read locked files
#       while use of locked files helps most of the time
#       creation and deletion of locked files in perl are not
#       failsafe
#
#                               print("immodpg, setVtopNVbot_upper_layer_plus, same Vtop and Vbot_upper_layer; NADA\n");
                        }
 
                }
                else {
 
# print("immodpg, setVtopNVbot_upper_layer_plus, Vtop or Vbot_upper_layer value missing NADA\n");
                }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
#                   print("immodpg, setVincrement, $immodpg->{_Vincrement_current}\n");
 
                        _setVincrement( $immodpg->{_Vincrement_current} );
                        _set_option($changeVincrement_opt);
                        _set_change($yes);
 
                }
                else {
 
                        #                       negative cases are reset by fortran program
                        #                       and so eliminate need to read locked files
                        #                       while use of locked files helps most of the time
                        #                       creation and deletion of locked files in perl are not
                        #                       failsafe
 
                        # print("immodpg, setVincrement, same Vincrement NADA\n");
                }
 
        }
        else {
        print("immodpg, setVincrement, missing value\n");
        }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
                _set_option($changeVtop_opt);
                _set_change($yes);
 
                #                       print("immodpg, setVtop,option:$changeVtop_opt\n");
                #                       print("immodpg, setVtop, V=$immodpg->{_Vtop_current}\n");
 
        }
        else {
 
                #                       negative cases are reset by fortran program
                #                       and so eliminate need to read locked files
                #                       while use of locked files helps most of the time
                #                       creation and deletion of locked files in perl are not
                #                       failsafe
 
                #                                       print("immodpg, setVtop, same Vtop NADA\n");
        }
 
}
else {
        print("immodpg, setVtop, _Vtop value missing\n");
        print("immodpg, setVtop, Vtop=$immodpg->{_Vtop}\n");
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
                        _setVtop_lower_layer( $immodpg->{_Vtop_lower_layer_current} );
                        _set_option($Vtop_lower_layer_opt);
                        _set_change($yes);
 
                 #      print("immodpg, setVtop_lower_layer,option:$Vtop_lower_layer_opt\n");
 
                }
                else {
 
                        #                       negative cases are reset by fortran program
                        #                       and so eliminate need to read locked files
                        #                       while use of locked files helps most of the time
                        #                       creation and deletion of locked files in perl are not
                        #                       failsafe
 
                #                       print("immodpg, setVtop_lower_layer, same Vtop_lower_layer NADA\n");
                }
 
        }
        else {
                ("immodpg, setVtop_lower_layer, missing widget\n");
        }
}

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
                                # for fortran program to read
                                _set_option($VbotNtop_minus_opt);
                                _set_change($yes);
 
#                               print("immodpg, setVbotNtop_minus, VbotNtop_minus_opt:$VbotNtop_minus_opt \n");
 
                        }
                        else {
 
                                #       negative cases are reset by fortran program
                                #       and so eliminate need to read locked files
                                #       while use of locked files helps most of the time
                                #       creation and deletion of locked files in perl are not
                                #       failsafe
                                #
                                #                               print("immodpg, setVbotNtop_minus, same VbotNtop NADA\n");
                        }
 
                }
                else {
                        print("immodpg, setVbotNtop_minus, VbotNtop value missing\n");
                }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
                                # for fortran program to read
                                _set_option($VbotNtop_plus_opt);
                                _set_change($yes);
 
#                                       print("immodpg, setVbotNtop_plus, VbotNtop_plus_opt:$VbotNtop_plus_opt \n");
 
                        }
                        else {
 
                                #       negative cases are reset by fortran program
                                #       and so eliminate need to read locked files
                                #       while use of locked files helps most of the time
                                #       creation and deletion of locked files in perl are not
                                #       failsafe
                                #
                                #                               print("immodpg, setVbotNtop_plus, same VbotNtop NADA\n");
                        }
 
                }
                else {
                        print("immodpg, setVbotNtop_plus, VbotNtop value missing\n");
                }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
                                _set_option($thickness_m_minus_opt);
                                _set_change($yes);
 
#                                                               print("immodpg, set_thickness_m_minus,option:$thickness_m_minus_opt\n");
#                                                               print("immodpg, set_thickness_m_minus, V=$immodpg->{_thickness_m_current}\n");
 
                        }
                        else {
 
                        #       negative cases are reset by fortran program
                        #       and so eliminate need to read locked files
                        #       while use of locked files helps most of the time
                        #       creation and deletion of locked files in perl are not
                        #       failsafe
                        #
                        #       print("immodpg, set_thickness_m_minus, same _thickness_m NADA\n");
                        }
 
                }
                else {
                        print(
                                "immodpg, set_thickness_m_minus, _thickness_m value missing\n");

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
#       print("immodpg, set_thickness_m_plus,option:$_thickness_m_plus_opt\n");
# print("immodpg, set_thickness_m_plus, dz=$immodpg->{_thickness_m_current}\n");
 
                        }
                        else {
 
#                               print("immodpg, set_thickness_m_plus, _thickness_mEntry=$immodpg->{_thickness_mEntry}\n");
#                               print("immodpg, set_thickness_m_plus, thickness_increment_m=$immodpg->{_thickness_increment_m}\n");
 
                         #      negative cases are reset by fortran program
                         #      and so eliminate need to read locked files
                         #      while use of locked files helps most of the time
                         #      creation and deletion of locked files in perl are not
                         #      failsafe
                         #
                         #      print("immodpg, set_thickness_m_plus, same _thickness_m NADA\n");
                        }
 
                }
                else {
                        print(
                                "immodpg, set_thickness_m_plus, _thickness_m value missing\n");

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $change = $immodpg->{_change_file};
 
                my $test            = $yes;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $change;
                my $outbound_locked = $outbound . '_locked';
                my $format          = $var_immodpg->{_format_string};
 
                my $count      = 0;
                my $max_counts = $var_immodpg->{_loop_limit};
                for (
                        my $i = 0 ;
                        ( $test eq $yes ) and ( $count < $max_counts ) ;
                        $i++
                  )
                {
 
                        #                       print("1. immodpg,set_change, in loop count=$count \n");
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
 
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                 # print("immodpg, set_change, outbound_locked=$outbound_locked\n");
                 # print("immodpg, set_change, IMMODPG_INVISIBLE=$IMMODPG_INVISIBLE\n");
                 # print("immodpg, set_change, created empty locked file=$X[0]\n");
 
                 # print("immodpg, set_change, outbound=$outbound\n");
                 # print("immodpg, set_change, IMMODPG_INVISIBLE=$IMMODPG_INVISIBLE\n");
 
                                # do not overwrite a waiting change (= yes)
                                my $response_aref = $files->read_1col_aref( \$outbound );
                                my $ans           = @{$response_aref}[0];
 
                                if ( $ans eq $yes ) {
 
                                  # do not overwrite a waiting change (= yes)
                                  # print("2. immodpg, set_change, SKIP\n");
                                  # print("immodpg, set_change,do not overwrite change_file\n");
 
                                        unlink($outbound_locked);
 
                                }
                                elsif ( $ans eq $no ) {
 
                                        # overwrite change_file(=no) with no or yes
                                        $X[0] = $yes_or_no;
                                        $files->write_1col_aref( \@X, \$outbound, \$format );
 
                 #                                      print("immodpg, set_change, overwrite change file with $X[0]\n");
 
                                        unlink($outbound_locked);
 
                                        # print("3. immodpg, set_change, delete locked file\n");
                                        # print("4. immodpg, set_change, yes_or_no=$X[0]\n");
 
                                        $test = $no;
 
                                }
                                else {
                                        print("immodpg, set_change, unexpected result \n");
                                }    # test change_file's content
 
                        }
                        else {
 
                                # print("immodpg,_set_change, locked change file\n");
                                $count++;    # governor on finding an unlocked change_file
                        }    # if unlocked file is missing and change_file is free
 
                        $count++;    # governor on checking for a change_file = yes
                }    # for
 
        }
        else {
                print("immodpg, set_change, missing values\n");
        }
        return ();

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
=head2 Define local
variables
 
=cut           
 
                my @X;
                my $option_file = $immodpg->{_option_file};
 
                my $test            = $no;
                my $outbound        = $IMMODPG_INVISIBLE . '/' . $option_file;
                my $outbound_locked = $outbound . '_locked';
 
                for ( my $i = 0 ; $test eq $no ; $i++ ) {
 
                        if ( not( $files->does_file_exist( \$outbound_locked ) ) ) {
                                 
                                my $format = $var_immodpg->{_format_string};
                                $X[0] = $empty_string;
                                $files->write_1col_aref( \@X, \$outbound_locked, \$format );
 
                                $X[0] = $option;
                                $format = $var_immodpg->{_format_integer};
 
#                               print("immodpg,set_option,option=$option\n");
                                $files->write_1col_aref( \@X, \$outbound, \$format );
 
                                unlink($outbound_locked);
 
                                $test = $yes;
                        }    # if
                }    # for
 
        }
        elsif ( $immodpg->{_is_option_changed} eq $no ) {
 
                # NADA
        }

lib/App/SeismicUnixGui/big_streams/immodpg.pm  view on Meta::CPAN

7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
           # print("immodpg, set_thickness_m, thickness_m is changed: $yes \n");
 
                _set_thickness_m( $immodpg->{_thickness_m_current} );
                _set_option($change_thickness_m_opt);
                _set_change($yes);
 
        }
        else {
 
                #                       negative cases are reset by fortran program
                #                       and so eliminate need to read locked files
                #                       while use of locked files helps most of the time
                #                       creation and deletion of locked files in perl are not
                #                       failsafe
 
                # print("immodpg, set_thickness_m, same thickness_m NADA\n");
        }
 
}
else {
        print("immodpg, set_thickness_m, _thickness_m value missing\n");
        print(
                "immodpg, set_thickness_m, thickness_m=$immodpg->{_thickness_m}\n");

lib/App/SeismicUnixGui/big_streams/immodpg_global_constants.pm  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
 
use Moose;
our $VERSION = '0.0.1';
 
=head private hash
similar names as the variables in immodpg.for
in the DICTIONARY ~ line 55
and also in moveNzoom.for
 
loop_limit:     for searching for a locked_file
 
=cut
 
my @format;
 
$format[0] =  '%-35s%1s%-20s';
$format[1] =  '%-35s%1s%-20s';
$format[2] =  '%-35s%1s%-20s';
$format[3] =  '%-35s%1s%-20s';
$format[4] =  '%-35s%1s%-20s';

lib/App/SeismicUnixGui/fortran/src/readVbotNtop_factor_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      subroutine readVbotNtop_factor_file(result,inbound)
         implicit none
!       read a VbotNtop_factor file
 
      real*4              :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30)  :: format1
      integer :: err_msg, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1=  "(F7.1)"
!      create a temporary, new, lock file
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
        if (ready.eq.0) then
         open(unit=31,file=trim(inbound),status='old',iostat=err_msg)
 
!       check whether file opens data file
         if (err_msg.eq.0) then
 
           read (31,format1) result
!          print *, 'readVbotNtop_factor_file.f, result',result
          close (unit=31)
 
         else
!         print *, 'readVbotNtop_factor_file.f, err_msg=',err_msg
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
       else
         print *, 'readVbotNtop_factor_file.f,locked, try again,read =',ready
         go to 10
       end if
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
         print *, 'readVbotNtop_factor_file.f, err_messg=',err_msg
        end if
!       print *, 'readVbotNtop_factor_file, result',result

lib/App/SeismicUnixGui/fortran/src/readVbot_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      subroutine readVbot_file(result,inbound)
         implicit none
!       read a configuration file
 
      real*4      :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30) :: format1
      integer :: err_msg, ready
       
      inbound_locked=trim(inbound)//"_locked"
      format1=  "(F7.1)"
 
!      print *, 'readVbot_file.f, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
!      create a temporary, new, lock file
 
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
       if (ready.eq.0) then
      open(unit=29,file=trim(inbound),status='old',iostat=err_msg)
 !    +   iostat=err_msgr)
      
 !       check whether file opens data file
         if (err_msg.eq.0) then
 
          read (29,format1) result
!          print *, 'readVbot_file.f, result',result
          close (unit=29)
 
         else
          print *, 'readVbot_file.f,locked, try again,read =',ready
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
 
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
         print *, 'readVbot_file.f, err_messg=',err_msg

lib/App/SeismicUnixGui/fortran/src/readVbot_upper_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      subroutine readVbot_upper_file(result,inbound)
         implicit none
!       read a configuration file
 
      real*4      :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30) :: format1
      integer :: err_msg, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1=  "(F7.1)"
 
!      print *, 'readVbot_upper_file.f, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
!      create a temporary, new, lock file
 
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
       if (ready.eq.0) then
         open(unit=29,file=trim(inbound),status='old',iostat=err_msg)
       
 !       check whether file opens data file
         if (err_msg.eq.0) then
 
!          print *, 'readVbot_upper_file.f'
          read (29,format1) result
!          print *, 'readVbot_upper_file.f, result',result
          close (unit=29)
 
         else
          print *,'readVbot_upper_file.f,locked, try again,read =',ready
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
 
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
         print *, 'readVbot_upper_file.f, err_messg=',err_msg

lib/App/SeismicUnixGui/fortran/src/readVincrement_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      subroutine readVincrement_file(result,inbound)
         implicit none
!       read a Vincrement file
 
      real*4              :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30)  :: format1
      integer :: err_msg, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1= "(F5.1)"
!      create a temporary, new, lock file
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
        if (ready.eq.0) then
         open(unit=31,file=trim(inbound),status='old',iostat=err_msg)
 
!       check whether file opens data file
         if (err_msg.eq.0) then
 
           read (31,format1) result
          print *, 'readVincrement_file.f, result',result
          close (unit=31)
 
         else
!         print *, 'readVincrement_file.f, err_msg=',err_msg
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
       else
         print *, 'readVincrement_file.f,locked, try again,read =',ready
         go to 10
       end if
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
         print *, 'readVincrement_file.f, err_messg=',err_msg
        end if
!       print *, 'readVincrement_file, result',result

lib/App/SeismicUnixGui/fortran/src/readVtop_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
      subroutine readVtop_file(result,inbound)
         implicit none
!       read a configuration file
 
      real*4          :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30)  :: format1
      integer             :: err_msg, counter, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1=  "(F7.1)"
 
!      print *, 'readVtop_file, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
 
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
        if (ready.eq.0) then
        open(unit=31,file=trim(inbound),status='old',iostat=err_msg)
 
!       check whether file opens data file
         if (err_msg.eq.0) then
 
           read (31,format1) result
!          print *, 'readVtop_file.f, result',result
           close (unit=31)
 
         else
          print *, 'readVtop_file.f, err_msg=',err_msg
          print *, 'readVtop_file.f, counter=',counter
!         rest a little before trying again
          call sleep(1)
          go to 10
         end if
       else
         print *, 'readVtop_file.f, locked, try again,read =',ready
         go to 10
       end if
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
         print *, 'readVtop_file.f, err_messg=',err_msg
        end if
!       print *, 'readVtop_file.f, result',result

lib/App/SeismicUnixGui/fortran/src/readVtop_lower_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      subroutine readVtop_lower_file(result,inbound)
         implicit none
!       read a configuration file
 
      real*4 :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30) :: format1
      integer :: err_msg, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1=  "(F7.1)"
 
!      print *, 'readVtop_lower_file.f, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
!      create a temporary, new, lock file
 
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
       if (ready.eq.0) then
       open(unit=31,file=trim(inbound),status='old',iostat=err_msg)
 
 !       check whether file opens data file
         if (err_msg.eq.0) then
 
!          print *, 'readVtop_lower_file.f'
          read (31,format1) result
!          print *, 'readVtop_lower_file.f, result',result
          close (unit=31)
 
         else
!          print *,'readVtop_lower_file.f,locked, try again,read =',ready
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
 
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
!         print *, 'readVtop_lower_file.f, err_messg=',err_msg

lib/App/SeismicUnixGui/fortran/src/read_bin_data.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
      subroutine read_bin_data(inbound_bin,ntrmax,nsmax,ntr,ns,Amp)
        implicit none
         
!       read_bin_data reads a fortran-style binary seismic image
 
       character (len=300) :: inbound_bin, inbound, inbound_locked
       integer*4      :: ntrmax,nsmax,ntr,ns,k,i
       real*4         :: Amp(ntrmax,nsmax)
       integer        :: err_msg, counter, ready
 
!      trim end and adjustl start of empty spaces
       inbound=trim(adjustl(inbound_bin))
!       print *, 'read_bin_data, inbound_bin is:',inbound,'--'
!       print *, 'read_bin_data, next line:'
       inbound_locked=trim(inbound_bin)//"_locked"
!      print *, 'read_bin_data, inbound_locked is:',trim(inbound_locked),&
 
!      create a temporary, new, lock file
10     open(status='new',unit=31,file=inbound_locked,iostat=ready)
 
       if (ready.eq.0) then
        
 20      open(UNIT=21,FILE=inbound_bin,STATUS='OLD',IOSTAT=err_msg, &
         FORM='UNFORMATTED')
         counter = counter +1
!        =0 normal completion, not an error
!        print *, 'L26.read_bin_data.f, err_msg=',err_msg
          
!        check whether file opens data file
         if (err_msg.eq.0) then
!          print *, 'L30.read_bin_data.f,unlocked, err_msg=',err_msg
! read by columns: k         
          k=1    
120        read (unit=21) (Amp(k,i), i=1,ns)
 
!           i=1
!           do
!             print*,'k,i,ntr,ns,Amp(k,i)',k,i,ntr,ns,Amp(k,i)
!             i = i+1
!             if(i.GE.ns) go to 50
!           enddo

lib/App/SeismicUnixGui/fortran/src/read_bin_data.f  view on Meta::CPAN

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
         else
          print *, 'read_bin_data.f, err_msg=',err_msg
          print *,'L53 read_bin_data.f, can not open bin file=',counter
 
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
         
       else
!        print *, 'L61. read_bin_data.f,locked, try again,ready=',ready
!        print *, '3.read_bin_data.f, err_messg=',err_msg
         go to 10
       end if
        
!      remove lock file
11     close (status='delete',unit=31,iostat=err_msg)
!          print *, '4.read_bin_data.f, err_messg=',err_msg
 
       if (err_msg.ne.0) then
       

lib/App/SeismicUnixGui/fortran/src/read_clip_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
      subroutine read_clip_file(result,inbound)
         implicit none
!       read a configuration file
 
      real*4              :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30)  :: format1
      integer             :: err_msg, counter, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1= "(F5.1)"
 
!      print *, 'read_clip_file, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
 
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
        if (ready.eq.0) then
         open(unit=31,file=trim(inbound),status='old',iostat=err_msg)
 
!       check whether file opens data file
         if (err_msg.eq.0) then
 
           read (31,format1) result
!           print *, 'read_clip_file.f, result',result
           close (unit=31)
 
         else
          print *, 'read_clip_file.f, err_msg=',err_msg
!          print *, 'read_clip_file.f, counter=',counter
!         rest a little before trying again
          call sleep(1)
          go to 10
         end if
       else
!         print *, 'read_clip_file.f, locked, try again,read =',ready
         go to 10
       end if
!       remove lock file
11      close (status='delete',unit=30,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
!         print *, 'read_clip_file.f, err_messg=',err_msg
        end if
!       print *, 'read_clip_file, result',result

lib/App/SeismicUnixGui/fortran/src/read_immodpg_config.f  view on Meta::CPAN

6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
      character (len=80) :: name, answer
      character (len=30) :: format0,format1,format2,format3
      character (len=30) :: format4,format5,format6
      character (len=30) :: format7,format8,format9
      character (len=30) :: format10,format11,format12,format13
      character (len=30) :: format14,format15,format16,format17
      character (len=30) :: format18,format19
      character (len=5)  :: equal,previous_model,new_model
      character (len=5)  :: pre_digitized_XT_pairs,data_traces
      character (len=40) :: base_file
      character (len=255):: inbound, inbound_locked
      real               :: min_t_s,max_t_s,min_x_m,max_x_m
      real               :: thickness_increment_m
      real               :: data_x_inc_m,source_depth_m,receiver_depth_m
      real               :: reducing_vel_mps,plot_min_x_m,plot_max_x_m
      real               :: plot_min_t_s,plot_max_t_s,VtopNbot_factor
      real               :: Vincrement_mps, clip, m2km
      real*4             :: results(30)
      integer*2          :: layer
      integer            :: err_msg, counter, ready
       
!     in case definition in main is slightly different
!     pre_digitized_XT_pairs = 'no'
!     data_traces = 'no'
!     previous_model = 'no'
!     new_model = 'no'
!     sum of first two character strings= 35
      inbound_locked=trim(inbound)//"_locked"
      format0= "(A14,21X,A1,1X,A)"
      format1= "(A22,13X,A1,1X,A)"
      format2= "(A11,24X,A1,1X,A)"
      format3= "(A4,31X,A1,1X,F5.1)"
      format4= "(A7,28X,A1,1X,F10.3)"
      format5= "(A7,28X,A1,1X,F10.3)"
      format6= "(A13,22X,A1,1X,F10.3)"
      format7= "(A14,21X,A1,1X,F10.3)"
      format8= "(A16,19X,A1,1X,F10.3)"
      format9= format8

lib/App/SeismicUnixGui/fortran/src/read_immodpg_config.f  view on Meta::CPAN

49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
      format15= "(A9,26X,A1,1X,A)"
      format16= "(A5,30X,A1,1X,I2)"
      format17= "(A15,20X,A1,1X,F10.3)"
      format18= "(A14,21X,A1,1X,F10.3)"
      format19= "(A21,14X,A1,1X,F10.3)"
      m2km = .001;
 
!      print*, 'read_immodpg_config.f, inbound is:', trim(inbound)
 
!      create a temporary, new, lock file
10     open(status='new',unit=2,file=inbound_locked,iostat=ready)
 
       if (ready.eq.0) then
 
        open(unit=1,file=trim(inbound),status='old',iostat=err_msg)
 
!       check whether file opens data file
        if (err_msg.eq.0) then
 
         read (1,format0) name,equal,base_file
         base_file = trim(base_file)

lib/App/SeismicUnixGui/fortran/src/read_immodpg_config.f  view on Meta::CPAN

178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
!      end if
 
         else
!         print *, 'read_immodpg_file.f, err_msg=',err_msg
!         print *, 'read_immodpg_file.f, counter=',counter
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
       else
        print *, 'read_immodpg_config.f,locked,try again,ready=',ready
!         go to 10
       end if
!       remove lock file
11      close (status='delete',unit=2,iostat=err_msg)
        if (err_msg.ne.0) then
         go to 11
         print *, 'read_immodpg_file.f, err_messg=',err_msg
        end if
!       print *, 'read_immodpg_file, result',result

lib/App/SeismicUnixGui/fortran/src/read_layer_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
      subroutine read_layer_file(result,inbound)
         implicit none
!       read a configuration file
 
      integer :: result
      character (len=255) :: inbound, inbound_locked
      character (len=30) :: format1
      integer :: err_message, ready
 
      inbound_locked=trim(inbound)//"_locked"
      format1= "(I2)"
 
!      print *, 'read_layer_file.f, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
!      create a temporary, new, lock file
10     open(status='new',unit=30,file=inbound_locked,iostat=ready)
 
       if (ready.eq.0) then
         open(unit=29,file=trim(inbound),status='old',iostat=err_message)
 !       check whether file opens data file
         if (err_message.eq.0) then
 
          read (29,format1) result
!          print *, 'read_layer_file.f, result',result
          close (unit=29)
 
         else
          print *, 'read_layer_file.f,,locked, try again,read =',ready
!         rest a little before trying again
!         call sleep(1)
          go to 10
         end if
 
!       remove lock file
11      close (status='delete',unit=30,iostat=err_message)
        if (err_message.ne.0) then
         go to 11
         print *, 'read_layer_file.f, err_messg=',err_message

lib/App/SeismicUnixGui/fortran/src/read_option_file.f  view on Meta::CPAN

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
      subroutine read_option_file(result,inbound)
         implicit none
 
!       read option file with an integer number
 
      character (len=30) :: format1
      character (len=255) :: inbound, inbound_locked
      integer :: err_message, counter, ready
      integer :: result
 
      inbound_locked=trim(inbound)//"_locked"
      format1= "(I3)"
 
!      print *, 'read_option_file, inbound is:', trim(inbound)
!      in case inbound is of a different, but shorter length in main
!      inbound=inbound
 
!      open(unit=28,file=trim(inbound),status='old')
!       read (28,format1) result
!!       print *, 'read_option_file, result',result
!       close (unit=28)
 
!      create a temporary, new, lock file
10     open(status='new',unit=28,file=inbound_locked,iostat=ready)
!       print *, 'read_option_file.f,inbound_locked iostat:',ready
!       if (ready.eq.17) print *, 'locked, try again'
       if (ready.eq.0) then
        open(unit=29,file=trim(inbound),status='old',iostat=err_message)
!        counter = counter +1
 
!       check whether file opens data file
        if (err_message.eq.0) then
 
          read (29,format1) result
 
!        print *, 'read_option_file.f, result',result

lib/App/SeismicUnixGui/fortran/src/read_option_file.f  view on Meta::CPAN

38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
        else
!         print *, 'read_option_file.f, err_message=',err_message
!         print *, 'read_option_file.f, counter=',counter
 
!         rest a little before trying again
!         call sleep(1)
         go to 10
        end if
       else
!         print *, 'read_option_file.f,locked, try again,read =',ready
         go to 10
       end if
!       remove lock file
11      close (status='delete',unit=28,iostat=err_message)
        if (err_message.ne.0) then
         go to 11
!         print *, 'read_option_file.f, err_messg=',err_message
        end if
 
      end subroutine read_option_file



( run in 0.561 second using v1.01-cache-2.11-cpan-26ccb49234f )