« lib/App/SeismicUnixGui/sunix/model/sukdsyn2d.pm
↑ Summary
lib/App/SeismicUnixGui/sunix/plot/elaps.pm »
| 1 | package App::SeismicUnixGui::sunix::model::suremac2d; | ||
| 2 | |||
| 3 | =head2 SYNOPSIS | ||
| 4 | |||
| 5 | PERL PROGRAM NAME: | ||
| 6 | |||
| 7 | AUTHOR: Juan Lorenzo (Perl module only) | ||
| 8 | |||
| 9 | DATE: | ||
| 10 | |||
| 11 | DESCRIPTION: | ||
| 12 | |||
| 13 | Version: | ||
| 14 | |||
| 15 | =head2 USE | ||
| 16 | |||
| 17 | =head3 NOTES | ||
| 18 | |||
| 19 | =head4 Examples | ||
| 20 | |||
| 21 | =head2 SYNOPSIS | ||
| 22 | |||
| 23 | =head3 SEISMIC UNIX NOTES | ||
| 24 | SUREMAC2D - Acoustic 2D Fourier method modeling with high accuracy | ||
| 25 | |||
| 26 | Rapid Expansion Method (REM) time integration | ||
| 27 | |||
| 28 | |||
| 29 | |||
| 30 | suremac2d [parameters] | ||
| 31 | |||
| 32 | |||
| 33 | |||
| 34 | Required parameters: | ||
| 35 | |||
| 36 | |||
| 37 | |||
| 38 | opflag= 0: variable density wave equation | ||
| 39 | |||
| 40 | 1: constant density wave equation | ||
| 41 | |||
| 42 | 2: non-reflecting wave equation | ||
| 43 | |||
| 44 | |||
| 45 | |||
| 46 | nx= number of grid points in horizontal direction | ||
| 47 | |||
| 48 | nz= number of grid points in vertical direction | ||
| 49 | |||
| 50 | nt= number of time samples | ||
| 51 | |||
| 52 | dx= spatial increment in horizontal direction | ||
| 53 | |||
| 54 | dz= spatial increment in vertical direction | ||
| 55 | |||
| 56 | dt= time sample interval in seconds | ||
| 57 | |||
| 58 | isx= grid point # of horizontal source positions | ||
| 59 | |||
| 60 | isz= grid point # of vertical source positions | ||
| 61 | |||
| 62 | |||
| 63 | |||
| 64 | Optional parameters: | ||
| 65 | |||
| 66 | fx=0.0 first horizontal coordinate | ||
| 67 | |||
| 68 | fz=0.0 first vertical coordinate | ||
| 69 | |||
| 70 | irx= horizontal grid point # of vertical receiver lines | ||
| 71 | |||
| 72 | irz= vertical grid point # of horizontal receiver lines | ||
| 73 | |||
| 74 | w=0.1 width of spatial source distribution (see notes) | ||
| 75 | |||
| 76 | sflag=2 source time function | ||
| 77 | |||
| 78 | 0: user supplied source function | ||
| 79 | |||
| 80 | 1: impulse (spike at t=0) | ||
| 81 | |||
| 82 | 2: Ricker wavelet | ||
| 83 | |||
| 84 | fmax= maximum frequency of Ricker (default) wavelet | ||
| 85 | |||
| 86 | amps=1.0 amplitudes of sources | ||
| 87 | |||
| 88 | prec=0 1: precompute Bessel coefficients b_k (see notes) | ||
| 89 | |||
| 90 | 2: use precomputed Bessel coefficients b_k | ||
| 91 | |||
| 92 | fsflag=0 1: perform run with free surface b.c. | ||
| 93 | |||
| 94 | vmaxu= user-defined maximum velocity | ||
| 95 | |||
| 96 | dtsnap=0.0 time interval in seconds of wave field snapshots | ||
| 97 | |||
| 98 | iabso=1 apply absorbing boundary conditions (0: none) | ||
| 99 | |||
| 100 | abso=0.1 damping parameter for absorbing boundaries | ||
| 101 | |||
| 102 | nbwx=20 horizontal width of absorbing boundary | ||
| 103 | |||
| 104 | nbwz=20 vertical width of absorbing boundary | ||
| 105 | |||
| 106 | verbose=0 1: show parameters used | ||
| 107 | |||
| 108 | 2: print maximum amplitude at every expansion term | ||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | velfile=vel velocity filename | ||
| 113 | |||
| 114 | densfile=dens density filename | ||
| 115 | |||
| 116 | sname=wavelet.su user supplied source time function filename | ||
| 117 | |||
| 118 | sepxname=sectx.su x-direction pressure sections filename | ||
| 119 | |||
| 120 | sepzname=sectz.su z-direction pressure sections filename | ||
| 121 | |||
| 122 | snpname=snap.su pressure snapshot filename | ||
| 123 | |||
| 124 | jpfile=stderr diagnostic output | ||
| 125 | |||
| 126 | m is bound | ||
| 127 | |||
| 128 | Notes: | ||
| 129 | |||
| 130 | 0. The combination of the Fourier method with REM time integration | ||
| 131 | |||
| 132 | allows the computation of synthetic seismograms which are free | ||
| 133 | |||
| 134 | of numerical grid dispersion. REM has no restriction on the | ||
| 135 | |||
| 136 | time step size dt. The Fourier method requires at least two | ||
| 137 | |||
| 138 | grid points per shortest wavelength. | ||
| 139 | |||
| 140 | 1. nx and nz must be valid numbers for pfafft transform lengths. | ||
| 141 | |||
| 142 | nx and nz must be odd numbers (unless opflag=1). For valid | ||
| 143 | |||
| 144 | numbers see e.g. numbers in structure 'nctab' in source file | ||
| 145 | |||
| 146 | $CWPROOT/src/cwp/lib/pfafft.c. | ||
| 147 | |||
| 148 | 2. Velocities (and densities) are stored as plain C style files | ||
| 149 | |||
| 150 | of floats where the fast dimension is along the z-direction. | ||
| 151 | |||
| 152 | 3. Units must be consistent, e.g. m, s and m/s. | ||
| 153 | |||
| 154 | 4. A 20 grid points wide border at the sides and the bottom of | ||
| 155 | |||
| 156 | the modeling grid is used for sponge boundary conditions | ||
| 157 | |||
| 158 | (default: iabso=1). | ||
| 159 | |||
| 160 | Source and receiver lines should be placed some (e.g. 10) grid | ||
| 161 | |||
| 162 | points away from the absorbing boundaries in order to reduce | ||
| 163 | |||
| 164 | reflections due to obliquely incident wavefronts. | ||
| 165 | |||
| 166 | 5. Dominant frequency is about fmax/2 (sflag=2), absolute maximum | ||
| 167 | |||
| 168 | is delayed by 3/fmax from beginning of wavelet. | ||
| 169 | |||
| 170 | 6. If opflag!=1 the source should be not a spike in space; the | ||
| 171 | |||
| 172 | parameter w determines at which distance (in grid points) from | ||
| 173 | |||
| 174 | the source's center the Gaussian weight decays to 10 percent | ||
| 175 | |||
| 176 | of its maximum. w=2 may be a reasonable choice; however, the | ||
| 177 | |||
| 178 | waveform will be distorted. | ||
| 179 | |||
| 180 | 7. Horizontal and vertical receiver line sections are written to | ||
| 181 | |||
| 182 | separate files. Each file can hold more than one line. | ||
| 183 | |||
| 184 | 8. Parameter vmaxu may be enlarged if the modeling run becomes | ||
| 185 | |||
| 186 | unstable. This happens if the largest eigenvalue of the modeling | ||
| 187 | |||
| 188 | operator L is larger than estimated from the largest velocity. | ||
| 189 | |||
| 190 | In particular if using the variable density acoustic wave | ||
| 191 | |||
| 192 | equation the eigenvalues depend also on the density and it is | ||
| 193 | |||
| 194 | impossible to estimated the largest eigenvalue analytically. | ||
| 195 | |||
| 196 | 9. Bessel coefficients can be precomputed (prec=1) and stored on | ||
| 197 | |||
| 198 | disk to save CPU time when several shots need to be run. | ||
| 199 | |||
| 200 | In this case computation of Bessel coefficients can be skipped | ||
| 201 | |||
| 202 | and read from disk file for reuse (prec=2). | ||
| 203 | |||
| 204 | For reuse of Bessel coefficients the user may need to define | ||
| 205 | |||
| 206 | the overall maximum velocity (vmaxu). | ||
| 207 | |||
| 208 | 10. If snapshots are not required, a spike source (sflag=1) may be | ||
| 209 | |||
| 210 | applied and the resulting impulse response seismograms can be | ||
| 211 | |||
| 212 | convolved later with a desired wavelet. | ||
| 213 | |||
| 214 | 11. The free surface (fsflag=1) does not coincide with the first | ||
| 215 | |||
| 216 | vertical grid index (0). It appears to be half a grid spacing | ||
| 217 | |||
| 218 | above that position. | ||
| 219 | |||
| 220 | |||
| 221 | |||
| 222 | =head2 User's notes (Juan Lorenzo) | ||
| 223 | untested | ||
| 224 | |||
| 225 | =cut | ||
| 226 | |||
| 227 | |||
| 228 | =head2 CHANGES and their DATES | ||
| 229 | |||
| 230 | =cut | ||
| 231 | |||
| 232 | use Moose; | ||
| 233 | our $VERSION = '0.0.1'; | ||
| 234 | |||
| 235 | |||
| 236 | =head2 Import packages | ||
| 237 | |||
| 238 | =cut | ||
| 239 | |||
| 240 | use aliased 'App::SeismicUnixGui::misc::L_SU_global_constants'; | ||
| 241 | |||
| 242 | use App::SeismicUnixGui::misc::SeismicUnix qw($in $out $on $go $to $suffix_ascii $off $suffix_su $suffix_bin); | ||
| 243 | use aliased 'App::SeismicUnixGui::configs::big_streams::Project_config'; | ||
| 244 | |||
| 245 | |||
| 246 | =head2 instantiation of packages | ||
| 247 | |||
| 248 | =cut | ||
| 249 | |||
| 250 | my $get = L_SU_global_constants->new(); | ||
| 251 | my $Project = Project_config->new(); | ||
| 252 | my $DATA_SEISMIC_SU = $Project->DATA_SEISMIC_SU(); | ||
| 253 | my $DATA_SEISMIC_BIN = $Project->DATA_SEISMIC_BIN(); | ||
| 254 | my $DATA_SEISMIC_TXT = $Project->DATA_SEISMIC_TXT(); | ||
| 255 | |||
| 256 | my $var = $get->var(); | ||
| 257 | my $on = $var->{_on}; | ||
| 258 | my $off = $var->{_off}; | ||
| 259 | my $true = $var->{_true}; | ||
| 260 | my $false = $var->{_false}; | ||
| 261 | my $empty_string = $var->{_empty_string}; | ||
| 262 | |||
| 263 | =head2 Encapsulated | ||
| 264 | hash of private variables | ||
| 265 | |||
| 266 | =cut | ||
| 267 | |||
| 268 | my $suremac2d = { | ||
| 269 | _abso => '', | ||
| 270 | _amps => '', | ||
| 271 | _densfile => '', | ||
| 272 | _dt => '', | ||
| 273 | _dtsnap => '', | ||
| 274 | _dx => '', | ||
| 275 | _dz => '', | ||
| 276 | _fmax => '', | ||
| 277 | _fsflag => '', | ||
| 278 | _fx => '', | ||
| 279 | _fz => '', | ||
| 280 | _iabso => '', | ||
| 281 | _irx => '', | ||
| 282 | _irz => '', | ||
| 283 | _isx => '', | ||
| 284 | _isz => '', | ||
| 285 | _jpfile => '', | ||
| 286 | _nbwx => '', | ||
| 287 | _nbwz => '', | ||
| 288 | _nt => '', | ||
| 289 | _nx => '', | ||
| 290 | _nz => '', | ||
| 291 | _opflag => '', | ||
| 292 | _prec => '', | ||
| 293 | _sepxname => '', | ||
| 294 | _sepzname => '', | ||
| 295 | _sflag => '', | ||
| 296 | _sname => '', | ||
| 297 | _snpname => '', | ||
| 298 | _t => '', | ||
| 299 | _velfile => '', | ||
| 300 | _verbose => '', | ||
| 301 | _vmaxu => '', | ||
| 302 | _w => '', | ||
| 303 | _Step => '', | ||
| 304 | _note => '', | ||
| 305 | |||
| 306 | }; | ||
| 307 | |||
| 308 | =head2 sub Step | ||
| 309 | |||
| 310 | collects switches and assembles bash instructions | ||
| 311 | by adding the program name | ||
| 312 | |||
| 313 | =cut | ||
| 314 | |||
| 315 | sub Step { | ||
| 316 | |||
| 317 | $suremac2d->{_Step} = 'suremac2d'.$suremac2d->{_Step}; | ||
| 318 | return ( $suremac2d->{_Step} ); | ||
| 319 | |||
| 320 | } | ||
| 321 | |||
| 322 | |||
| 323 | =head2 sub note | ||
| 324 | |||
| 325 | collects switches and assembles bash instructions | ||
| 326 | by adding the program name | ||
| 327 | |||
| 328 | =cut | ||
| 329 | |||
| 330 | sub note { | ||
| 331 | |||
| 332 | $suremac2d->{_note} = 'suremac2d'.$suremac2d->{_note}; | ||
| 333 | return ( $suremac2d->{_note} ); | ||
| 334 | |||
| 335 | } | ||
| 336 | |||
| 337 | |||
| 338 | |||
| 339 | =head2 sub clear | ||
| 340 | |||
| 341 | =cut | ||
| 342 | |||
| 343 | sub clear { | ||
| 344 | |||
| 345 | $suremac2d->{_abso} = ''; | ||
| 346 | $suremac2d->{_amps} = ''; | ||
| 347 | $suremac2d->{_densfile} = ''; | ||
| 348 | $suremac2d->{_dt} = ''; | ||
| 349 | $suremac2d->{_dtsnap} = ''; | ||
| 350 | $suremac2d->{_dx} = ''; | ||
| 351 | $suremac2d->{_dz} = ''; | ||
| 352 | $suremac2d->{_fmax} = ''; | ||
| 353 | $suremac2d->{_fsflag} = ''; | ||
| 354 | $suremac2d->{_fx} = ''; | ||
| 355 | $suremac2d->{_fz} = ''; | ||
| 356 | $suremac2d->{_iabso} = ''; | ||
| 357 | $suremac2d->{_irx} = ''; | ||
| 358 | $suremac2d->{_irz} = ''; | ||
| 359 | $suremac2d->{_isx} = ''; | ||
| 360 | $suremac2d->{_isz} = ''; | ||
| 361 | $suremac2d->{_jpfile} = ''; | ||
| 362 | $suremac2d->{_nbwx} = ''; | ||
| 363 | $suremac2d->{_nbwz} = ''; | ||
| 364 | $suremac2d->{_nt} = ''; | ||
| 365 | $suremac2d->{_nx} = ''; | ||
| 366 | $suremac2d->{_nz} = ''; | ||
| 367 | $suremac2d->{_opflag} = ''; | ||
| 368 | $suremac2d->{_prec} = ''; | ||
| 369 | $suremac2d->{_sepxname} = ''; | ||
| 370 | $suremac2d->{_sepzname} = ''; | ||
| 371 | $suremac2d->{_sflag} = ''; | ||
| 372 | $suremac2d->{_sname} = ''; | ||
| 373 | $suremac2d->{_snpname} = ''; | ||
| 374 | $suremac2d->{_t} = ''; | ||
| 375 | $suremac2d->{_velfile} = ''; | ||
| 376 | $suremac2d->{_verbose} = ''; | ||
| 377 | $suremac2d->{_vmaxu} = ''; | ||
| 378 | $suremac2d->{_w} = ''; | ||
| 379 | $suremac2d->{_Step} = ''; | ||
| 380 | $suremac2d->{_note} = ''; | ||
| 381 | } | ||
| 382 | |||
| 383 | |||
| 384 | =head2 sub abso | ||
| 385 | |||
| 386 | |||
| 387 | =cut | ||
| 388 | |||
| 389 | sub abso { | ||
| 390 | |||
| 391 | my ( $self,$abso ) = @_; | ||
| 392 | if ( $abso ne $empty_string ) { | ||
| 393 | |||
| 394 | $suremac2d->{_abso} = $abso; | ||
| 395 | $suremac2d->{_note} = $suremac2d->{_note}.' abso='.$suremac2d->{_abso}; | ||
| 396 | $suremac2d->{_Step} = $suremac2d->{_Step}.' abso='.$suremac2d->{_abso}; | ||
| 397 | |||
| 398 | } else { | ||
| 399 | print("suremac2d, abso, missing abso,\n"); | ||
| 400 | } | ||
| 401 | } | ||
| 402 | |||
| 403 | |||
| 404 | =head2 sub amps | ||
| 405 | |||
| 406 | |||
| 407 | =cut | ||
| 408 | |||
| 409 | sub amps { | ||
| 410 | |||
| 411 | my ( $self,$amps ) = @_; | ||
| 412 | if ( $amps ne $empty_string ) { | ||
| 413 | |||
| 414 | $suremac2d->{_amps} = $amps; | ||
| 415 | $suremac2d->{_note} = $suremac2d->{_note}.' amps='.$suremac2d->{_amps}; | ||
| 416 | $suremac2d->{_Step} = $suremac2d->{_Step}.' amps='.$suremac2d->{_amps}; | ||
| 417 | |||
| 418 | } else { | ||
| 419 | print("suremac2d, amps, missing amps,\n"); | ||
| 420 | } | ||
| 421 | } | ||
| 422 | |||
| 423 | |||
| 424 | =head2 sub densfile | ||
| 425 | |||
| 426 | |||
| 427 | =cut | ||
| 428 | |||
| 429 | sub densfile { | ||
| 430 | |||
| 431 | my ( $self,$densfile ) = @_; | ||
| 432 | if ( $densfile ne $empty_string ) { | ||
| 433 | |||
| 434 | $suremac2d->{_densfile} = $densfile; | ||
| 435 | $suremac2d->{_note} = $suremac2d->{_note}.' densfile='.$suremac2d->{_densfile}; | ||
| 436 | $suremac2d->{_Step} = $suremac2d->{_Step}.' densfile='.$suremac2d->{_densfile}; | ||
| 437 | |||
| 438 | } else { | ||
| 439 | print("suremac2d, densfile, missing densfile,\n"); | ||
| 440 | } | ||
| 441 | } | ||
| 442 | |||
| 443 | |||
| 444 | =head2 sub dt | ||
| 445 | |||
| 446 | |||
| 447 | =cut | ||
| 448 | |||
| 449 | sub dt { | ||
| 450 | |||
| 451 | my ( $self,$dt ) = @_; | ||
| 452 | if ( $dt ne $empty_string ) { | ||
| 453 | |||
| 454 | $suremac2d->{_dt} = $dt; | ||
| 455 | $suremac2d->{_note} = $suremac2d->{_note}.' dt='.$suremac2d->{_dt}; | ||
| 456 | $suremac2d->{_Step} = $suremac2d->{_Step}.' dt='.$suremac2d->{_dt}; | ||
| 457 | |||
| 458 | } else { | ||
| 459 | print("suremac2d, dt, missing dt,\n"); | ||
| 460 | } | ||
| 461 | } | ||
| 462 | |||
| 463 | |||
| 464 | =head2 sub dtsnap | ||
| 465 | |||
| 466 | |||
| 467 | =cut | ||
| 468 | |||
| 469 | sub dtsnap { | ||
| 470 | |||
| 471 | my ( $self,$dtsnap ) = @_; | ||
| 472 | if ( $dtsnap ne $empty_string ) { | ||
| 473 | |||
| 474 | $suremac2d->{_dtsnap} = $dtsnap; | ||
| 475 | $suremac2d->{_note} = $suremac2d->{_note}.' dtsnap='.$suremac2d->{_dtsnap}; | ||
| 476 | $suremac2d->{_Step} = $suremac2d->{_Step}.' dtsnap='.$suremac2d->{_dtsnap}; | ||
| 477 | |||
| 478 | } else { | ||
| 479 | print("suremac2d, dtsnap, missing dtsnap,\n"); | ||
| 480 | } | ||
| 481 | } | ||
| 482 | |||
| 483 | |||
| 484 | =head2 sub dx | ||
| 485 | |||
| 486 | |||
| 487 | =cut | ||
| 488 | |||
| 489 | sub dx { | ||
| 490 | |||
| 491 | my ( $self,$dx ) = @_; | ||
| 492 | if ( $dx ne $empty_string ) { | ||
| 493 | |||
| 494 | $suremac2d->{_dx} = $dx; | ||
| 495 | $suremac2d->{_note} = $suremac2d->{_note}.' dx='.$suremac2d->{_dx}; | ||
| 496 | $suremac2d->{_Step} = $suremac2d->{_Step}.' dx='.$suremac2d->{_dx}; | ||
| 497 | |||
| 498 | } else { | ||
| 499 | print("suremac2d, dx, missing dx,\n"); | ||
| 500 | } | ||
| 501 | } | ||
| 502 | |||
| 503 | |||
| 504 | =head2 sub dz | ||
| 505 | |||
| 506 | |||
| 507 | =cut | ||
| 508 | |||
| 509 | sub dz { | ||
| 510 | |||
| 511 | my ( $self,$dz ) = @_; | ||
| 512 | if ( $dz ne $empty_string ) { | ||
| 513 | |||
| 514 | $suremac2d->{_dz} = $dz; | ||
| 515 | $suremac2d->{_note} = $suremac2d->{_note}.' dz='.$suremac2d->{_dz}; | ||
| 516 | $suremac2d->{_Step} = $suremac2d->{_Step}.' dz='.$suremac2d->{_dz}; | ||
| 517 | |||
| 518 | } else { | ||
| 519 | print("suremac2d, dz, missing dz,\n"); | ||
| 520 | } | ||
| 521 | } | ||
| 522 | |||
| 523 | |||
| 524 | =head2 sub fmax | ||
| 525 | |||
| 526 | |||
| 527 | =cut | ||
| 528 | |||
| 529 | sub fmax { | ||
| 530 | |||
| 531 | my ( $self,$fmax ) = @_; | ||
| 532 | if ( $fmax ne $empty_string ) { | ||
| 533 | |||
| 534 | $suremac2d->{_fmax} = $fmax; | ||
| 535 | $suremac2d->{_note} = $suremac2d->{_note}.' fmax='.$suremac2d->{_fmax}; | ||
| 536 | $suremac2d->{_Step} = $suremac2d->{_Step}.' fmax='.$suremac2d->{_fmax}; | ||
| 537 | |||
| 538 | } else { | ||
| 539 | print("suremac2d, fmax, missing fmax,\n"); | ||
| 540 | } | ||
| 541 | } | ||
| 542 | |||
| 543 | |||
| 544 | =head2 sub fsflag | ||
| 545 | |||
| 546 | |||
| 547 | =cut | ||
| 548 | |||
| 549 | sub fsflag { | ||
| 550 | |||
| 551 | my ( $self,$fsflag ) = @_; | ||
| 552 | if ( $fsflag ne $empty_string ) { | ||
| 553 | |||
| 554 | $suremac2d->{_fsflag} = $fsflag; | ||
| 555 | $suremac2d->{_note} = $suremac2d->{_note}.' fsflag='.$suremac2d->{_fsflag}; | ||
| 556 | $suremac2d->{_Step} = $suremac2d->{_Step}.' fsflag='.$suremac2d->{_fsflag}; | ||
| 557 | |||
| 558 | } else { | ||
| 559 | print("suremac2d, fsflag, missing fsflag,\n"); | ||
| 560 | } | ||
| 561 | } | ||
| 562 | |||
| 563 | |||
| 564 | =head2 sub fx | ||
| 565 | |||
| 566 | |||
| 567 | =cut | ||
| 568 | |||
| 569 | sub fx { | ||
| 570 | |||
| 571 | my ( $self,$fx ) = @_; | ||
| 572 | if ( $fx ne $empty_string ) { | ||
| 573 | |||
| 574 | $suremac2d->{_fx} = $fx; | ||
| 575 | $suremac2d->{_note} = $suremac2d->{_note}.' fx='.$suremac2d->{_fx}; | ||
| 576 | $suremac2d->{_Step} = $suremac2d->{_Step}.' fx='.$suremac2d->{_fx}; | ||
| 577 | |||
| 578 | } else { | ||
| 579 | print("suremac2d, fx, missing fx,\n"); | ||
| 580 | } | ||
| 581 | } | ||
| 582 | |||
| 583 | |||
| 584 | =head2 sub fz | ||
| 585 | |||
| 586 | |||
| 587 | =cut | ||
| 588 | |||
| 589 | sub fz { | ||
| 590 | |||
| 591 | my ( $self,$fz ) = @_; | ||
| 592 | if ( $fz ne $empty_string ) { | ||
| 593 | |||
| 594 | $suremac2d->{_fz} = $fz; | ||
| 595 | $suremac2d->{_note} = $suremac2d->{_note}.' fz='.$suremac2d->{_fz}; | ||
| 596 | $suremac2d->{_Step} = $suremac2d->{_Step}.' fz='.$suremac2d->{_fz}; | ||
| 597 | |||
| 598 | } else { | ||
| 599 | print("suremac2d, fz, missing fz,\n"); | ||
| 600 | } | ||
| 601 | } | ||
| 602 | |||
| 603 | |||
| 604 | =head2 sub iabso | ||
| 605 | |||
| 606 | |||
| 607 | =cut | ||
| 608 | |||
| 609 | sub iabso { | ||
| 610 | |||
| 611 | my ( $self,$iabso ) = @_; | ||
| 612 | if ( $iabso ne $empty_string ) { | ||
| 613 | |||
| 614 | $suremac2d->{_iabso} = $iabso; | ||
| 615 | $suremac2d->{_note} = $suremac2d->{_note}.' iabso='.$suremac2d->{_iabso}; | ||
| 616 | $suremac2d->{_Step} = $suremac2d->{_Step}.' iabso='.$suremac2d->{_iabso}; | ||
| 617 | |||
| 618 | } else { | ||
| 619 | print("suremac2d, iabso, missing iabso,\n"); | ||
| 620 | } | ||
| 621 | } | ||
| 622 | |||
| 623 | |||
| 624 | =head2 sub irx | ||
| 625 | |||
| 626 | |||
| 627 | =cut | ||
| 628 | |||
| 629 | sub irx { | ||
| 630 | |||
| 631 | my ( $self,$irx ) = @_; | ||
| 632 | if ( $irx ne $empty_string ) { | ||
| 633 | |||
| 634 | $suremac2d->{_irx} = $irx; | ||
| 635 | $suremac2d->{_note} = $suremac2d->{_note}.' irx='.$suremac2d->{_irx}; | ||
| 636 | $suremac2d->{_Step} = $suremac2d->{_Step}.' irx='.$suremac2d->{_irx}; | ||
| 637 | |||
| 638 | } else { | ||
| 639 | print("suremac2d, irx, missing irx,\n"); | ||
| 640 | } | ||
| 641 | } | ||
| 642 | |||
| 643 | |||
| 644 | =head2 sub irz | ||
| 645 | |||
| 646 | |||
| 647 | =cut | ||
| 648 | |||
| 649 | sub irz { | ||
| 650 | |||
| 651 | my ( $self,$irz ) = @_; | ||
| 652 | if ( $irz ne $empty_string ) { | ||
| 653 | |||
| 654 | $suremac2d->{_irz} = $irz; | ||
| 655 | $suremac2d->{_note} = $suremac2d->{_note}.' irz='.$suremac2d->{_irz}; | ||
| 656 | $suremac2d->{_Step} = $suremac2d->{_Step}.' irz='.$suremac2d->{_irz}; | ||
| 657 | |||
| 658 | } else { | ||
| 659 | print("suremac2d, irz, missing irz,\n"); | ||
| 660 | } | ||
| 661 | } | ||
| 662 | |||
| 663 | |||
| 664 | =head2 sub isx | ||
| 665 | |||
| 666 | |||
| 667 | =cut | ||
| 668 | |||
| 669 | sub isx { | ||
| 670 | |||
| 671 | my ( $self,$isx ) = @_; | ||
| 672 | if ( $isx ne $empty_string ) { | ||
| 673 | |||
| 674 | $suremac2d->{_isx} = $isx; | ||
| 675 | $suremac2d->{_note} = $suremac2d->{_note}.' isx='.$suremac2d->{_isx}; | ||
| 676 | $suremac2d->{_Step} = $suremac2d->{_Step}.' isx='.$suremac2d->{_isx}; | ||
| 677 | |||
| 678 | } else { | ||
| 679 | print("suremac2d, isx, missing isx,\n"); | ||
| 680 | } | ||
| 681 | } | ||
| 682 | |||
| 683 | |||
| 684 | =head2 sub isz | ||
| 685 | |||
| 686 | |||
| 687 | =cut | ||
| 688 | |||
| 689 | sub isz { | ||
| 690 | |||
| 691 | my ( $self,$isz ) = @_; | ||
| 692 | if ( $isz ne $empty_string ) { | ||
| 693 | |||
| 694 | $suremac2d->{_isz} = $isz; | ||
| 695 | $suremac2d->{_note} = $suremac2d->{_note}.' isz='.$suremac2d->{_isz}; | ||
| 696 | $suremac2d->{_Step} = $suremac2d->{_Step}.' isz='.$suremac2d->{_isz}; | ||
| 697 | |||
| 698 | } else { | ||
| 699 | print("suremac2d, isz, missing isz,\n"); | ||
| 700 | } | ||
| 701 | } | ||
| 702 | |||
| 703 | |||
| 704 | =head2 sub jpfile | ||
| 705 | |||
| 706 | |||
| 707 | =cut | ||
| 708 | |||
| 709 | sub jpfile { | ||
| 710 | |||
| 711 | my ( $self,$jpfile ) = @_; | ||
| 712 | if ( $jpfile ne $empty_string ) { | ||
| 713 | |||
| 714 | $suremac2d->{_jpfile} = $jpfile; | ||
| 715 | $suremac2d->{_note} = $suremac2d->{_note}.' jpfile='.$suremac2d->{_jpfile}; | ||
| 716 | $suremac2d->{_Step} = $suremac2d->{_Step}.' jpfile='.$suremac2d->{_jpfile}; | ||
| 717 | |||
| 718 | } else { | ||
| 719 | print("suremac2d, jpfile, missing jpfile,\n"); | ||
| 720 | } | ||
| 721 | } | ||
| 722 | |||
| 723 | |||
| 724 | =head2 sub nbwx | ||
| 725 | |||
| 726 | |||
| 727 | =cut | ||
| 728 | |||
| 729 | sub nbwx { | ||
| 730 | |||
| 731 | my ( $self,$nbwx ) = @_; | ||
| 732 | if ( $nbwx ne $empty_string ) { | ||
| 733 | |||
| 734 | $suremac2d->{_nbwx} = $nbwx; | ||
| 735 | $suremac2d->{_note} = $suremac2d->{_note}.' nbwx='.$suremac2d->{_nbwx}; | ||
| 736 | $suremac2d->{_Step} = $suremac2d->{_Step}.' nbwx='.$suremac2d->{_nbwx}; | ||
| 737 | |||
| 738 | } else { | ||
| 739 | print("suremac2d, nbwx, missing nbwx,\n"); | ||
| 740 | } | ||
| 741 | } | ||
| 742 | |||
| 743 | |||
| 744 | =head2 sub nbwz | ||
| 745 | |||
| 746 | |||
| 747 | =cut | ||
| 748 | |||
| 749 | sub nbwz { | ||
| 750 | |||
| 751 | my ( $self,$nbwz ) = @_; | ||
| 752 | if ( $nbwz ne $empty_string ) { | ||
| 753 | |||
| 754 | $suremac2d->{_nbwz} = $nbwz; | ||
| 755 | $suremac2d->{_note} = $suremac2d->{_note}.' nbwz='.$suremac2d->{_nbwz}; | ||
| 756 | $suremac2d->{_Step} = $suremac2d->{_Step}.' nbwz='.$suremac2d->{_nbwz}; | ||
| 757 | |||
| 758 | } else { | ||
| 759 | print("suremac2d, nbwz, missing nbwz,\n"); | ||
| 760 | } | ||
| 761 | } | ||
| 762 | |||
| 763 | |||
| 764 | =head2 sub nt | ||
| 765 | |||
| 766 | |||
| 767 | =cut | ||
| 768 | |||
| 769 | sub nt { | ||
| 770 | |||
| 771 | my ( $self,$nt ) = @_; | ||
| 772 | if ( $nt ne $empty_string ) { | ||
| 773 | |||
| 774 | $suremac2d->{_nt} = $nt; | ||
| 775 | $suremac2d->{_note} = $suremac2d->{_note}.' nt='.$suremac2d->{_nt}; | ||
| 776 | $suremac2d->{_Step} = $suremac2d->{_Step}.' nt='.$suremac2d->{_nt}; | ||
| 777 | |||
| 778 | } else { | ||
| 779 | print("suremac2d, nt, missing nt,\n"); | ||
| 780 | } | ||
| 781 | } | ||
| 782 | |||
| 783 | |||
| 784 | =head2 sub nx | ||
| 785 | |||
| 786 | |||
| 787 | =cut | ||
| 788 | |||
| 789 | sub nx { | ||
| 790 | |||
| 791 | my ( $self,$nx ) = @_; | ||
| 792 | if ( $nx ne $empty_string ) { | ||
| 793 | |||
| 794 | $suremac2d->{_nx} = $nx; | ||
| 795 | $suremac2d->{_note} = $suremac2d->{_note}.' nx='.$suremac2d->{_nx}; | ||
| 796 | $suremac2d->{_Step} = $suremac2d->{_Step}.' nx='.$suremac2d->{_nx}; | ||
| 797 | |||
| 798 | } else { | ||
| 799 | print("suremac2d, nx, missing nx,\n"); | ||
| 800 | } | ||
| 801 | } | ||
| 802 | |||
| 803 | |||
| 804 | =head2 sub nz | ||
| 805 | |||
| 806 | |||
| 807 | =cut | ||
| 808 | |||
| 809 | sub nz { | ||
| 810 | |||
| 811 | my ( $self,$nz ) = @_; | ||
| 812 | if ( $nz ne $empty_string ) { | ||
| 813 | |||
| 814 | $suremac2d->{_nz} = $nz; | ||
| 815 | $suremac2d->{_note} = $suremac2d->{_note}.' nz='.$suremac2d->{_nz}; | ||
| 816 | $suremac2d->{_Step} = $suremac2d->{_Step}.' nz='.$suremac2d->{_nz}; | ||
| 817 | |||
| 818 | } else { | ||
| 819 | print("suremac2d, nz, missing nz,\n"); | ||
| 820 | } | ||
| 821 | } | ||
| 822 | |||
| 823 | |||
| 824 | =head2 sub opflag | ||
| 825 | |||
| 826 | |||
| 827 | =cut | ||
| 828 | |||
| 829 | sub opflag { | ||
| 830 | |||
| 831 | my ( $self,$opflag ) = @_; | ||
| 832 | if ( $opflag ne $empty_string ) { | ||
| 833 | |||
| 834 | $suremac2d->{_opflag} = $opflag; | ||
| 835 | $suremac2d->{_note} = $suremac2d->{_note}.' opflag='.$suremac2d->{_opflag}; | ||
| 836 | $suremac2d->{_Step} = $suremac2d->{_Step}.' opflag='.$suremac2d->{_opflag}; | ||
| 837 | |||
| 838 | } else { | ||
| 839 | print("suremac2d, opflag, missing opflag,\n"); | ||
| 840 | } | ||
| 841 | } | ||
| 842 | |||
| 843 | |||
| 844 | =head2 sub prec | ||
| 845 | |||
| 846 | |||
| 847 | =cut | ||
| 848 | |||
| 849 | sub prec { | ||
| 850 | |||
| 851 | my ( $self,$prec ) = @_; | ||
| 852 | if ( $prec ne $empty_string ) { | ||
| 853 | |||
| 854 | $suremac2d->{_prec} = $prec; | ||
| 855 | $suremac2d->{_note} = $suremac2d->{_note}.' prec='.$suremac2d->{_prec}; | ||
| 856 | $suremac2d->{_Step} = $suremac2d->{_Step}.' prec='.$suremac2d->{_prec}; | ||
| 857 | |||
| 858 | } else { | ||
| 859 | print("suremac2d, prec, missing prec,\n"); | ||
| 860 | } | ||
| 861 | } | ||
| 862 | |||
| 863 | |||
| 864 | =head2 sub sepxname | ||
| 865 | |||
| 866 | |||
| 867 | =cut | ||
| 868 | |||
| 869 | sub sepxname { | ||
| 870 | |||
| 871 | my ( $self,$sepxname ) = @_; | ||
| 872 | if ( $sepxname ne $empty_string ) { | ||
| 873 | |||
| 874 | $suremac2d->{_sepxname} = $sepxname; | ||
| 875 | $suremac2d->{_note} = $suremac2d->{_note}.' sepxname='.$suremac2d->{_sepxname}; | ||
| 876 | $suremac2d->{_Step} = $suremac2d->{_Step}.' sepxname='.$suremac2d->{_sepxname}; | ||
| 877 | |||
| 878 | } else { | ||
| 879 | print("suremac2d, sepxname, missing sepxname,\n"); | ||
| 880 | } | ||
| 881 | } | ||
| 882 | |||
| 883 | |||
| 884 | =head2 sub sepzname | ||
| 885 | |||
| 886 | |||
| 887 | =cut | ||
| 888 | |||
| 889 | sub sepzname { | ||
| 890 | |||
| 891 | my ( $self,$sepzname ) = @_; | ||
| 892 | if ( $sepzname ne $empty_string ) { | ||
| 893 | |||
| 894 | $suremac2d->{_sepzname} = $sepzname; | ||
| 895 | $suremac2d->{_note} = $suremac2d->{_note}.' sepzname='.$suremac2d->{_sepzname}; | ||
| 896 | $suremac2d->{_Step} = $suremac2d->{_Step}.' sepzname='.$suremac2d->{_sepzname}; | ||
| 897 | |||
| 898 | } else { | ||
| 899 | print("suremac2d, sepzname, missing sepzname,\n"); | ||
| 900 | } | ||
| 901 | } | ||
| 902 | |||
| 903 | |||
| 904 | =head2 sub sflag | ||
| 905 | |||
| 906 | |||
| 907 | =cut | ||
| 908 | |||
| 909 | sub sflag { | ||
| 910 | |||
| 911 | my ( $self,$sflag ) = @_; | ||
| 912 | if ( $sflag ne $empty_string ) { | ||
| 913 | |||
| 914 | $suremac2d->{_sflag} = $sflag; | ||
| 915 | $suremac2d->{_note} = $suremac2d->{_note}.' sflag='.$suremac2d->{_sflag}; | ||
| 916 | $suremac2d->{_Step} = $suremac2d->{_Step}.' sflag='.$suremac2d->{_sflag}; | ||
| 917 | |||
| 918 | } else { | ||
| 919 | print("suremac2d, sflag, missing sflag,\n"); | ||
| 920 | } | ||
| 921 | } | ||
| 922 | |||
| 923 | |||
| 924 | =head2 sub sname | ||
| 925 | |||
| 926 | |||
| 927 | =cut | ||
| 928 | |||
| 929 | sub sname { | ||
| 930 | |||
| 931 | my ( $self,$sname ) = @_; | ||
| 932 | if ( $sname ne $empty_string ) { | ||
| 933 | |||
| 934 | $suremac2d->{_sname} = $sname; | ||
| 935 | $suremac2d->{_note} = $suremac2d->{_note}.' sname='.$suremac2d->{_sname}; | ||
| 936 | $suremac2d->{_Step} = $suremac2d->{_Step}.' sname='.$suremac2d->{_sname}; | ||
| 937 | |||
| 938 | } else { | ||
| 939 | print("suremac2d, sname, missing sname,\n"); | ||
| 940 | } | ||
| 941 | } | ||
| 942 | |||
| 943 | |||
| 944 | =head2 sub snpname | ||
| 945 | |||
| 946 | |||
| 947 | =cut | ||
| 948 | |||
| 949 | sub snpname { | ||
| 950 | |||
| 951 | my ( $self,$snpname ) = @_; | ||
| 952 | if ( $snpname ne $empty_string ) { | ||
| 953 | |||
| 954 | $suremac2d->{_snpname} = $snpname; | ||
| 955 | $suremac2d->{_note} = $suremac2d->{_note}.' snpname='.$suremac2d->{_snpname}; | ||
| 956 | $suremac2d->{_Step} = $suremac2d->{_Step}.' snpname='.$suremac2d->{_snpname}; | ||
| 957 | |||
| 958 | } else { | ||
| 959 | print("suremac2d, snpname, missing snpname,\n"); | ||
| 960 | } | ||
| 961 | } | ||
| 962 | |||
| 963 | |||
| 964 | =head2 sub t | ||
| 965 | |||
| 966 | |||
| 967 | =cut | ||
| 968 | |||
| 969 | sub t { | ||
| 970 | |||
| 971 | my ( $self,$t ) = @_; | ||
| 972 | if ( $t ne $empty_string ) { | ||
| 973 | |||
| 974 | $suremac2d->{_t} = $t; | ||
| 975 | $suremac2d->{_note} = $suremac2d->{_note}.' t='.$suremac2d->{_t}; | ||
| 976 | $suremac2d->{_Step} = $suremac2d->{_Step}.' t='.$suremac2d->{_t}; | ||
| 977 | |||
| 978 | } else { | ||
| 979 | print("suremac2d, t, missing t,\n"); | ||
| 980 | } | ||
| 981 | } | ||
| 982 | |||
| 983 | |||
| 984 | =head2 sub velfile | ||
| 985 | |||
| 986 | |||
| 987 | =cut | ||
| 988 | |||
| 989 | sub velfile { | ||
| 990 | |||
| 991 | my ( $self,$velfile ) = @_; | ||
| 992 | if ( $velfile ne $empty_string ) { | ||
| 993 | |||
| 994 | $suremac2d->{_velfile} = $velfile; | ||
| 995 | $suremac2d->{_note} = $suremac2d->{_note}.' velfile='.$suremac2d->{_velfile}; | ||
| 996 | $suremac2d->{_Step} = $suremac2d->{_Step}.' velfile='.$suremac2d->{_velfile}; | ||
| 997 | |||
| 998 | } else { | ||
| 999 | print("suremac2d, velfile, missing velfile,\n"); | ||
| 1000 | } | ||
| 1001 | } | ||
| 1002 | |||
| 1003 | |||
| 1004 | =head2 sub verbose | ||
| 1005 | |||
| 1006 | |||
| 1007 | =cut | ||
| 1008 | |||
| 1009 | sub verbose { | ||
| 1010 | |||
| 1011 | my ( $self,$verbose ) = @_; | ||
| 1012 | if ( $verbose ne $empty_string ) { | ||
| 1013 | |||
| 1014 | $suremac2d->{_verbose} = $verbose; | ||
| 1015 | $suremac2d->{_note} = $suremac2d->{_note}.' verbose='.$suremac2d->{_verbose}; | ||
| 1016 | $suremac2d->{_Step} = $suremac2d->{_Step}.' verbose='.$suremac2d->{_verbose}; | ||
| 1017 | |||
| 1018 | } else { | ||
| 1019 | print("suremac2d, verbose, missing verbose,\n"); | ||
| 1020 | } | ||
| 1021 | } | ||
| 1022 | |||
| 1023 | |||
| 1024 | =head2 sub vmaxu | ||
| 1025 | |||
| 1026 | |||
| 1027 | =cut | ||
| 1028 | |||
| 1029 | sub vmaxu { | ||
| 1030 | |||
| 1031 | my ( $self,$vmaxu ) = @_; | ||
| 1032 | if ( $vmaxu ne $empty_string ) { | ||
| 1033 | |||
| 1034 | $suremac2d->{_vmaxu} = $vmaxu; | ||
| 1035 | $suremac2d->{_note} = $suremac2d->{_note}.' vmaxu='.$suremac2d->{_vmaxu}; | ||
| 1036 | $suremac2d->{_Step} = $suremac2d->{_Step}.' vmaxu='.$suremac2d->{_vmaxu}; | ||
| 1037 | |||
| 1038 | } else { | ||
| 1039 | print("suremac2d, vmaxu, missing vmaxu,\n"); | ||
| 1040 | } | ||
| 1041 | } | ||
| 1042 | |||
| 1043 | |||
| 1044 | =head2 sub w | ||
| 1045 | |||
| 1046 | |||
| 1047 | =cut | ||
| 1048 | |||
| 1049 | sub w { | ||
| 1050 | |||
| 1051 | my ( $self,$w ) = @_; | ||
| 1052 | if ( $w ne $empty_string ) { | ||
| 1053 | |||
| 1054 | $suremac2d->{_w} = $w; | ||
| 1055 | $suremac2d->{_note} = $suremac2d->{_note}.' w='.$suremac2d->{_w}; | ||
| 1056 | $suremac2d->{_Step} = $suremac2d->{_Step}.' w='.$suremac2d->{_w}; | ||
| 1057 | |||
| 1058 | } else { | ||
| 1059 | print("suremac2d, w, missing w,\n"); | ||
| 1060 | } | ||
| 1061 | } | ||
| 1062 | |||
| 1063 | |||
| 1064 | =head2 sub get_max_index | ||
| 1065 | |||
| 1066 | max index = number of input variables -1 | ||
| 1067 | |||
| 1068 | =cut | ||
| 1069 | |||
| 1070 | sub get_max_index { | ||
| 1071 | my ($self) = @_; | ||
| 1072 | my $max_index = 33; | ||
| 1073 | |||
| 1074 | return($max_index); | ||
| 1075 | } | ||
| 1076 | |||
| 1077 | |||
| 1078 | 1; |