User Tools

Site Tools


wphase:documentation

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wphase:documentation [2018/03/26 16:52]
wphase [Building the code]
wphase:documentation [2022/01/10 07:39] (current)
wphase [Extracting data from a gzipped tar archive]
Line 27: Line 27:
   - gcc and gfortran   - gcc and gfortran
   - python2.7 (or later)   - python2.7 (or later)
-  - You have to install numpy, matplotlib, ​basemap ​and netCDF4 to run some python scripts which make figures.+  - You have to install numpy, matplotlib, ​cartopy ​and netCDF4 to run some python scripts which make figures.
   - rdseed   - rdseed
  
Line 88: Line 88:
  
 ----- -----
 +
 +==== Extracting data from a gzipped tar archive ====
 +As SEED volumes are no longer supported, waveforms and instrument response can also be extracted from a gzipped tar archive (hereafter referred to as "​tgz"​) including both SAC and SAC_PZ (poles and zeros) files. ​
 +Instead of using the "​extract.csh"​ script to extract data from SEED, we can then extract data from a tgz archive using: ​
 +<​code>​${WPHASE_HOME}/​bin/​tgz2DATA_org.py path_to_tgz_archive.tgz</​code> ​
 +where "​path_to_tgz_archive.tgz"​ is the path to the tgz archive including SAC and SAC_PZ files. This script will extract SAC and SAC_PZ files a the directory named "​DATA_org"​.
 +
 +Two tgz archive formats are supported: WILBER (default) and NIED. 
 +
 +Using the WILBER format, the tgz archive should include SAC files named with a "​.SAC"​ or "​.sac"​ extension and SAC_PZ file names starting with "​SAC_PZ"​. If data is ordered using the [[https://​ds.iris.edu/​wilber3|IRIS Wilber 3 system]], this format can be obtained directly by selecting "​Output format: SAC binary"​ (little or big-endian) ​ and "​Bundle As: gzipped tar archive"​ in the final Request Data page (see below). ​
 +
 +{{:​wilber3_screenshot.png?​300|{{:​wphase:​wilber3_screenshot.png?​300|}}
 +
 +Once the tgz archive is prepared, extraction from a WILBER formatted archive is done by running:
 +<​code>​${WPHASE_HOME}/​bin/​tgz2DATA_org.py path_to_tgz_archive.tgz wilber</​code> ​
 +As this is the default format, the "​wilber"​ option can be removed from the command line.
 +
 +Using the NIED tgz archive format, SAC_PZ files should end with "​.zp"​ and SAC file names can have any format (but should not end with "​.zp"​). Extraction from a NIED archive can be done using 
 +<​code>​${WPHASE_HOME}/​bin/​tgz2DATA_org.py path_to_tgz_archive.tgz nied</​code> ​
 +
 +---
  
 ==== Calculating Synthetics, deconvolution and filtering ==== ==== Calculating Synthetics, deconvolution and filtering ====
Line 123: Line 144:
 $WPHASE_HOME/​bin/​wpinversion -ifil o_wpinv.th1.3 -ofil o_wpinv.th0.9 -th 0.9  $WPHASE_HOME/​bin/​wpinversion -ifil o_wpinv.th1.3 -ofil o_wpinv.th0.9 -th 0.9 
 </​code>​ </​code>​
-  - Finally, it is possible to remove the channels showing a large rms ratios (observed/​predicted and predicted/​observed) using the option –nr (e.g. –nr 2.0): <​code>​+  - Finally, it is possible to remove the channels showing a large rms amplitude ​ratios (observed/​predicted and predicted/​observed) using the option –nr (e.g. –nr 2.0): <​code>​
 $WPHASE_HOME/​bin/​wpinversion -ifil o_wpinv.th0.9 -ofil o_wpinv.th1.3 -nr 2.0 $WPHASE_HOME/​bin/​wpinversion -ifil o_wpinv.th0.9 -ofil o_wpinv.th1.3 -nr 2.0
 </​code>​ </​code>​
Line 135: Line 156:
 ----- -----
 ==== RUNA scripts ==== ==== RUNA scripts ====
-Data extraction, ​screening and inversion ​described above can be performed by running one of the RUNA3*csh scripts (usually in bin). These scripts ​perform data extraction/screening and calculate a moment tensor solution after median data screening and after rejecting ​ traces associated with large misfit using the threshold 5.0 3.0 0.9 (i.e. -th, see 2. in section ​4):+Data screening and inversion can all be done at once using the RUNA3_lite.csh script: 
 +<​code>​ 
 +${WPHASE_HOME}/​bin/​RUNA3_lite.csh 
 +</​code>​ 
 +This script can be used after data extraction in "​DATA_org"​ using either "​tgz2DATA_org.py"​ or "​extract.csh"​ to extract data from a tgz archive or a SEED volume, respectively (see above). Once the "​DATA_org"​ directory is populated, the "​RUNA3_lite.csh"​ script will perform data screening and calculate a moment tensor solution after median data screening and after rejecting ​ traces associated with large misfit using the threshold 5.0 3.0 0.9 (i.e. -th, see 2. in the "​Inversion" ​section ​above)
 + 
 +If data is extracted directly from SEED volume(s), data extraction/​screening and inversion can be done directly by running:
 <​code>​ <​code>​
 ${WPHASE_HOME}/​bin/​RUNA3.csh ${WPHASE_HOME}/​bin/​RUNA3.csh
 </​code> ​ </​code> ​
-will perform median and rms misfit screening for Z, N, E, 1 and 2  channels,+To do the inversion on "Z" components only (i.e.not using the horizontals)use:
 <​code>​ <​code>​
 ${WPHASE_HOME}/​bin/​RUNA3_only_Z.csh ​ ${WPHASE_HOME}/​bin/​RUNA3_only_Z.csh ​
 </​code>​ </​code>​
-will perform median and rms misfit screening for Z channels only. 
  
-These two scripts don’t perform the “ratio screening” (i.e. 3. above). To run the same routines with an additional screening based on the ratio (observed/​predicted and predicted/​observed),​ the following ​scripts ​can be used:+These two scripts don’t perform the “ratio screening” (i.e. 3. in the "​Inversion"​ section ​above). To run the same routines with an additional screening based on the rms amplitude ​ratio (observed/​predicted and predicted/​observed),​ the following ​script ​can be used:
 <​code>​ <​code>​
 ${WPHASE_HOME}/​bin/​RUNA3r.csh ​ ${WPHASE_HOME}/​bin/​RUNA3r.csh ​
 </​code>​ </​code>​
 will perform median, rms misfit and rms ratio for channels Z, N, E, 1, 2 channels, will perform median, rms misfit and rms ratio for channels Z, N, E, 1, 2 channels,
 +Warning: RUNAr.csh is not yet fully tested.
  
-Remark: RUNAr.csh is not yet fully tested. 
- 
- 
-Several optional parameters can be used when running RUNA3*csh scripts. These parameters will apply to the wpinversion program. They are described when running wpinversion -h.  
-e.g.:  RUNA3.csh -wz 1.0 -wn 0.3 -we 0.5  will give a weights of 1.0, 0.3 and 0.5 for Z, N, E components respectively. 
- 
-To perform data screening and inversion only, using previously extracted SAC data, it is possible to use:  
-<​code>​ 
-${WPHASE_HOME}/​bin/​RUNA3_lite.csh 
-</​code>​ 
-that is designed for Z, N ,Z ,1, 2 channels 
  
 ----- -----
Line 177: Line 193:
 ==== Plot routines ==== ==== Plot routines ====
  
-All the plotting scripts are coded using python and the module pylab which have to be installed before using them. The module ​basemap ​is also needed for plotting maps but it is optional (even if we recommend to install it).+All the plotting scripts are coded using python and the module pylab which have to be installed before using them. The module ​cartopy ​is also needed for plotting maps but it is optional (even if we recommend to install it).
  
 There are 3 script which can be used to plot the W phase inversion results: There are 3 script which can be used to plot the W phase inversion results:
  
    * The first script is <​code>​${WPHASE_HOME}/​bin/​make_grids.py</​code>​ which be used to display grid-searches results. Use <​code>​${WPHASE_HOME}/​bin/​make_grids.py -h</​code>​ to have more details on available options and arguments. The 2 other scripts plot observed and synthetic seismograms after W phase inversion. ​    * The first script is <​code>​${WPHASE_HOME}/​bin/​make_grids.py</​code>​ which be used to display grid-searches results. Use <​code>​${WPHASE_HOME}/​bin/​make_grids.py -h</​code>​ to have more details on available options and arguments. The 2 other scripts plot observed and synthetic seismograms after W phase inversion. ​
-   * In order to plot complete seismograms individually and place station on a map: <​code>​${WPHASE_HOME}/​bin/​traces.py</​code>​ which draw complete seismograms and show station location on a map (if basemap ​is available). Please use <​code>​${WPHASE_HOME}/​bin/​traces.py -h</​code>​ for more details on available options.+   * In order to plot complete seismograms individually and place station on a map: <​code>​${WPHASE_HOME}/​bin/​traces.py</​code>​ which draw complete seismograms and show station location on a map (if cartopy ​is available). Please use <​code>​${WPHASE_HOME}/​bin/​traces.py -h</​code>​ for more details on available options.
    * To plot concatenated waveforms:<​code>​${WPHASE_HOME}/​bin/​make_cwp.py</​code>​ For more details on available options and arguments see <​code>​${WPHASE_HOME}/​bin/​make_cwp.py -h</​code>​ to see the options.    * To plot concatenated waveforms:<​code>​${WPHASE_HOME}/​bin/​make_cwp.py</​code>​ For more details on available options and arguments see <​code>​${WPHASE_HOME}/​bin/​make_cwp.py -h</​code>​ to see the options.
  
Line 193: Line 209:
 <​http://​www.ngdc.noaa.gov/​mgg/​global/​global.html>​ <​http://​www.ngdc.noaa.gov/​mgg/​global/​global.html>​
  
-If Basemap ​is installed, you can optionally draw ETOPO01 topography and+If Cartopy ​is installed, you can optionally draw ETOPO01 topography and
 bathymetry. To do so, the path to the ETOPO01 netCDF file must be bathymetry. To do so, the path to the ETOPO01 netCDF file must be
 assigned to the environment variable $ETOPOFILE which can be assigned to the environment variable $ETOPOFILE which can be
Line 381: Line 397:
 ${WPHASE_HOME}/​bin/​make_grids.py –p -b  ${WPHASE_HOME}/​bin/​make_grids.py –p -b 
 </​code>​ </​code>​
-to create the file grid_search_xy.pdf containing Fig. 1 which corresponds to the above example. The option –b is optional: it allows to use the basemap ​module in order to plot coastlines and topography.+to create the file grid_search_xy.pdf containing Fig. 1 which corresponds to the above example. The option –b is optional: it allows to use the cartopy ​module in order to plot coastlines and topography.
wphase/documentation.1522075959.txt.gz · Last modified: 2018/03/26 16:52 by wphase