Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)\
Expand Down
8 changes: 7 additions & 1 deletion src/get_prefix.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
}
/* ############################################################### */
Expand Down