cccc	common_arriv.inc	*************************************
ccc	common used in arrivat time readings.
ccc	hypocenter parameters		!total na200 bytes
ccc	c_hypocenter; hypocenter parameters.
ccc	sec;second for the first data on the disk.
	character*15 wave_file_win
	character*96 hypo_parm_dkw
	character*80 filech_com
	character*1 c_temp,c_hypo_flag
	common /c_print_rat/kprint_rat
	common /c_hypocenter/iy,im,id,ih,imin,sec,sec_wave,
     1  t,dt,phi,dphi,ram,dram,dep,ddep,nobs,fmag,sd,t_wadachi,
     2  phi_same,ram_same,iflag_same,sd_check,fmagj,iflag_hypo,
     3 kst_key,nst_key,k_key,nst_key_kth,p_key,num_near_max,delmax_dkw,
     2  nobsp,nobss,nobsall,nobsp_ini,nmecha,sdorg,nobsps,nobsall_dkw,
     3 nobsp_min_cal_hypo,sec_shift,nakama_max,iflag_main,irec_arv,
     4 hypo_parm_dkw,nst_key_org,nst_key_kth_org,nobsall_wv,
     5 iyt,imt,idt,iht,imint,sect,ttdkw          !after time correction
	common /c_err_daen/phmax1,ramax1,phmin1,ramin1,
     1  phmax2,ramax2,phmin2,ramin2,kkk_ps_err
ccc
ccc	picked arrival time data by c_arriv
ccc	aicsa,aicsn;AIC values and S/N ratios for picked phases.
ccc	fp;F-P time in sec.
ccc	ampp;Amplitude in mkine.
ccc	nphasep,nphses;eg.  =1,2 for first event, =3,4 for second event. 
ccc	deltak,azimutha,thdega,travp,travs;not used and not defined.
ccc	poaa,ampaa,snaa,aicaa,ipolaa,rankaa,nphaseaa,; measured data for 
ccc	various phases.
ccc	ampcom; maximum amplitude for each component.
	character*2 ipola,rankp,ranks,ipolaa,rankaa,ipol_uda,ipol_ar
	character*7 stnw,stnwv
	character*2 ipolsakai
ccc	parameter (na200=200)
	parameter (na200=5000)		!97-9-18
	parameter (na20=10)
	common /c_arriv_cha/stnw(na200),rankp(na200),ranks(na200),
     1 ipola(na200),ipolsakai(na200),file_win_chan,wave_file_win,
     2 filech_com,ipol_uda(na200),ipol_ar(na200),stnwv(na200),
     2 c_temp,c_hypo_flag
	common /c_arriv/nstn(na200),po(na200),so(na200),sp(na200),
     1 po_pre(na200),so_pre(na200),nstnwv(na200),
     1  wp(na200),ws(na200),tppa(na200),tssa(na200),iflag_obs(na200),
     2 torga(na200),kstn_plot_ord(na200),po_befa(na200),so_befa(na200),
     3  period(na200,2),aicsa(na200,2),aicsn(na200,2),resoc(na200,2),
     4  fmaga(na200),fp(na200),ampp(na200),amps(na200),deltak(na200),
     5 azimutha(na200),thdega(na200),kps_comp(na200,2),phiobsw(na200),
     6 ramobsw(na200),altobsw(na200),stcrw(na200,2),poka(na200),
     6  travp(na200),travs(na200),sampwa(na200),fmagjma(na200),
     8  ntrg_flaga(na200),po_bsum(na200),so_amaxa(na200),soka(na200),
     8 tp_amin(na200),tp_amax(na200),ts_amax(na200),
     8 cont_ppart(na200),cont_spart(na200),sn_ppart(na200),
     9 sn_spart(na200),ptime_err(na200),ipolerror(na200),
     1 stime_err(na200),so_bsum(na200),iminseca(na200),bai_stna(na200),
     4 ampjma(na200),betaa(na200),fil_maga(na200),resorg(na200),
     5 del_near_arv(na200,30),near_stn_arv(na200,30),pna(na200),
     6 nobsp_near(na200),del_min_arv(na200),del_min_ave(na200),
     7 isaturate(na200),i_big_eq(na200),amax_ud(na200),
     8 zh_psa(na200,2), nstn_dkw_wavea(na200),nstn_read(na200)
       common /c_seismo_parm/ risea(na200,2),sn_coda(na200),
     1 sn_psfil(na200),tsmin_psfil(na200)
