Skip to content

2 Refining analogue searches

PTierz edited this page Nov 26, 2021 · 7 revisions

Modifying the weighting scheme and number of top analogue volcanoes

Use the optional flags -Ts, -G, -M, -Sz, -St to customise the weights that PyVOLCANS assigns to each of the volcanological criteria: tectonic setting, rock geochemistry, volcano morphology, eruption size (Volcanic Explosivity Index, VEI, Newhall and Self, 1982), and eruption style, respectively (abbreviations are as in Tierz et al., 2019, Equation 1).

For example, call PyVOLCANS using an equal-weight scheme between eruption size and eruption style, setting the other volcanological criteria to 0 (Scheme B in Tierz et al., 2019):

$ pyvolcans Hekla -Sz 0.5 -St 0.5

Top 10 analogue volcanoes for Hekla, Iceland (372070):
               name        country  smithsonian_id  total_analogy
              Taupo    New Zealand          241070       0.947620
         Kikhpinych         Russia          300180       0.940538
      Chichinautzin         Mexico          341080       0.934044
 Carrán-Los Venados          Chile          357140       0.933013
           Newberry  United States          322110       0.930016
           Khodutka         Russia          300053       0.927797
 Tangkoko-Duasudara      Indonesia          266130       0.922440
             Dukono      Indonesia          268010       0.921541
              Okmok  United States          311290       0.921246
        Agua de Pau       Portugal          382090       0.921154

NB. You can also use fractions to define the weighting scheme. For instance, the last command above is equivalent to: $ pyvolcans Hekla -Sz 1/2 -St 1/2

Number of top analogues

Use the optional flag --count to change the number of top analogue volcanoes:

$ pyvolcans Hekla --count 5

Top 5 analogue volcanoes for Hekla, Iceland (372070):
         name  country  smithsonian_id  total_analogy
  Torfajokull  Iceland          372050       0.941676
  Bardarbunga  Iceland          373030       0.921407
 Prestahnukur  Iceland          371070       0.919877
   Langjokull  Iceland          371080       0.915929
      Hengill  Iceland          371050       0.911855

Verbose output

Use the optional flag --verbose to print the weighting scheme on-screen, and also to obtain the single-criterion analogy values, in addition to the total-analogy values that PyVOLCANS outputs by default. From PyVOLCANS v1.3.0, the verbose mode also provides the ID profile (i.e. summary of volcanological data available for VOLCANS calculations) for the specific volcano of interest, as nested dictionaries that follow a json file format (please see Tierz et al., 2019 for further details on the meaning and use of each of the variables shown in the ID profile):

$ pyvolcans Hekla --verbose

PyVOLCANS: Supplied weights: {'tectonic_setting': 0.2, 'geochemistry': 0.2, 'morphology': 0.2, 'eruption_size': 0.2, 'eruption_style': 0.2}

Top 10 analogue volcanoes for Hekla, Iceland (372070):
              name       country  smithsonian_id  total_analogy  ATs        AG        AM       ASz       ASt
       Torfajokull       Iceland          372050       0.941676  0.2  0.188235  0.187584  0.180280  0.185577
       Bardarbunga       Iceland          373030       0.921407  0.2  0.188235  0.187584  0.172727  0.172861
      Prestahnukur       Iceland          371070       0.919877  0.2  0.188235  0.189474  0.169091  0.173077
        Langjokull       Iceland          371080       0.915929  0.2  0.188235  0.177193  0.169091  0.181410
           Hengill       Iceland          371050       0.911855  0.2  0.192157  0.173684  0.169091  0.176923
 Brennisteinsfjoll       Iceland          371040       0.907751  0.2  0.164706  0.184211  0.169091  0.189744
        Kverkfjoll       Iceland          373050       0.906833  0.2  0.188235  0.187584  0.169091  0.161923
       Fremrinamar       Iceland          373070       0.905074  0.2  0.188235  0.168421  0.169091  0.179327
           Ecuador       Ecuador          353011       0.901611  0.2  0.164706  0.194737  0.169091  0.173077
     Marion Island  South Africa          234070       0.892960  0.2  0.141176  0.200000  0.169091  0.182692

