XQX          NO-LINE_DELIMITER:XQX 
XQX          NO-RIGHT_DELIMITER:!! 
XQX          COUNTER_DELIMITER:|N|
XQX          ASK?FOR-OUTPUT-FILENAME           Replace "?" with "-"  to prompt for independent output file name
XQX
XQX  Excess commentary added  which is stripped by NOCOMMENT
XQX
XQX Data are read from NOCOMMENT input files as 2,048-character alphanumeric
XQX cards to facilitate the addition of comments within the model input files
XQX and the use of keys to identify input variables. All integer, real, and
XQX character variables are read from the alphanumeric cards. The cards are
XQX initially read by the subroutine NCREAD. Cards with a ‘#’ sign in the first
XQX column are treated as comment cards, are not passed to any other routines,
XQX and are discarded. Once NCREAD has acquired a valid data card, the card is
XQX checked for a ‘!’ sign. If a ‘!’ sign is detected, the ‘!’ sign and all text
XQX right of the ‘!’ sign are removed from the card before passing it to any
XQX other routines.
XQX
XQX I/O Redirection
XQX A NOCOMMENT filecan be subdivided into smaller files with I/O redirection.
XQX I/O can be redirected from the primary file to an auxiliary input file by
XQX inserting an I/O redirect statement at any location in the file. Multiple
XQX I/O redirect statements can be used in a file. I/O redirection can only
XQX occur from a primary NOCOMMENT file and not from an auxiliary input file.
XQX
XQX REDIRECT:Filename=The filename of the auxiliary input must follow the colon.
XQX The REDIRECT key switches the I/O from the primary file to the auxiliary
XQX file. All eight characters must be present.
XQX Sample input of an element of GROUP 1 data:
XQX #
XQX 
XQX 10 1.000 (6e13.5) -7
XQX Redirect to file:sem_bos.array     !!   I/O redirect occurs here
XQX Tag:VCON             Layer:1        0 1.000 (6e13.5) -7
XQX
XQX__________________________________________________________________
pcf
* control data
XQX RSTFLE      -- “restart” or “norestart”
XQX PESTMODE    -- “estimation”, “prediction” or “regularisation”
XQX RSTFLE PESTMODE                                                                  -- Variables
restart regularisation
XQX NPAR        -- integer, total number of parameters -- includes adjustable,fixed and tied parameters;
XQX NOBS        -- integer, total number of observations -- dummy observations are ignored.
XQX NPARGP      -- integer, number of parameter groups
XQX NPRIOR      -- integer, number of prior information articles, can be zero.
XQX NOBSGP      -- integer, number of observation groups, observation & prior information equations must have a group.
XQX NPAR NOBS NPARGP NPRIOR NOBSGP                                                   -- Variables
    |N| NPAR |N|   |N| NOBS |N|   1   |N| NPRIOR |N|   |N| NOBSGP |N|  
XQX     0051           0042     0001       0275             0004
XQX NTPLFLE     --integer, number of model input files with parameters and PEST templates.
XQX NINSFLE     --integer, number of instruction files for extracting simulated observations from model output.
XQX PRECIS      --character, options are “single” or “double”.
XQX DPOINT      --character, options are “point” or “nopoint”.  PEST omits decimal points if “nopoint”
XQX NUMCOM      --integer, set to 1 for normal operation  with model computed derivatives
XQX JACFILE     --integer, set to 0 for normal operation
XQX MESSFILE    --integer, set to 0 for normal operation
XQX NTPLFLE    NINSFLE          PRECIS       DPOINT NUMCOM JACFILE MESSFILE                            -- Variables
     0001  |N| NINSFLE |N|       single      point