ccc     rizea; time when amp becomes larger than noismax+(amax-noismax)/4
ccc     rizea(kst,1);P,rizea(kst,2);S(NS+EW)

	character*2 ipol_ps
	common /c_pick_ps/p_psa(na200,50),sn_psa(na200,50),
     1 cont_psa(na200,50),neq_psa(na200,50),kps_psa(na200,50),
     2 nphase_ps(na200),ipol_ps(na200,50),freq_psa(na200,50),
     3 org_psa(na200,50),nsel_psa(na200,2),org_ps,nobs_org,
     4 amax_log_psa(na200,50),amax_loga(na200),amax_psa(na200,50),
     5 sn_psak(na200,50),weight_psa(na200,50),ptime_psa1,
     6 ptime_psa2,near40_psa(na200,50),p_psak(na200,50),
     7 nphase_psk(na200),nobs_rm_oka(na200,2),kps_psak(na200,50),
     8 p_bsum_psa(na200,50),sn_bsum_psa(na200,50),neq_psak(na200,50),
     9 freq_psak(na200,50),amax_log_psak(na200,50),amax_psak(na200,50),
     9 nphase_bsum_ps(na200),amp_nois_psa(na200,50),
     9 cont_psak(na200,50),trav_nop(na200), org_psak(na200,50),
     1 kzh_psa(na200,50),kzh_psak(na200,50),kp_check(na200),
     2 ks_check(na200),korg_check(na200),score_box(100),
     3 pre_psa(na200,50),pre_psak(na200,50),near40_psak(na200,50)
          common /c_hypo_ring/neq_ring,phi_ring(10),ram_ring(10),
     1 fmag_ring(10),irec_ring(10),irec_arriv_ring(10),
     1 dep_ring(10),nobsp_ring(10),t_ring(10),delmax_ring(10),
     2 po_ring(10,500),so_ring(10,500),nstn_ring(10,500),
     3 iflag_ring, irec_hp,irec_ar
	character*80 win_pick_file_ring	
        common /c_hypo_ring_char/win_pick_file_ring(10)
        common /c_sakai_arriv/posakai(na200),sosakai(na200),
     1 ampsakai(na200),iyeri,imeri,ideri,iheri,parv_eri,
     2 imineri,iseceri,teri,phieri,rameri,deperi,fmageri
       common /c_check_hypo/rat1_check_hypo,rat2_check_hypo,
     1 nok_check_hypo,nno_check_hypo,snps_check_hypo
	common /c_arriv2/po2(na200),so2(na200),phi_bef,ram_bef,
     1  dep_bef,t_bef,sd_bef,nobsall_bef,sp2(na200),wp2(na200),
     2  ws2(na200),res_nakp(na200),res_naks(na200),res_nako(na200),
     3  period2(na200,2),aicsn2(na200,2),resoc2(na200,2),
     3 pot(na200),sot(na200),ts_amaxt(na200),
     4 kst_key_eqa(50),k_key_eqa(50),p_key_eqa(50),org_ps_eqa(50),
     5 num_p_eqa(50),num_eq_page,delmax_eqa(50)
       common /c_cor/phi_cor(2),ram_cor(2),dep_cor(2),fmag_corr(2),
     1 t_cor(2),nobsall_cor(2),po_cor(2,na200),wp_cor(2,na200),
     2 so_cor(2,na200),ws_cor(2,na200),deltak_cor(2,na200),
     3 sec_from_cor(2,na200),samp_cor(2,na200),ndata_cor(2,na200),
     4 uda_cor(2,3,na200,3000),nstn_cor(2,na200),plot_dur,
     5 duration_cross,sp_cor(2,na200),ps_range_cor(2,na200,4),
     5 cr_value_cor(3,na200),cor_max_net,jsamax_cor(3,na200),
     5 nobsp_cor(2),irec_cor(2,na200),resoc_cor(2,na200,2),
     6 fil_cor(2,3,na200,3000),cross_cor(na200,3,1000),
     7 freq_tau_cor(na200),wwp_cor(na200),wws_cor(na200),
     8 trvp_cor(2,na200),trvs_cor(2,na200),psa_cor(na200),
     9 ssa_cor(na200),tpsa_cor(na200),tssa_cor(na200),
     1 po1a(na200),po2a(na200),so1a(na200),so2a(na200),
     2 nobss_cor(2),resava(na200,2),nc_erra(na200,2),
     3 nc_crossa(na200,2),res_cross_ava(na200,2),
     3 irec_stna(na200),sec_froma(na200),ndata_stna(na200),
     4 res_av_oc(na200,2),nc_av_oc(na200,2),nok_diff(na200,2),
     5 nok_cor(2,na200,2),nc_oka(na200,2),nok_ka(na200,2),
     5 per_max,ser_max,per_min,ser_min,travp_dd(na200),travs_dd(na200),
     6 nc_theoa(na200,2),sd_theoa(na200,2),nsol_all(na200,2),
     7 iflag_repa(na200,2),nc_removea(na200,2)
      parameter (meq30=30)
      parameter (meqcomp=30)
      parameter (nmem_meq=20000)
       common /c_rataa/nsol_sela(na200,2),k1a(na200,2),
     1 t_sela(na200,2,10),rat_sela(na200,2,10),ratm_sela(na200,2,10),
     1 ratb_sela(na200,2,10),ratf_sela(na200,2,10),tamax3a(na200,2,3),
     1 rathvs_sela(na200,10),kk_banda(na200,2),k1_ansa(10),k1s_ansa(10),
     9 po_freqa(na200,4),so_freqa(na200,4),ratp_freqa(na200,4),
     1 rats_freqa(na200,4)  
     
      common /c_meq_fp_sn/nsol_meqa(meq30,na200,2),
     1 k1a_meqa(meq30,na200,2),tamax3a_meqa(meq30,na200,2,3),
     2 kk_banda_meqa(meq30,na200,2),fp_meqa(meq30,na200),
     3 period_meqa(meq30,na200,2),rise_meqa(meq30,na200,2),
     4 sn_coda_meqa(meq30,na200),po_freq_meqa(meq30,na200,4),
     5 so_freq_meqa(meq30,na200,4),ratp_freq_meqa(meq30,na200,4),
     6 rats_freq_meqa(meq30,na200,4),sn_psfil_meqa(meq30,na200),
     7 tsmin_psfil_meqa(meq30,na200)

      common /c_meq_rataa/t_meqa(meq30,na200,2,10),
     1 rat_meqa(meq30,na200,2,10),ratm_meqa(meq30,na200,2,10),
     2 ratb_meqa(meq30,na200,2,10),ratf_meqa(meq30,na200,2,10),
     1 rathvs_meqa(meq30,na200,10)  
        common /c_branch/kfband,kfbands, nsol_branch(na200),
     1 nsols_branch(na200),tpans_branch(na200,10),rata_branch(na200,10),   
     2 rat_maxa_branch(na200,10),rat_baa_branch(na200,10),
     3 rat_faa_branch(na200,10),tsans_branch(na200,10),
     4 ratas_branch(na200,10),rat_maxas_branch(na200,10),
     5 rat_hvs_branch(na200,10),tmax_branch(na200,10),
     6 tmaxs_branch(na200,10),freq_branch(na200,10),
     7 freqs_branch(na200,10),kfp_branch(na200),kfs_branch(na200),
     8 k1_branch(na200),k1s_branch(na200),sd_ddp,sd_dds,sd_net
      parameter (meq33=200)
       common /c_inv_dd/phi_crossa(meq33),ram_crossa(meq33),
     1 dep_crossa(meq33),sd_crossa(meq33),nobsp_crossa(meq33),
     2 t_crossa(meq33),phi1_crossa(meq33),ram1_crossa(meq33),
     2 dep1_crossa(meq33),nobss_crossa(meq33),po_crossa(meq33,na200),
     3 so_crossa(meq33,na200),wei_crossa(meq33,na200,2),
     4 trav_dd_crossa(meq33,na200,2),res_dd_crossa(meq33,na200,2),
     5 sd_cross0a(meq33),wei_dd_crossa(meq33,na200,2),
     6 nobsp_cross0a(meq33),nobss_cross0a(meq33),res_sakai(na200,2),
     7 nstn_crossa(meq33,na200),av2phi,av2ram,av2dep,sd2_cross,
     8 wei_cross,meqa(meq33),neq_branch,neq_all_cross,sd_all_cross,
     9 err_min,rat_stn_sd2,sd_remove,dl_remove,rat_err_eq,
     9 del_lim_sd,fmag_rm_s  
     
       common /c_event/phi_eva(400000),ram_eva(400000),dep_eva(400000),
     1 fmag_eva(400000),keq_eva(400000),nobsp_eva(400000),
     2 nobss_eva(400000),
     2 sd_eva(400000),neq_eva(400000),neq_all_ev,ps_eva(100,1000,2),
     3 wps_eva(100,1000,2),nstn_eva(100,1000),nobsall_eva(100) 
       character*50 wave_file_eva
       common /c_event_cha/wave_file_eva(400000)
       character*80  pick_dir,trg_dir,event_list,pick_templte_dira,
     1 file_template
       common /c_event_template /pick_dir,trg_dir,event_list,
     1 pick_templte_dira(300),file_template
	 parameter (neq_branch_set=50) 
	parameter (nmax_event=400000)