ID profile for Hekla, Iceland (372070):
{
  "name": "Hekla",
  "country": "Iceland",
  "smithsonian_id": 372070,
  "tectonic_setting": {
    "0.0": "Rift Oceanic Crust"
  },
  "geochemistry": {
    "Foidite": 0.0,
    "Phonolite": 0.0,
    "Trachyte": 0.0,
    "Trachyandesite/Basaltic trachyandesite": 0.0,
    "Phono-tephrite/Tephri-phonolite": 0.0,
    "Tephrite/Basanite/Trachybasalt": 0.0,
    "Basalt": 0.25,
    "Andesite": 0.25,
    "Dacite": 0.25,
    "Rhyolite": 0.25
  },
  "morphology": 0.39473684210526316,
  "eruption_size": {
    "VEI leq 2": 0.26666666666666666,
    "VEI 3": 0.35,
    "VEI 4": 0.2833333333333333,
    "VEI 5": 0.1,
    "VEI 6": 0.0,
    "VEI 7": 0.0,
    "VEI 8": 0.0
  },
  "eruption_style": {
    "Lava flow and/or fountaining": 0.8769230769230769,
    "Ballistics and tephra": 0.6923076923076923,
    "Phreatic and phreatomagmatic activity": 0.0,
    "Water-sediment flows": 0.15384615384615385,
    "Tsunamis": 0.015384615384615385,
    "Pyroclastic density currents": 0.09230769230769231,
    "Edifice collapse/destruction": 0.0,
    "Caldera formation": 0.0
  }
}

Using the verbose mode to save ID profiles

From PyVOLCANS v1.3.0, the program can provide the ID profile for either the target volcano selected by the user and/or for each of the top analogue volcanoes identified (whose number is set by the --count flag; default=10). As explained above, selecting the flag --verbose prints the ID profile for the target volcano into the standard output. In order to save this ID profile into a json-formatted file, users should use the option --output_volcano_data (or -ovd), as in the following example:

$ pyvolcans Hekla -v -ovd

which saves a file named Hekla_IDprofile.json into the current working directory. If users want to save the ID profiles for the top analogue volcanoes as well, they can do so by choosing the option --output_analogues_data (or -oad):

$ pyvolcans Hekla -v -oad

which saves a file named Hekla_top10analogues_Ts0200G0200M0200Sz0200St0200_IDprofiles.json into the current working directory as well. Please note that the set of top analogue volcanoes is dependent on the weighting scheme selected by the user. Therefore, modifying that weighting scheme (e.g. $ pyvolcans Hekla -G 0.7 -M 0.3 -v -oad) can lead to a different set of top analogue volcanoes, whose ID profiles would then be saved into the corresponding json-formatted file when the -oad flag is chosen. This is the reason why the names of these files contain specifications as to what weighting scheme was used to generate the set of top analogue volcanoes (please see the Home Wiki page and/or Tierz et al., 2019 for more details on the generation of analogue volcanoes via VOLCANS/PyVOLCANS).

Saving to CSV

You can save your PyVOLCANS results into a comma-separated-value (csv) file that you might use for your records and/or to perform further analyses on the data.

For example, typing:

$ pyvolcans Hekla --write_csv

generates the same standard PyVOLCANS output as $ pyvolcans Hekla, but, in addition, it saves a file named:

Hekla_top10analogues_Ts0200G0200M0200Sz0200St0200.csv

into the current working directory.

The filename is a unique identifier of the three main parameters that are used by PyVOLCANS, each separated by the underscore sign:

(1) target volcano (Hekla); (2) weighting scheme (Ts0200G0200M0200Sz0200St0200) (3) number of top analogue volcanoes (top10analogues) The weight selected for each volcanological criterion is indicated by the abbreviation of the criterion (see above and in Equation 1 of Tierz et al., 2019), followed by a four-digits number, where the first number indicates the units value (either 0 or 1), and the following three numbers indicate the decimals of the weight value. Thus, the following examples apply:

0200 denotes 0.200, 0850 denotes 0.850, 0125 denotes 0.125, 1000 denotes 1.000, etc.

The content of the csv file is the same as the standard PyVOLCANS output:

$ cat Hekla_top10analogues_Ts0200G0200M0200Sz0200St0200.csv

name,country,smithsonian_id,total_analogy
Torfajokull,Iceland,372050,0.94168
Bardarbunga,Iceland,373030,0.92141
Prestahnukur,Iceland,371070,0.91988
Langjokull,Iceland,371080,0.91593
Hengill,Iceland,371050,0.91186
Brennisteinsfjoll,Iceland,371040,0.90775
Kverkfjoll,Iceland,373050,0.90683
Fremrinamar,Iceland,373070,0.90507
Ecuador,Ecuador,353011,0.90161
Marion Island,South Africa,234070,0.89296