XQX     0001     0003        single          point
XQX RLAMBDA1    -- real, Marquardt lambda --initial value of 1.0 to 10.0, bigger chokes parameter vector
XQX RLAMFAC     -- real, USE 2.0, Marquardt-lambda adjustment factor, >1.0
XQX PHIRATSUF   -- real, USE 0.3, fractional objective change is sufficient
XQX PHIREDLAM   -- real, USE 0.01, Constrains testing of Marquardt lambda, Small=Many Tests, Big=Few Tests
XQX NUMLAM      -- integer, USE 5-10,  upper limit lambda tests.
XQX RLAMBDA1 RLAMFAC PHIRATSUF PHIREDLAM NUMLAM                                      -- Variables
      10.0     2.0      0.3      0.03     10
XQX RELPARMAX   -- real, Use 5, maximum relative parameter change
XQX FACPARMAX   -- real, Use 5, maximum factor parameter change, must exceed 1.
XQX FACORIG     -- real, scales sensitvities if parameter value shrinks,  must >0.000. Use 0.001, Not used for log-transformed parameters
XQX RELPARMAX FACPARMAX FACORIG                                                      -- Variables
      10.0       10.0    0.001
XQX PHIREDSWH   -- real, USE 0.1, relative reduction of objective function between iterations to use central differences,
XQX PHIREDSWH                                                                        -- Variables
 0.1
XQX NOPTMAX     -- integer, maximum optimization iterations
XQX PHIREDSTP   -- real, USE 0.005, Relative change of objective near minimum
XQX NPHISTP     -- integer,USE 4, Number of optimization iterations where objective change < PHIREDSTP
XQX NPHINORED   -- integer,USE 3, Number of optimization iterations where objective does not decrease
XQX RELPARSTP   -- real, USE 0.01, Relative parameter change
XQX NRELPAR     -- integer, USE 3, Number of optimization iterations where parameter vector < RELPARSTP
XQX NOPTMAX PHIREDSTP NPHISTP NPHINORED RELPARSTP NRELPAR                            -- Variables
     3     0.01     3     3     0.01     3
XQX ICOV        -- integer, (1/0) will (write/not write) covariance to “matrix file”
XQX ICOR        -- integer, (1/0) will (write/not write) correlation coefficient to “matrix file”
XQX IEIGE       -- integer, (1/0) will (write/not write) eigenvectors and eigenvalues to “matrix file”
XQX ICOV ICOR IEIGE                                                                  -- Variables
     1     1    1
XQX_________________________________________________________________________
* parameter groups
XQX PARGPNME    -- character*12, parameter group name, dummy group “none” reserved for fixed and tied parameters
XQX INCTYP      -- character, “relative”, “absolute” or “rel_to_max” --  fraction of value, fixed, or fraction of max in group
XQX DERINC      -- real, USE 0.01, fractional change for perturbing parameters and computing derivatives.
XQX DERINCLB    -- real, Lower bound on parameter pertubation when using relative changes.
XQX FORCEN      -- character, “always_2”, “always_3” or “switch” -- forward, central, or converts to central when PHI reduction stalls.
XQX DERINCMUL   -- real, USE 1.0 to 2.0, multiplies pertubation length for center differencing
XQX DERMTHD     -- character,  “parabolic”, “best_fit” or “outside_pts” for center differencing (ie. three-point) method
XQX PARGPNME INCTYP   DERINC DERINCLB FORCEN   DERINCMUL DERMTHD                         -- Variables
HydK     relative  0.01      0.0  always_2    2.0    parabolic
XQX (one such line for each of the NPARGP parameter groups)
XQX
XQX
XQX_________________________________________________________________________
* parameter data
XQX  Using I/O redirection to parse long chunks to other files
XQX
   COUNTER_START:NPAR 
      Redirect input to file:02_Sample_PARAMS.txt
   COUNTER_STOP:NPAR 
XQX
XQX__  TIED PARAMETER SECTION _________________________________________________________________
XQX
XQX PARNME      -- character*12, previously defined parameter name -- ESTIMATED by PARTIED
XQX PARTIED     -- character*12, previously defined parameter name -- SUPPLIES ESTIMATE for PARNME
XQX PARNME PARTIED   (one such line for each tied parameter)                         -- Variables
XQX
XQX
XQX_________________________________________________________________________
* observation groups
XQX OBGNME      -- character*12, name of each observation group., case insensitive.
XQX                a “predict” or “regul” group must exist if predictive analysis or regulariZation modes are used
   COUNTER_START:NOBSGP
 regul_K
 DD_OBS
 Q_OBS
 TRAN_OBS
   COUNTER_STOP:NOBSGP
