# History file 'sal-inv1.h' to fit the SEG/EAGE 3-D Salt Model by a smooth
# 3-D model.
# =====================================================================

# Input files required
 #chk.pl: "data/sal/"  "sal-m1.dat"
 #chk.pl: "model/"     "sob22.dat"
 #chk.pl: "forms/"     "inv.cal"
 #chk.pl: "forms/"     "sqrt.cal"
 #chk.pl: "forms/"     "addsob.cal"
# Output of 'sal-vel.h'
 #chk.pl: ""           "s-sa825.out"

# Initial model
# ~~~~~~~~~~~~~
  MODEL='sal-m1.dat'  MODIN='sal-m1.dat'

# Form of the files with matrices
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  FORMM='formatted'
  FORMM='unformatted'

# Inversion of velocities
# ~~~~~~~~~~~~~~~~~~~~~~~
  ICLASS=2
  NEGPAR=1

# Data grid
  N1=28   N2=28   N3=9
  D1=500  D2=500  D3=500
  O1=0    O2=0    O3=0

  N1=23   N2=23   N3=11
  D1=600  D2=600  D3=400
  O1=300  O2=300

  N1=14   N2=14   N3=21
  D1=1000 D2=1000 D3=200
  O1=250  O2=250

  N1=18   N2=18   N3=17
  D1=800  D2=800  D3=250
  O1=-50  O2=-50  O3=0


# Calculating matrices for inversion
  M1='m1.out'  M2='m2.out'
  SOBOLEV='sob22.dat'  MODSOB='modsob.out'  SOBW01=1
  invsoft:
                       MODSOB=              SOBW01=
  GM1='gm1.out'  GM2='gm2.out'  GM3=' '  DM1='dm1.out'
  GRD='s-sa500.out'  INDFUN=1 MPAR=1 POWERM=-1 ERRMUL=84.   # 7056 points
  GRD='s-sa640.out'  INDFUN=1 MPAR=1 POWERM=-1 ERRMUL=76.28 # 5819 points
  GRD='s-sa000.out'  INDFUN=1 MPAR=1 POWERM=-1 ERRMUL=64.16 # 4116 points
  GRD='s-sa825.out'  INDFUN=1 MPAR=1 POWERM=-1 ERRMUL=74.22 # 5508 points
  invpts:
  GRD=                INDFUN=  MPAR=  POWERM=   ERRMUL=

# Matrix operations
  N1=0  N2=1  N3=1  M1='m2.out'
  CAL='inv.cal' GRD1='dm1.out' GRD2='dm2.out'
  grdcal:
  M1='m1.out'  M2='m2.out'  GM1='gm1.out'  DM1='dm2.out'  SM1='sm1.out'
  gmdmgmt:
  N1=0  N2=0  N3=1  M1='m1.out' M2='m1.out'
  CAL='addsob.cal'  GRD1='sm1.out'  GRD2='modsob.out'  GRD3='sm2.out'
  SOBMUL=50000 0 200000 100000 25000 0 300000 500000  222000 400000 650000
  grdcal:
  SOBMUL=
  M1='m1.out'               SM1='sm2.out'  SM2='sm3.out'
  sminv:
  M1='m2.out'  M2=' '       DM1='dm2.out'  GM1='gm2.out'  GM2='gm3.out'
  dmgm:
  M1='m1.out'  M2='m2.out'  GM1='gm1.out'  GM2='gm3.out'  GM3='gm4.out'
  gmgm:
  M1='m1.out'  M2=' '       SM1='sm3.out'  GM1='gm4.out'  GM2='gm5.out'
  smgm:

# Updating the model
  M1='m1.out'  MODNEW='gm5.out'
  MODOUT='sal-m1.out'
  modmod:

#  Sobolev norm of the slowness in the updated model
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  M1='m1.out'  M2=' '  SM1='modsob.out' GM1='gm5.out'  GM2='gm6.out'
  smgm:
  M1=' '  M2='m1.out'  GM1='gm5.out'  GM2='gm6.out'  GM3='gm7.out'
  gmgm:
  N1=0  N2=1  N3=1  M1=' '
  CAL='sqrt.cal' GRD1='gm7.out' GRD2='sal-sns.out' FORMMW='formatted'
  grdcal:

# List of output files
# ~~~~~~~~~~~~~~~~~~~~
# 'sal-m1.out' ... Inverted smooth SEG/EAGE 3-D Salt Model.
# 'sal-sns.out' ...Sobolev norm of the slowness in the model.
