view release on metacpan or search on metacpan
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412=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
2452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485=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
252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557=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
2597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630=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
{
(
"immodpg, _setVbotNtop_multiply, unexpected answer\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
26652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699=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
3024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057=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
(
"immodpg, _setVtop, no change\n"
);
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128=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
3170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254=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
{
(
"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
{
(
"immodpg, _set_change, missing values\n"
);
}
return
();
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
3285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318=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
335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389=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
3429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462variables
=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
3503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536=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
38043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841=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
5041504250435044504550465047504850495050505150525053505450555056505750585059506050615062
_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
{
(
"immodpg, setVbot_minus, Vbot value missing\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
5116511751185119512051215122512351245125512651275128512951305131513251335134513551365137
# 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
{
(
"immodpg, setVbot_plus, Vbot value missing\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
5189519051915192519351945195519651975198519952005201520252035204520552065207520852095210
_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
#
(
"immodpg, setVtop_minus, same Vtop NADA\n"
);
}
}
else
{
(
"immodpg, setVtop_minus, Vtop value missing\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
52725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294
# 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
{
(
"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
53205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351
$immodpg
->{_note} =
$immodpg
->{_note} .
' cdp='
.
$immodpg
->{_cdp};
$immodpg
->{_Step} =
$immodpg
->{_Step} .
' cdp='
.
$immodpg
->{_cdp};
}
else
{
(
"immodpg, cdp, missing cdp,\n"
);
}
}
=head2 sub clean_trash
delete remaining locked files
reset default files as well
=cut
sub
clean_trash {
my
(
$self
) =
@_
;
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
535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423# 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
58535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875
# 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
59305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952
_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
60236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045
_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
{
(
"immodpg, setVbotNVtop_lower_layer_minus, Vbot or Vtop_lower_layer value missing\n"
);
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
61266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148
_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
{
(
"immodpg, setVbotNVtop_lower_layer_plus, Vbot or Vtop_lower_layer value missing\n"
);
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
62386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260
_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
63466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368
_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
6418641964206421642264236424642564266427642864296430643164326433643464356436643764386439# 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
{
(
"immodpg, setVincrement, missing value\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
64826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504
_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
{
(
"immodpg, setVtop, _Vtop value missing\n"
);
(
"immodpg, setVtop, Vtop=$immodpg->{_Vtop}\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
65496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571
_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
6733673467356736673767386739674067416742674367446745674667476748674967506751675267536754
# 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
{
(
"immodpg, setVbotNtop_minus, VbotNtop value missing\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
6822682368246825682668276828682968306831683268336834683568366837683868396840684168426843
# 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
{
(
"immodpg, setVbotNtop_plus, VbotNtop value missing\n"
);
}
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
7230723172327233723472357236723772387239724072417242724372447245724672477248724972507251
_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
{
(
"immodpg, set_thickness_m_minus, _thickness_m value missing\n"
);
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
7314731573167317731873197320732173227323732473257326732773287329733073317332733373347335# 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
{
(
"immodpg, set_thickness_m_plus, _thickness_m value missing\n"
);
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
747574767477747874797480748174827483748474857486748774887489749074917492749374947495749674977498749975007501750275037504750575067507750875097510751175127513751475157516751775187519752075217522752375247525752675277528752975307531753275337534753575367537753875397540754175427543754475457546754775487549755075517552755375547555755675577558=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
{
(
"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
{
(
"immodpg, set_change, missing values\n"
);
}
return
();
lib/App/SeismicUnixGui/big_streams/immodpg.pm view on Meta::CPAN
7625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661=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
77407741774277437744774577467747774877497750775177527753775477557756775777587759776077617762
# 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
{
(
"immodpg, set_thickness_m, _thickness_m value missing\n"
);
(
"immodpg, set_thickness_m, thickness_m=$immodpg->{_thickness_m}\n"
);
lib/App/SeismicUnixGui/big_streams/immodpg_global_constants.pm view on Meta::CPAN
123456789101112131415161718192021use
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
1234567891011121314151617181920212223242526272829303132333435363738394041
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
!
*,
'readVbotNtop_factor_file.f, result'
,result
close
(unit=31)
else
!
*,
'readVbotNtop_factor_file.f, err_msg='
,err_msg
! rest a little
before
trying again
! call
sleep
(1)
go to 10
end
if
else
*,
'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
*,
'readVbotNtop_factor_file.f, err_messg='
,err_msg
end
if
!
*,
'readVbotNtop_factor_file, result'
,result
lib/App/SeismicUnixGui/fortran/src/readVbot_file.f view on Meta::CPAN
1234567891011121314151617181920212223242526272829303132333435363738394041
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)"
!
*,
'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
!
*,
'readVbot_file.f, result'
,result
close
(unit=29)
else
*,
'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
*,
'readVbot_file.f, err_messg='
,err_msg
lib/App/SeismicUnixGui/fortran/src/readVbot_upper_file.f view on Meta::CPAN
1234567891011121314151617181920212223242526272829303132333435363738394041
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)"
!
*,
'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
!
*,
'readVbot_upper_file.f'
read
(29,format1) result
!
*,
'readVbot_upper_file.f, result'
,result
close
(unit=29)
else
*,
'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
*,
'readVbot_upper_file.f, err_messg='
,err_msg
lib/App/SeismicUnixGui/fortran/src/readVincrement_file.f view on Meta::CPAN
1234567891011121314151617181920212223242526272829303132333435363738394041
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
*,
'readVincrement_file.f, result'
,result
close
(unit=31)
else
!
*,
'readVincrement_file.f, err_msg='
,err_msg
! rest a little
before
trying again
! call
sleep
(1)
go to 10
end
if
else
*,
'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
*,
'readVincrement_file.f, err_messg='
,err_msg
end
if
!
*,
'readVincrement_file, result'
,result
lib/App/SeismicUnixGui/fortran/src/readVtop_file.f view on Meta::CPAN
123456789101112131415161718192021222324252627282930313233343536373839404142434445
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)"
!
*,
'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
!
*,
'readVtop_file.f, result'
,result
close
(unit=31)
else
*,
'readVtop_file.f, err_msg='
,err_msg
*,
'readVtop_file.f, counter='
,counter
! rest a little
before
trying again
call
sleep
(1)
go to 10
end
if
else
*,
'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
*,
'readVtop_file.f, err_messg='
,err_msg
end
if
!
*,
'readVtop_file.f, result'
,result
lib/App/SeismicUnixGui/fortran/src/readVtop_lower_file.f view on Meta::CPAN
1234567891011121314151617181920212223242526272829303132333435363738394041
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)"
!
*,
'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
!
*,
'readVtop_lower_file.f'
read
(31,format1) result
!
*,
'readVtop_lower_file.f, result'
,result
close
(unit=31)
else
!
*,
'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
!
*,
'readVtop_lower_file.f, err_messg='
,err_msg
lib/App/SeismicUnixGui/fortran/src/read_bin_data.f view on Meta::CPAN
1234567891011121314151617181920212223242526272829303132333435363738394041
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))
!
*,
'read_bin_data, inbound_bin is:'
,inbound,
'--'
!
*,
'read_bin_data, next line:'
inbound_locked=trim(inbound_bin)//
"_locked"
!
*,
'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
!
*,
'L26.read_bin_data.f, err_msg='
,err_msg
! check whether file opens data file
if
(err_msg.eq.0) then
!
*,
'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
!
*,
'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
484950515253545556575859606162636465666768
else
*,
'read_bin_data.f, err_msg='
,err_msg
*,
'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
!
*,
'L61. read_bin_data.f,locked, try again,ready='
,ready
!
*,
'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)
!
*,
'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
123456789101112131415161718192021222324252627282930313233343536373839404142434445
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)"
!
*,
'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
!
*,
'read_clip_file.f, result'
,result
close
(unit=31)
else
*,
'read_clip_file.f, err_msg='
,err_msg
!
*,
'read_clip_file.f, counter='
,counter
! rest a little
before
trying again
call
sleep
(1)
go to 10
end
if
else
!
*,
'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
!
*,
'read_clip_file.f, err_messg='
,err_msg
end
if
!
*,
'read_clip_file, result'
,result
lib/App/SeismicUnixGui/fortran/src/read_immodpg_config.f view on Meta::CPAN
678910111213141516171819202122232425262728293031323334353637383940414243
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
495051525354555657585960616263646566676869
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;
!
*,
'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
178179180181182183184185186187188189190191192193194195196197! end
if
else
!
*,
'read_immodpg_file.f, err_msg='
,err_msg
!
*,
'read_immodpg_file.f, counter='
,counter
! rest a little
before
trying again
! call
sleep
(1)
go to 10
end
if
else
*,
'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
*,
'read_immodpg_file.f, err_messg='
,err_msg
end
if
!
*,
'read_immodpg_file, result'
,result
lib/App/SeismicUnixGui/fortran/src/read_layer_file.f view on Meta::CPAN
1234567891011121314151617181920212223242526272829303132333435363738
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)"
!
*,
'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
!
*,
'read_layer_file.f, result'
,result
close
(unit=29)
else
*,
'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
*,
'read_layer_file.f, err_messg='
,err_message
lib/App/SeismicUnixGui/fortran/src/read_option_file.f view on Meta::CPAN
123456789101112131415161718192021222324252627282930313233343536
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)"
!
*,
'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
!!
*,
'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)
!
*,
'read_option_file.f,inbound_locked iostat:'
,ready
!
if
(ready.eq.17)
*,
'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
!
*,
'read_option_file.f, result'
,result
lib/App/SeismicUnixGui/fortran/src/read_option_file.f view on Meta::CPAN
383940414243444546474849505152535455565758
else
!
*,
'read_option_file.f, err_message='
,err_message
!
*,
'read_option_file.f, counter='
,counter
! rest a little
before
trying again
! call
sleep
(1)
go to 10
end
if
else
!
*,
'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
!
*,
'read_option_file.f, err_messg='
,err_message
end
if
end subroutine read_option_file