File tree Expand file tree Collapse file tree
gmsvtoolkit/src/gp/StandRupFormat Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Binaries
22srf_gethypo
3+ srf2moment
Original file line number Diff line number Diff line change @@ -24,13 +24,17 @@ CFLAGS = ${UFLAGS} ${LF_FLAGS} ${FFTW_INCFLAGS}
2424
2525# #### make options
2626
27- all : srf_gethypo
27+ all : srf_gethypo srf2moment
2828
2929srf_gethypo : srf_gethypo.c ${OBJS}
3030 ${CC} ${CFLAGS} -o srf_gethypo srf_gethypo.c ${OBJS} ${LDLIBS} ${INCPAR}
3131 cp srf_gethypo ../bin/.
3232
33+ srf2moment : srf2moment.c ${OBJS}
34+ ${CC} ${CFLAGS} -o srf2moment srf2moment.c ${OBJS} ${LDLIBS} ${INCPAR}
35+ cp srf2moment ../bin/
36+
3337${OBJS} : ${HEADS}
3438
3539clean :
36- -rm -f * .o srf_gethypo
40+ -rm -f * .o srf_gethypo srf2moment
Original file line number Diff line number Diff line change 1+ #include "include.h"
2+ #include "structure.h"
3+ #include "function.h"
4+ #include "defs.h"
5+ #include "getpar.h"
6+
7+ int main (int ac ,char * * av )
8+ {
9+ char infile [256 ], velfile [256 ];
10+
11+ struct standrupformat srf ;
12+ struct velmodel vmod ;
13+
14+ int inbin = 0 ;
15+ int use_srf_mu = 0 ;
16+ int moment_rate = 0 ;
17+
18+ sprintf (infile ,"stdin" );
19+ sprintf (velfile ,"NOT_PROVIDED" );
20+
21+ setpar (ac ,av );
22+ getpar ("infile" ,"s" ,infile );
23+ getpar ("velfile" ,"s" ,velfile );
24+ getpar ("use_srf_mu" ,"d" ,& use_srf_mu );
25+ getpar ("moment_rate" ,"d" ,& moment_rate );
26+ endpar ();
27+
28+ read_Fvelmodel (velfile ,& vmod );
29+ read_srf (& srf ,infile ,inbin );
30+
31+ if (moment_rate )
32+ get_moment_rate (& srf ,& vmod ,use_srf_mu );
33+ else
34+ get_moment (& srf ,& vmod ,use_srf_mu );
35+ }
You can’t perform that action at this time.
0 commit comments