sm_migrate

Migrate existing ShakeMap 3.5 data directories.

This program takes one required file, a tarball of one or more ShakeMap 3.5 event directories. To create this file, run a command like this:

find . -maxdepth 3 -name “_dat.xml” -o -name “*_fault.txt” -o -name “source.txt” -o -name “info.json” -o -name “.conf” | tar -czvf ~/sm35_inputs.tgz -T -

This program takes a subset of the ShakeMap 3.5 input data and the info.json file and uses those files to create the corresponding ShakeMap 4 input data.

Files used:
  • *_dat.xml data files in XML format. These are unchanged in ShakeMap 4.0.

  • *_fault.txt fault files in text format. These will be converted to GeoJSON.

  • source.txt Text file possibly containing mechanism and ??

  • info.json Metadata file from which we extract: - Origin information for new event.xml file. - bias settings (see -s option)

  • *.conf Config files, at this time only configs from grind.conf:
    • IPEs are currently not supported.

    • A partial subset of GMICE are supported in ShakeMap 4.0 at this time.

    • GMPE selections will be converted to the closest matching GEM equivalent (see -m).

    • outlier max_deviation and max_mag values will be converted.

NOTE: if the -b option is used without -s, ShakeMap 4 will create a model.conf file for the event that does not specify a GMPE. To use a GMPE other than the default when running the event, make sure you update each event’s model.conf file to include your chosen GMPE.

usage: sm_migrate [-h] [-i] [-b] [-s] [-u] [-m MIGRATE_FILE] tarfile

Positional Arguments

tarfile

Input root data tarfile

Named Arguments

-i, --ignore-naked-ids

Ignore directories where event_source (from model.conf) does not prepend eventid

-b, --skip-bounds

Ignore previous bounds/resolution settings discovered in input data.

-s, --skip-settings

Ignore previous ground motion conversion settings discovered in input data.

-u, --use-old-gmpe

Ignore new improved GMPE sets and attempt to use old GMPE settings. Note that this may result in errors when running ShakeMap. Not recommended.

-m, --migrate-file

Supply custom migrate.conf