Step 20: Run an experiment with Shells

When Shells runs, it must connect to a number of input files (already existing) and output files (new filenames; to be created), as detailed in the table below.
The color-code in this table is that:
Orange identifies input files that are required in all cases, while
Yellow identifies input files that may be required in certain cases, and
Green indicates new output files that will (or may) be created.

Fortran device number (channel)

Type of input/output file to connect:

Sample file of this type: (most are located in folder /oldFTP/neotec/Shells/ Earth5/Earth5-049/ )

1
(or: iUnitG)

finite element grid (.feg) file [input]

Earth5R.feg

2
(or: iUnitB)

boundary conditions (.bcs) file

Earth5R-type4AplusA.bcs

3
(or: iUnitP)

parameter input (.in) file [input]

iEarth5-049.in

8
(or: iUnitC)

digitized plate outlines [input]

PB2002_plates.dig

9
(or: iUnitD)

digitized plate boundaries, with identification of the polarity of any subduction zones [input]

PB2002_boundaries.dig

11
(or: iUnitV)

approximate velocity solution (v_____.out) file (used for restarting iteration) [optional input]

vEarth5-049.out

12
(or: iUnitM)

special file describing lower-mantle flow; only required if parameter ICONVE in line 14 of the parameter input file is > 0 [potential input]

PB2002_plates.dig (if iConve = 3 or 4);
Baum887.dig (if iConve = 2);
HOC79ii.dig (if iConve = 1)

13
(or: iUnitR)

old torque- and force-balance report for each plate, produced by a previous run of Shells [potential input]

qEarth5-049.out [needed if iConve = 6]

14
(or: iUnitLR)

flat-file ASCII table of additional Lithospheric Rheologies (in addition to default rheology LR0), to match any LR#s > 0 that may appear in your .feg grid file [potential input]

[This feature is new with Shells_v5.0, and was not used in the Earth5-049 model.]

21
(or: iUnitT)

text output (t_____.out) file [output]

Earth5-049.log

22
(or: iUnitS)

nodal velocity (v_____.out) file [output]

vEarth5-049.out

23
(or: iUnotF)

reaction force (f_____.out) file [output]

fEarth5-049.out

24
(or: iUnotQ)

new torque- and force-balance report for each plate, produced by this run of Shells [output]

qEarth5-049.out

25
(or: iUnitI)

temporary file "iteration permit.txt" which can be deleted (mid-run) by the user in order to interrupt a long set of iterations without crashing Shells [output, then input]

[not shown]

 

There are (at least) two different ways of connecting these input and output files:

1. Interactive, real-time prompting method:

When Shells begins to run it will start by asking a question in the console window:
Enter a file name for the (new) output log file:
and you can answer with any new file-name you like (probably ending in _log.txt).

A moment later, it will prompt you again with:
Attempting to read finite element grid from unit  1
File name missing or blank - please enter file name
UNIT 1?
and this time you need to supply the name of an existing .feg file (available in the active folder),
such as Earth5R.feg in the example given above.

In this way, you can gradually specify the names of all the input and output files outlined by the table above.
However, there may be as many as 13 of these files, and this method is subject to error, and becomes tedious.

2. Collect your responses into an ASCII text file:

For repeated runs of Shells (particularly when you are only varying one parameter each time) you will probably want to automate your responses.
Use any simple ASCII text editor (such as NotePad, or EditPad Pro) to build (or modify) a list of your responses to all the prompts, such as (for example):

