Changeset 898


Ignore:
Timestamp:
07.02.2013 16:03:58 (7 years ago)
Author:
marcus
Message:

r406 | walther | 2013-02-07 16:03:35 +0100 (Do, 07. Feb 2013) | 4 Zeilen

  • included analytical formula for local magnitude estimation
  • updated version number
  • improved handling for local test build
Location:
SH_SHM/trunk
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • SH_SHM/trunk/inputs/shm-config.txt

    r64 r898  
    5757!                            type: string 
    5858sensitivity_file             default 
     59 
     60!                            Switch for formula used for local magnitude estimation. 
     61!                            'classic' uses the tabulated distance correction values, 
     62!                            whereas 'iaspei' denotes the use of an analytical formula. 
     63!                            The impacts are quite notable, so that the classic mode 
     64!                            is set as default. 
     65!                            More information: http://www.seismic-handler.org/wiki/HowTo/LocalMagnitudeFormula 
     66local_magnitude_formula      classic 
    5967 
    6068!                            Stations in read dialog box for MiniSEED data. 
  • SH_SHM/trunk/localtestbuild.sh

    r433 r898  
    1515 
    1616svn st | while read status filename ; do 
     17    # skip blank directories (mostly property changes) 
     18    [ -d $filename ] && continue 
     19 
    1720    # skip all files starting with dot (hidden, etc) 
    1821    fs=`basename $filename | cut -b 1` 
     
    2023 
    2124    # copy files 
    22     [ "$status" = "?" ] && cp $filename $SH_ROOT/$filename 
    23     [ "$status" = "M" ] && cp $filename $SH_ROOT/$filename 
    24     [ "$status" = "A" ] && cp $filename $SH_ROOT/$filename 
    25     [ "$status" = "A" ] && cp $filename $SH_ROOT/$filename 
     25    [ "$status" = "?" ] && cp -v $filename $SH_ROOT/$filename 
     26    [ "$status" = "M" ] && cp -v $filename $SH_ROOT/$filename 
     27    [ "$status" = "A" ] && cp -v $filename $SH_ROOT/$filename 
    2628 
    2729    # delete files 
    28     [ "$status" = "D" ] && rm $SH_ROOT/$filename 
     30    [ "$status" = "D" ] && rm -f $SH_ROOT/$filename 
    2931done 
    3032 
  • SH_SHM/trunk/source/globalparams.c

    r344 r898  
    33 *      ============== 
    44 * 
    5  * $Revision: 183 $, $Date: 2011-03-10 15:03:12 +0100 (Do, 10 MÀr 2011) $ 
     5 * $Revision: 406 $, $Date: 2013-02-07 16:03:35 +0100 (Do, 07. Feb 2013) $ 
    66 * 
    77 * Management of global parameters 
     
    338338        "autofilter_local", 
    339339        "autofilter_tele", 
     340        "local_magnitude_formula", 
    340341        "s_last_parameter" 
    341342}; 
     
    379380        "SHM_BP_1HZ_8HZ_4",              /* autofilter_local */ 
    380381        "S+G_WWSSN_SP",                  /* autofilter_tele */ 
     382        "classic",                       /* ml formula type */ 
    381383        "s_last_parameter"               /* last parameter */ 
    382384}; 
  • SH_SHM/trunk/source/globalparams.h

    r344 r898  
    33 *      ============== 
    44 * 
    5  * $Revision: 183 $, $Date: 2011-03-10 15:03:12 +0100 (Do, 10 MÀr 2011) $ 
     5 * $Revision: 406 $, $Date: 2013-02-07 16:03:35 +0100 (Do, 07. Feb 2013) $ 
    66 * 
    77 * Management of global parameters 
     
    216216        cGpS_autofilter_local, 
    217217        cGpS_autofilter_tele, 
     218        cGpS_local_magnitude_formula, 
    218219        cGpS_last 
    219220} TGpStringIndex; 
  • SH_SHM/trunk/source/motif/cblib2.c

    r43 r898  
    264264        float    amin[2], amax[2];           /* minima and maxima of traces */ 
    265265        float    ml_ampl;                    /* amplitude for ml */ 
     266        float    ml;                         /* local magnitude (tmp) */ 
    266267        unsigned dist_entry;                 /* distance entry */ 
    267268        float    distance_km;                /* distance in km */ 
     
    394395        } /*endif*/ 
    395396 
    396         sel->select[0].magnitude = 
    397                 si_magn_ml( ml_ampl, distance_km, status ); 
     397        /* check magnitude formula type from global parameters */ 
     398        if (strcmp(GpGetString(cGpS_local_magnitude_formula), "classic")) 
     399            ml = si_magn_ml( ml_ampl, distance_km, status ); 
     400        else 
     401            ml = si_magn_ml_analytic( ml_ampl, distance_km, status ); 
     402 
     403        sel->select[0].magnitude = ml; 
    398404        sel->select[1].magnitude = sel->select[0].magnitude; 
    399405 
  • SH_SHM/trunk/source/motif/seismics.c

    r334 r898  
    498498} /* end of si_magn_ml */ 
    499499 
     500 
     501float si_magn_ml_analytic( float ampl, float distance, STATUS *status ) 
     502 
     503/* Returns magnitude ml using analytical formula.  Amplitude and period must 
     504 * be read from a WOOD-ANDERSON simulated seismogram, horizontal component. 
     505 * 
     506 * parameters of routine 
     507 * float      ampl;        input; amplitude of WOOD-ANDERSON simulation 
     508 * float      distance;    input; epicentral distance in km 
     509 * STATUS     *status;     output; return status 
     510 *                         returns value of ml 
     511 */ 
     512{ 
     513        /* Using analytical formula from IASPEI recommendations, see also 
     514         * http://www.seismic-handler.org/export/HEAD/SH_SHM/tags/2012a/doc/\ 
     515         * Summary_WG-Recommendations_20110909.pdf 
     516         */ 
     517 
     518        /* local variables */ 
     519        float    magn;          /* scratch */ 
     520 
     521        /* executable code */ 
     522 
     523        /* check distance */ 
     524        if  (distance < MAGN_ML_MIN_DIST || distance >= MAGN_ML_MAX_DIST)  { 
     525                *status = SIE_MAGN_DIST_OOR; 
     526                return 0.0; 
     527        } /*endif*/ 
     528 
     529        /* analytical magnitude formula */ 
     530        magn = log10((double)ampl); 
     531        magn += 1.11 * log10((double)distance); 
     532        magn += 0.00189 * (double)distance; 
     533        magn -= 2.09; 
     534 
     535        if  (GpGetInt(cGpI_debug_level) > 0) 
     536                printf( "SHM-dbg1: ml %3.1f, distance %5.1f, ampl %f\n", 
     537                        magn, distance, ampl ); 
     538 
     539        return magn; 
     540 
     541} /* end of si_magn_ml */ 
    500542 
    501543 
  • SH_SHM/trunk/source/motif/seismics.h

    r16 r898  
    148148 
    149149 
     150float si_magn_ml_analytic( float ampl, float distance, STATUS *status ); 
     151 
     152/* Returns magnitude ml using analytical formula.  Amplitude and period must 
     153 * be read from a WOOD-ANDERSON simulated seismogram, horizontal component. 
     154 * 
     155 * parameters of routine 
     156 * float      ampl;        input; amplitude of WOOD-ANDERSON simulation 
     157 * float      distance;    input; epicentral distance in km 
     158 * STATUS     *status;     output; return status 
     159 *                         returns value of ml 
     160 */ 
     161 
     162 
     163/*---------------------------------------------------------------------------*/ 
     164 
     165 
    150166void si_ext_location( float lat, float lon, float depth, char refstation[], 
    151167        float *distance, float *azimuth, float *p_slowness, STATUS *status ); 
  • SH_SHM/trunk/source/motif/shm.c

    r893 r898  
    33 *      ===== 
    44 * 
    5  * $Revision: 402 $, $Date: 2012-12-07 10:53:45 +0100 (Fr, 07. Dez 2012) $ 
     5 * $Revision: 406 $, $Date: 2013-02-07 16:03:35 +0100 (Do, 07. Feb 2013) $ 
    66 * 
    77 * main module of shm 
     
    683683 
    684684        printf( "\n" ); 
    685         printf( "SeismicHandler Motif version 2012a, Copyright (C) 1990-2012\n" ); 
     685        printf( "SeismicHandler Motif version 2013a, Copyright (C) 1990-2013\n" ); 
    686686        printf( "Klaus Stammler, Seismological Observatory Graefenberg (SZGRF)\n" ); 
    687687        printf( "of the Federal Institute for Geosciences and Natural Resources (BGR).\n" ); 
  • SH_SHM/trunk/source/shconst.h

    r521 r898  
    33 *      ========= 
    44 * 
    5  * $Revision: 294 $, $Date: 2012-01-26 17:35:13 +0100 (Do, 26. Jan 2012) $ 
     5 * $Revision: 406 $, $Date: 2013-02-07 16:03:35 +0100 (Do, 07. Feb 2013) $ 
    66 * 
    77 * constants of seismhandler program 
     
    3636#define __SHCONST 
    3737 
    38 #define SHC_VERSION "2012a" 
     38#define SHC_VERSION "2013a" 
    3939        /* version number */ 
    4040#define TW 1 
Note: See TracChangeset for help on using the changeset viewer.