= Fault System Solution Zip File Format Documentation = UCERF3 (and potentially other forecast) data is stored in a zip file format, this page describes how to parse these zip files. If you are using Java, a parser is already written in OpenSHA via the [source:trunk/dev/scratch/UCERF3/utils/FaultSystemIO.java scratch.UCERF3.utils.FaultSystemIO] class. == File Formats Used == You must write a parser for each of the following file formats in order to load in a fault system solution. === Double array binary file === These files contain an array of double values in a binary format. These files simply contain a series of big endian 8 bit double precision floating point numbers. The size of this file will be equal to the number of values x 8 bits. === Integer array list binary file === These files contain a list of integer arrays in a binary format. All file entries are 4-bit big endian integer values. The first value in the file is the number of integer arrays stored in the file. Then each array is written to the file by first writing the number of elements in the array, then each value in the array. For example, consider the following 3 arrays: {{{ [ 0 6 2 4 ] [ 3 6 2 ] [ 3 7 9 1 4 7 ] }}} This would be written as (all stored as big endian 4-bit integers): '''[[span(style=color: #FF0000, 3)]] [[span(style=color: #0000FF, 4)]] 0 6 2 4 [[span(style=color: #0000FF, 3)]] 3 6 2 [[span(style=color: #0000FF, 6)]] 3 7 9 1 4 7''' In this example, '''[[span(style=color: #FF0000, the number of arrays is in red)]]''', '''[[span(style=color: #0000FF, each array's size in blue)]]''', '''and array data is in black'''. === Fault section data XML file === Each fault subsection is stored in an XML file, an example of which is shown below. {{{ ... ... ... }}} === Grid Sources XML file === Some solutions will contain gridded seismicity magnitude frequency distributions. Here is an example XML file: NOTE: UCERF3 uses the RELM region evenly discretized at 0.1 degrees for gridded seismicity. Due to the complexities involved in reproducing our gridding exactly, a file is posted here with grid node indexes and locations for this region: http://opensha.usc.edu/ftp/kmilner/ucerf3/relm_gridded_region.csv {{{ ... ... ... ... }}} == Zip File Contents ==