diff --git a/src/Makefile b/src/Makefile index 6c26bd5..8477569 100644 --- a/src/Makefile +++ b/src/Makefile @@ -39,8 +39,9 @@ fnamelen = 128 # max. nb of chars in file names lineslen = 256 # max. nb of chars per line in text files idlen = 16 # len of station id -OPTFLAG = -fopenmp -D__GFS_01D__=1 +#OPTFLAG = -D__GFS_01D__=1 #OPTFLAG = -fopenmp -D__GFS_005D__=1 -D__IDISTMIN__=50 -D__IDISTMAX__=12000 +OPTFLAG = -D__GFS_005K__=1 -D__IDISTMIN__=50 -D__IDISTMAX__=9500 CFLAGS = -O2 -Wall -D__LEN_SIG__=$(datalen) \ -D__FSIZE__=$(fnamelen) -D__IDSIZE__=$(idlen)\ diff --git a/src/get_prefix.c b/src/get_prefix.c index 61a97f2..9ff87fd 100644 --- a/src/get_prefix.c +++ b/src/get_prefix.c @@ -69,11 +69,17 @@ void get_prefix(double cmt_dep, double xdeg, char *best_segm1, char *best_segm2, ifac = 1000.; idist = (int)floor((100.0*xdeg+2.5)/5.)*50; #else + //Add option to uses GFs database in km + #ifdef __GFS_005K__ + ifac = 1000.;// For scaling and consistency with GFs + idist = (int)floor(0.25 + xdeg * 22) * 5 * 10; //Interpolation every 5 km + #else ifac = 10.; idist = 2*(int)floor(5.*xdeg)+1; #endif #endif #endif + #endif idistmin = 1; idistmax = 899; @@ -91,7 +97,7 @@ void get_prefix(double cmt_dep, double xdeg, char *best_segm1, char *best_segm2, } if (idist > idistmax) { - fprintf(stderr, "Warning distance too big!; using 89.9 deg\n"); + fprintf(stderr, "Warning distance too big!; %.1f deg instead.\n", idistmax); idist = idistmax; } /* ############################################################### */