XQX OBGNME   (one such line for each observation group)                              -- Variables
XQX
XQX
XQX_________________________________________________________________________
* observation data
XQX_________________________________________________________________________
XQX
XQX  Using I/O redirection to parse long chunks to other files
XQX
   COUNTER_START:NOBS
       Redirect input to file:03_Sample_OBSERVE.txt
   COUNTER_STOP:NOBS
XQX
XQX_________________________________________________________________________
* model command line
XQX write the command which PEST must use to run the model
02_MF2K_W4-54-1200.bat
XQX_________________________________________________________________________
* model input/output
XQX TEMPFLE     -- character, PEST template file for creating model input.
XQX INFLE       -- character, Name of model input file to be created.
XQX TEMPFLE INFLE (one line per model input file containing parameters)              -- Variables
XQX
PEST_W4-54-1200.Hcond.tpl.txt      PEST_W4-54-1200.Hcond.irc.txt
XQX___________________________________________________________________
XQX
XQX INSFLE      -- character, PEST instruction file for extracting simulated values from model output.
XQX OUTFLE      -- character, Name of model output file to be read.
XQX INSFLE OUTFLE (one line per model output file containing observations)           -- Variables
XQX
   COUNTER_START:NINSFLE
Pcomp_W4-54-1200.WL.ins.txt     Pcomp_W4-54-1200.WLsimulated.txt
Pcomp_W4-54-1200.Q.ins.txt     Pcomp_W4-54-1200.Qsimulated.txt
Pcomp_W4-54-1200.T.ins.txt     OUTPUT_TRANSMISSIVITY.txt
   COUNTER_STOP:NINSFLE
XQX
XQX_________________________________________________________________________
XQX
XQX  Using I/O redirection to parse long chunks to other files
XQX___________PRIOR INFORMATION -- SUPPORTS REGULARIZATION _________________________________
* prior information
   COUNTER_START:NPRIOR
 Redirect input to file:04_Sample_REGULAR.txt
   COUNTER_STOP:NPRIOR
XQX
XQX_________________________________________________________________________
XQX  7.3.3 Control File - “Regularisation” Section
* regularisation
XQX
XQX PHIMLIM     -- Upper level of model-to-measurement misfit -- Real error level
XQX PHIMACCEPT  -- Should be 5-10% > PHIMLIM, gives PEST “room to move”
XQX FRACPHIM    -- Makes adjustable PHIMLIM = PhiMeas*FRACPHIM, USE 0.1 to 0.3, Ignored if <=0.
XQX PHIMLIM PHIMACCEPT FRACPHIM
   5.692   6.262   0.302
XQX
XQX WFINIT      -- Initial regularisation weight factor, adjusts total PHI emphasis between assumptions and measurements.
XQX WFMIN       -- Minimum regularisation weight factor, USE small, 1E-10.
XQX WFMAX       -- Maximum regularisation weight factor, USE big, 1E+10.
XQX LINREG      -- text “linreg” or “nonlinreg” informs PEST that all regularisation constraints are linear
XQX REGCONTINUE -- text “continue” or “nocontinue” instructs PEST to continue minimising 
XQX                regularisation objective function even if measurement objective function less than PHIMLIM
XQX WFINIT WFMIN WFMAX    LINREG   REGCONTINUE
   1.0000      1.00000E-10  1.00000E+10    linreg    continue
XQX
XQX WFFAC       -- Regularisation weight adjustment factor, USE 1.3
XQX WFTOL       -- Tolerance for equating subsequent weight factors, USE 0.01
XQX WFFAC WFTOL
   1.3 1.0e-2  1