Earth5-049_log.txt              <= (NEW output text file from this run, Fortran unit 21)
Earth5R.feg                           <= (existing .feg grid file, Fortran unit 1)
iEarth5-049.in                      <= (existing parameter file, Fortran unit 3)
PB2002_plates.dig              <= (existing .dig file of plate-outlines, Fortran unit 8)
qEarth5-049.out                  <= (existing torque-report file from a previous iteration of the Shells model, when iConve = 6, Fortran unit 13)
X                                             <= (name of a NON-existent input file, instead of using an old vSomething.out file to initialize, Fortran unit 11)
Earth5R-type4AplusA.bcs  <= (existing input .bcs file with boundary conditions, Fortran unit 2)
PB2002_boundaries.dig     <= (existing .dig file of plate-boundaries, Fortran unit 9)
vEarth5-049.out                   <= (NEW output file with nodal velocities from this model, Fortran unit 22)
fEarth5-049.out                   <= (NEW output file with nodal forces from this model, Fortran unit 23)
qEarth5-049.out                   <= (NEW output file with torque-report from this model, Fortran unit 24)
                                            <= (include one extra CR/LF {using your “Enter” key} at the end of your file

Note that you should NOT type the comments like “<= (NEW …” into your file, or it won’t be read properly!

Save this file with a name specific to the particular Shells model, such as: Earth5-049_filenames.txt.

Then, you go the Windows command prompt, and enter:
Shells_v5.0-Win64par.exe   <   Earth5-049_filenames.txt
and the whole model should run without requiring any more input.
(Of course, substitute “32” for “64” if you have a 32-bit Windows computer, and substitute “seq” for “par” to run the sequential-execution version.)

You may wish to save this ___filenames.txt file (along with the output files, and extra copies of any input files that were modified to include variable parameter values) in a new folder, named to describe that particular run of Shells.  That will provide a record of exactly what job was run.


Shells should provide a table called "Iteration History" as part of its text output in the new _____log.txt file (Fortran device 21), and it should look something like this:

ITERATION HISTORY:
                                                               RELATIVE
                                          CORRE-     MAXIMUM       MEAN
                                 RELATIVE LATION  VERTICALLY VERTICALLY
                         MAXIMUM     MEAN   WITH  INTEGRATED INTEGRATED
 ITER-           RMS    VELOCITY VELOCITY   LAST      STRESS     STRESS
 ATION      VELOCITY      CHANGE   CHANGE CHANGE       ERR0R      ERR0R
 
     1  6.671025E-11  1.4950E-10 1.000000   ----  1.7092E+16    .993490
     2  6.304374E-11  4.0193E-11  .137291   -.63  3.6075E+13    .378274
     3  6.171746E-11  1.8318E-11  .066566    .76  4.7169E+13    .346676
     4  6.110019E-11  9.6699E-12  .054420    .94  4.3406E+13    .339420
     5  6.097313E-11  6.9601E-12  .042287    .99  3.5744E+13    .321039
     6  6.104579E-11  4.8806E-12  .030164    .99  3.5259E+13    .288665
     7  6.111884E-11  3.6560E-12  .021870    .99  3.2814E+13    .249889
     8  6.116438E-11  2.7920E-12  .016233   1.00  3.4038E+13    .210514
     9  6.120358E-11  2.2050E-12  .012962   1.00  1.8886E+13    .177277
    10  6.123600E-11  1.7543E-12  .010455   1.00  2.0459E+13    .151851
    11  6.124162E-11  1.3929E-12  .008227   1.00  2.8621E+13    .129272
    12  6.124802E-11  1.2190E-12  .006900   1.00  2.5601E+13    .111101
    13  6.124833E-11  1.1118E-12  .005794   1.00  1.8946E+13    .097004
    14  6.123912E-11  1.0577E-12  .005094   1.00  1.2855E+13    .085483
    15  6.123926E-11  9.6767E-13  .004568   1.00  1.0113E+13    .074999
    16  6.123978E-11  8.6750E-13  .003997   1.00  8.9478E+12    .064639
    17  6.124278E-11  7.5090E-13  .003491   1.00  9.2755E+12    .057505
    18  6.125361E-11  6.4242E-13  .003049   1.00  7.3854E+12    .050013
    19  6.127198E-11  5.5315E-13  .002617   1.00  6.6525E+12    .044480
    20  6.129393E-11  4.7318E-13  .002212   1.00  5.3433E+12    .039265
    21  6.131728E-11  4.0393E-13  .001880   1.00  6.8598E+12    .034951
    22  6.134085E-11  3.4605E-13  .001606   1.00  8.2828E+12    .031143
    23  6.136439E-11  2.9741E-13  .001391   1.00  7.3014E+12    .027845
    24  6.138654E-11  2.5652E-13  .001205   1.00  6.0201E+12    .025084
    25  6.140663E-11  2.2168E-13  .001046   1.00  5.5352E+12    .022969
    26  6.142430E-11  1.9390E-13  .000916   1.00  5.1053E+12    .021258
    27  6.143915E-11  1.7637E-13  .000805   1.00  4.6690E+12    .019945
    28  6.145105E-11  1.8290E-13  .000706   1.00  4.1747E+12    .018810
    29  6.146025E-11  1.9527E-13  .000624   1.00  4.8535E+12    .017693
    30  6.146818E-11  2.0409E-13  .000568   1.00  6.0509E+12    .016545
    31  6.147545E-11  2.0975E-13  .000523   1.00  4.0108E+12    .014991
    32  6.148303E-11  2.1244E-13  .000495   1.00  3.9696E+12    .013836
    33  6.149065E-11  2.1109E-13  .000467   1.00  3.8282E+12    .012943
    34  6.149793E-11  2.0582E-13  .000437   1.00  3.6485E+12    .012218
    35  6.150450E-11  1.9935E-13  .000399   1.00  4.1463E+12    .011425
    36  6.151064E-11  1.9136E-13  .000369   1.00  4.7319E+12    .010748
    37  6.151652E-11  1.8137E-13  .000342   1.00  3.3119E+12    .009961
    38  6.152232E-11  1.7012E-13  .000318   1.00  3.9367E+12    .009267
    39  6.152796E-11  1.5838E-13  .000295   1.00  3.9631E+12    .008742
    40  6.153339E-11  1.4642E-13  .000274   1.00  1.9996E+12    .008194
    41  6.153864E-11  1.3427E-13  .000257   1.00  1.8821E+12    .007794
    42  6.154367E-11  1.2248E-13  .000242   1.00  1.8185E+12    .007416
    43  6.154861E-11  1.1111E-13  .000229   1.00  1.9659E+12    .007063
    44  6.155340E-11  1.0026E-13  .000218   1.00  1.7831E+12    .006717
    45  6.155805E-11  9.0069E-14  .000207   1.00  1.5092E+12    .006341
    46  6.156260E-11  8.0702E-14  .000197   1.00  1.4318E+12    .006023
    47  6.156717E-11  7.2161E-14  .000189   1.00  1.3508E+12    .005732
    48  6.157177E-11  6.4406E-14  .000180   1.00  1.3697E+12    .005473
    49  6.157626E-11  5.7332E-14  .000173   1.00  1.6307E+12    .005227
    50  6.158074E-11  5.0900E-14  .000165   1.00
 ITERATION LIMIT REACHED BEFORE CONVERGENCE.
 ----------------------------------------------------------------------

All units are SI, so the "RMS velocity" and "Maximum velocity change" are in m/s (typically a very small number), and the "Maximum vertically-integrated stress error" is in Pa m, or N/m (a very large number).

If we graph the two dimensionless measures of this table using a logarithmic scale, we should see steady progress:

If you do not get steady convergence, the most likely causes are:

 The solution to the problem you have posed includes one or more "landslides" (localized flows down a topographic gradient) with very high steady-state velocities. The symptom of this is that the RMS velocity (column 2 in the table above) increases in each iteration, in a pattern of quasi-exponential growth. The solution to such cases is to plot the velocity solution (even though it is not converged) to see where the landslide(s) is/are. Then, you can strengthen the lithosphere either locally (by moderating the heat-flow or topography) or globally (by changing rheologic constants).

 If there is steady convergence at first, and then a transition to a limiting "noise level" of velocity change and/or stress error, then actually this is normal. (It is just that we usually stop the program before this level is reached.) The "noise level" is largely determined by input parameter OKDelV, which is a velocity (in m/s) precision that we hope to reach, but may not. If this parameter is too large, then convergence will be rapid, but the solution will not be accurate. (This is because the maximum limit on viscosity will be set rather low, and thus the viscosity limit rather than the desired flow law will determine the strain rate at many points.) However, if this parameter is made very small, later iterations may be "wasted" in the sense that the computer runs on but the solution no longer improves.