[cig-commits] r13475 - in seismo/3D/GRD_CMT3D: cmt3d grid3d scripts
liuqy at geodynamics.org
liuqy at geodynamics.org
Tue Dec 9 08:18:55 PST 2008
Author: liuqy
Date: 2008-12-09 08:18:55 -0800 (Tue, 09 Dec 2008)
New Revision: 13475
Added:
seismo/3D/GRD_CMT3D/scripts/cp_data.bash
Modified:
seismo/3D/GRD_CMT3D/cmt3d/INVERSION.PAR
seismo/3D/GRD_CMT3D/cmt3d/cmt3d_constants.f90
seismo/3D/GRD_CMT3D/grid3d/GRID3D.PAR
seismo/3D/GRD_CMT3D/grid3d/grid3d_constants.f90
seismo/3D/GRD_CMT3D/grid3d/grid3d_sub2.f90
seismo/3D/GRD_CMT3D/scripts/cp_syn_all.bash
seismo/3D/GRD_CMT3D/scripts/plot_data_and_syn.pl
Log:
add scripts for data and synthetics transfter
increase data maxpts limit
set the default values for INVERSION.PAR
Modified: seismo/3D/GRD_CMT3D/cmt3d/INVERSION.PAR
===================================================================
--- seismo/3D/GRD_CMT3D/cmt3d/INVERSION.PAR 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/cmt3d/INVERSION.PAR 2008-12-09 16:18:55 UTC (rev 13475)
@@ -1,12 +1,12 @@
CMTSOLUTION
CMTSOLUTION_NEW
6 -- npar : number of parameters inverted
-0.0025 1.0 1.0e22 -- ddelta,ddepth,dmoment
+0.01 0.02 1.0e22 -- ddelta,ddepth,dmoment
flexwin.out
.true. -- weigh_data_files
-2 2 1 0 1.15 0.55 0.78 -- weights of data comp, az(exp), dist(exp)
+2 2 1 0.5 1.15 0.55 0.78 -- weights of data comp, az(exp), dist(exp)
.true. -- station_correction
-.true. .true. 0.0 -- zero_trace, double_couple, lambda_damping
+.true. .false. 0.0 -- zero_trace, double_couple, lambda_damping
.false. -- write_new_syn
Note:
Modified: seismo/3D/GRD_CMT3D/cmt3d/cmt3d_constants.f90
===================================================================
--- seismo/3D/GRD_CMT3D/cmt3d/cmt3d_constants.f90 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/cmt3d/cmt3d_constants.f90 2008-12-09 16:18:55 UTC (rev 13475)
@@ -34,10 +34,10 @@
integer, parameter :: NDATAMAX = 30000
! maximum number of records (NRECMAX < NWINMAX)
- integer, parameter :: NRECMAX = 500
+ integer, parameter :: NRECMAX = 1200
! maximum number of windows
- integer, parameter :: NWINMAX = 1000
+ integer, parameter :: NWINMAX = 1800
! number of pars for moment only
integer, parameter :: NM = 6
Modified: seismo/3D/GRD_CMT3D/grid3d/GRID3D.PAR
===================================================================
--- seismo/3D/GRD_CMT3D/grid3d/GRID3D.PAR 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/grid3d/GRID3D.PAR 2008-12-09 16:18:55 UTC (rev 13475)
@@ -2,9 +2,9 @@
1.0e22 -- dmoment
flexwin.out
.true. -- weigh_data_files
-2 2 1 0 1.15 0.55 0.78 -- weights of data comp, az(exp), dist(exp)
+2 2 1 0.5 1.15 0.55 0.78 -- weights of data comp, az(exp), dist(exp)
.true. 6.0 -- station_correction
-.false. 3 -- global_search, ncalc (=1 if local search)
+.true. 3 -- global_search, ncalc (=1 if local search)
0 180 10
0 90 10
-180 180 20
Modified: seismo/3D/GRD_CMT3D/grid3d/grid3d_constants.f90
===================================================================
--- seismo/3D/GRD_CMT3D/grid3d/grid3d_constants.f90 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/grid3d/grid3d_constants.f90 2008-12-09 16:18:55 UTC (rev 13475)
@@ -17,13 +17,13 @@
integer, parameter :: NMEC_MAX=NMW_MAX*NST_MAX*NDIP_MAX*NRAKE_MAX
! maximum number of records (NRECMAX < NWINMAX)
- integer, parameter :: NRECMAX = 500
+ integer, parameter :: NRECMAX = 1200
! maximum number of files/windows
- integer, parameter :: NWINMAX=1000
+ integer, parameter :: NWINMAX = 1800
! maximum number of data points
- integer, parameter :: NDATAMAX=10000
+ integer, parameter :: NDATAMAX=30000
! number of pars for moment only
integer, parameter :: NM = 6
Modified: seismo/3D/GRD_CMT3D/grid3d/grid3d_sub2.f90
===================================================================
--- seismo/3D/GRD_CMT3D/grid3d/grid3d_sub2.f90 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/grid3d/grid3d_sub2.f90 2008-12-09 16:18:55 UTC (rev 13475)
@@ -276,6 +276,7 @@
if (global_search) filename=trim(filename)//'.'//char(icalc+48)
min_misfit=minval(misfit(1:n_total))
+ print *, 'minimum misfit value = ', min_misfit
if (abs(min_misfit) > 10*tiny(1.0)) then
misfit = misfit/min_misfit
else
Added: seismo/3D/GRD_CMT3D/scripts/cp_data.bash
===================================================================
--- seismo/3D/GRD_CMT3D/scripts/cp_data.bash (rev 0)
+++ seismo/3D/GRD_CMT3D/scripts/cp_data.bash 2008-12-09 16:18:55 UTC (rev 13475)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+# this program tars the data that has already been collected by Carl
+if [ $# != 1 ]; then
+ echo "Usage: cp_data.bash evid-file"; exit
+fi
+
+dir=/net/sierra/raid1/carltape/socal/socal_3D/DATA/FINAL
+
+for evid in `cat $1`; do
+ mkdir -p $evid/data; cd $evid/data
+ echo " == $evid ==="
+ ssh wagholi.gps.caltech.edu "cd $dir/$evid; tar cjvf ~/data_${evid}.tar.bz *.sac >/dev/null "
+ scp lqy at wagholi.gps.caltech.edu:data_${evid}.tar.bz .
+ ssh wagholi.gps.caltech.edu "rm -f data_${evid}.tar.bz"
+ tar xjvf data_${evid}.tar.bz; mv data_${evid}.tar.gz ../backup
+ cd ../..
+done
Property changes on: seismo/3D/GRD_CMT3D/scripts/cp_data.bash
___________________________________________________________________
Name: svn:executable
+ *
Modified: seismo/3D/GRD_CMT3D/scripts/cp_syn_all.bash
===================================================================
--- seismo/3D/GRD_CMT3D/scripts/cp_syn_all.bash 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/scripts/cp_syn_all.bash 2008-12-09 16:18:55 UTC (rev 13475)
@@ -1,20 +1,20 @@
#!/bin/bash
-# this program copies over the synthetics from wagholi and untar them and set them up for cmt3d and grid3d inversions
-
if [ $# != 1 ]; then
echo "Usage: cp_syn.bash evid-file"; exit
fi
cluster="lqy@$wag:/net/wagholi/scratch1/lqy/CMT3D_Basin_Adjoint/cmt_mass/"
-extra_dir="_rerun"
+extra_dir="_5.6km"
for evid in `cat $1 `; do
mkdir -p ${evid}${extra_dir};
+## copy sem syn from cluster
cd ${evid}${extra_dir}; mkdir -p syn; mkdir -p backup
scp $cluster/${evid}${extra_dir}/* syn/
cp syn/CMTSOLUTION .; cp ../event_info/STATIONS .
+
cp ../event_info/MEASUREMENT_WINDOWS_${evid}_T00?_T030_m12 .
## here check if MEASURE file has the right number of data/syn pairsa
mafile="MEASUREMENT_WINDOWS_${evid}_ALL"
@@ -35,7 +35,7 @@
perl -pi -e "s/\.semd\.sac\.m12//g" $mfile
awk 'NR > 1 {print $0}' $mfile >> $mafile
nm0=`head -n 1 $mfile`
- nma=`echo $nm0 + $nma | bc `
+ nma=`echo $nm0 + $nma | bc `
rm -f $mfile
done
## here to link cmt3d/grid3d_flexwin
@@ -46,8 +46,14 @@
cp ../../grd_cmt3d/grid3d/GRID3D.PAR .
perl -pi -e "s/flexwin\.out/$mafile/g" INVERSION.PAR
cp INVERSION.PAR INVERSION.PAR.SAVE
+ perl -pi -e "s/flexwin\.out/$mafile/g" GRID3D.PAR
## make sure you have the right dmoment, ddepth, and dlocation
- perl -pi -e "s/flexwin\.out/$mafile/g" GRID3D.PAR
+ dlat=`diff -b syn/CMTSOLUTION syn/CMTSOLUTION_lat | grep lat | awk '{print $3}' | perl -pi -e 's/\n/ /g' | awk '{print $2-$1}'`
+ ddep=`diff -b syn/CMTSOLUTION syn/CMTSOLUTION_dep | grep dep | awk '{print $3}' | perl -pi -e 's/\n/ /g' | awk '{print $2-$1}'`
+ perl -pi -e "s/^.*1.0e22*/$dlat $ddep 1.0e22/" INVERSION.PAR
+ perl -pi -e "s/^.*1.0e22*/$dlat $ddep 1.0e22/" GRID3D.PAR
+
+## right number of measurements
echo $nma | cat - $mafile > out.tmp; mv out.tmp $mafile
## Unzip synthetics
cd syn
Modified: seismo/3D/GRD_CMT3D/scripts/plot_data_and_syn.pl
===================================================================
--- seismo/3D/GRD_CMT3D/scripts/plot_data_and_syn.pl 2008-12-09 10:59:41 UTC (rev 13474)
+++ seismo/3D/GRD_CMT3D/scripts/plot_data_and_syn.pl 2008-12-09 16:18:55 UTC (rev 13475)
@@ -33,7 +33,8 @@
else {$syn_ext="";}}
} else {die("Input -M or -d/-s options\n");}
-if ($opt_m) {$cmt_file=$opt_m;}
+if ($opt_m) {$cmt_file=$opt_m;} else {die("Input cmt file \n");}
+($moment) = split(" ",` cmtsol2faultpar.pl $cmt_file | awk 'NR == 3 {print \$3}'`);
# comps
$ncols=3; @comps=("Z","R","T");#Z R T
@@ -51,7 +52,8 @@
$Vl=3.0; # surface wave velocity to determine tend
$bp=10; $bp2=10;# start time before t1 header and end time after tend
$E="-Ent1"; # align by trace number and t1
- at size_all=(0.03,0.03,0.06); # this may have to be adjusted according to Mw
+ at size_all=(0.03/2.4e23*$moment,0.03/2.4e23*$moment,0.06/2.4e23*$moment);
+print "plot sizes = @size_all \n";
$wdata="-W3/0/0/0"; $wsyn="-W2/255/0/0"; $gwin="-G220 -W3";
$jxy_map="-X3 -Y8"; $JM="-JM3";
@@ -156,7 +158,7 @@
$az=sprintf("%5.2f",$file{$stas[$k]}{az});
$tex_file.="$tt3 $kt1 8 0 4 LM $stas[$k] $dist\n$tt3 $kt2 8 0 4 LM $az\n";
$stla=$file{$stas[$k]}{stla}; $stlo=$file{$stas[$k]}{stlo};
- $stla2=$stla+0.1;
+# $stla2=$stla+0.1;
$xy_file.="$stlo $stla\n";
$t_file.="$stlo $stla 7 0 4 CB $stas[$k]\n";
}
@@ -211,4 +213,4 @@
close(BASH);
-#system("chmod a+x plot_ds.bash; plot_ds.bash");
+system("chmod a+x plot_ds.bash; plot_ds.bash");
More information about the CIG-COMMITS
mailing list