[cig-commits] r14598 - seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot
carltape at geodynamics.org
carltape at geodynamics.org
Sun Apr 5 16:08:26 PDT 2009
Author: carltape
Date: 2009-04-05 16:08:26 -0700 (Sun, 05 Apr 2009)
New Revision: 14598
Modified:
seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl
seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl
seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl
Log:
Updated seismogram plotting scripts.
Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl 2009-04-05 04:05:59 UTC (rev 14597)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis.pl 2009-04-05 23:08:26 UTC (rev 14598)
@@ -96,23 +96,23 @@
#---------------------------
# ADDITIONAL USER INPUT
-$iplot_win = 1; # plot windows
-$iplot_dTlabel = 1; # plot CC measurement for dT
+$iplot_win = 0; # plot windows
+$iplot_dTlabel = 0; # plot CC measurement for dT
$iplot_dAlabel = 0; # plot CC measurement for dlnA
$iplot_sigma = 0;
$dTfsize = 9;
-$imap = 1; # plot map
+$imap = 0; # plot map
$ifault = 1; # plot faults (southern California)
$ilims = 0; # plot limits next to axis label
$iletter = 0; # plot a letter for a publication figure
-$letter = "B";
+$letter = "b";
$sdX = 4.5; $sdY = 1.4; $origin = "-X2.25 -Y5.5";
$labfsize = 10; # font size for model tag (e.g., "Z-m16")
$tpen = "1.0p";
$fpen = "1.0p";
-$pen = "1.5p"; # KEY: line thickness for seismograms
+$pen = "1.0p"; # KEY: line thickness for seismograms (1.5 for slides, 1.0 for figures)
$scale = 1.2; # KEY: scaling for plotting seismograms
# time ticks for seismograms
@@ -128,7 +128,7 @@
#$iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "D"; $pen = "1p"; # 14383980
#$iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p"; $scale = 1.0; # 14179736
#$iplot_win = 1; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p"; $scale = 1.0; # 9703873
-##$iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p"; $scale = 1.0; # 14383980
+#$iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p"; $scale = 1.0; # 14383980
#$iplot_win = 0; $iplot_dTlabel = 0; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p"; $scale = 1.0; $ttick1 = 10; $ttick2 = 2; # 9818433
#---------------------------
@@ -170,7 +170,7 @@
`gmtset BASEMAP_TYPE plain PAPER_MEDIA letter ANNOT_FONT_SIZE = 9p LABEL_FONT_SIZE = 9p PAGE_ORIENTATION = landscape PLOT_DEGREE_FORMAT D FRAME_PEN $fpen TICK_PEN $tpen`;
#$name = "${sta}_${net}_win_adj_${klab}";
-$name = "${eid}_${Ttag}_${sta}_${net}_${smodel1}_seis_${nseis}";
+$name = "${eid}_${Ttag}_${sta}_${net}_${smodel1}_iwin${iplot_win}_seis_${nseis}";
if($imap==1) {$name = "${name}_map";}
$ps_file = "$name.ps";
$jpg_file = "$name.jpg";
@@ -436,7 +436,7 @@
# windows and measurements: vertical component
$nzline=`grep -n \"$Zsyn\" $winfile | awk -F: '{ print \$1 }'`;
chomp($nzline);
- #print "$nzline\n";
+ #print "-- Zsyn -- $Zsyn -- nzline -- $nzline --\n"; die("TESTING");
if ($nzline) {
$nline=$nzline;
$nline=$nline+1;
Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl 2009-04-05 04:05:59 UTC (rev 14597)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_all.pl 2009-04-05 23:08:26 UTC (rev 14598)
@@ -13,11 +13,11 @@
# plot_seis_all.pl -t 6/30 m00 m99
#
# Using multi:
-# plot_seis_all.pl -t 6/30 m16 m04 m01 m00 m99 # science paper 9983429 - DAN (new)
-# plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00 # science paper 9983429 - DAN (old)
-# plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00 m99 # science paper 9983429 - DAN (full)
-# plot_seis_all.pl -t 6/30 m16 m00 m99 # science paper 9983429 - DAN
-# plot_seis_all.pl -t 6/30 m16 # science paper 14179736
+# plot_seis_all.pl -t 6/30 m16 m04 m01 m00 m99 # nature paper 9983429 - DAN (new)
+# plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00 # nature paper 9983429 - DAN (old)
+# plot_seis_all.pl -t 6/30 m16 m08 m04 m01 m00 m99 # nature paper 9983429 - DAN (full)
+# plot_seis_all.pl -t 6/30 m16 m00 m99 # nature paper 9983429 - DAN
+# plot_seis_all.pl -t 6/30 m16 # nature paper 14179736
#
#-----------------------------------
@@ -52,15 +52,17 @@
#-------------------------------------------
# USER INPUT
+$dir0 = "/home/carltape/SOCAL_ADJOINT";
+
# directory containing all CMTSOLUTION files
$slab = "16";
-$dir_src = "/net/sierra/raid1/carltape/results/SOURCES/socal_${slab}";
+$dir_src = "${dir0}/results/SOURCES/socal_${slab}";
$dir_cmt = "${dir_src}/v${slab}_files";
if (not -e $dir_src) {die("check if dir_src $dir_src exist or not\n")}
if (not -e $dir_cmt) {die("check if dir_cmt $dir_cmt exist or not\n")}
# list of event IDs to use
-$file_eid0 = "/net/sierra/raid1/carltape/results/EID_LISTS/syn_run_m16";
+$file_eid0 = "${dir0}/results/EID_LISTS/syn_run_m16";
if (not -f ${file_eid0}) {die("check if file_eid ${file_eid0} exist or not\n")}
# FULL stations file
@@ -68,8 +70,8 @@
if (not -f ${file_stations0}) {die("check if file_stations ${file_stations0} exist or not\n")}
# data and synthetics directories
-$dir_data0 = "/net/sierra/raid1/carltape/socal/socal_3D/DATA/FINAL";
-$dir_syn0 = "/net/sierra/raid1/carltape/socal/socal_3D/SYN";
+$dir_data0 = "${dir0}/DATA/FINAL";
+$dir_syn0 = "${dir0}/SYN";
if (not -e ${dir_data0}) {die("check if dir_data ${dir_data0} exist or not\n")}
if (not -e ${dir_syn0}) {die("check if dir_syn ${dir_syn0} exist or not\n")}
for ($kk = 1; $kk <= $nmod; $kk++) {
@@ -79,7 +81,7 @@
}
# directory containing the output for windows, measurements, adjoint sources, etc
-$dir_run = "/net/sierra/raid1/carltape/socal/socal_3D/RUNS";
+$dir_run = "${dir0}/RUNS";
if (not -e ${dir_run}) {die("check if dir_run ${dir_run} exist or not\n")}
#-------------------------------------------
@@ -122,12 +124,15 @@
# 14096196 WGR CI 20/100
# 14096196 SCI2 CI 90/180
# 14096196 SMM CI 0/70
-#$finput = "plot_seis_input";
+
+$finput = "plot_seis_input";
#$finput = "plot_seis_input_reflection";
-$finput = "plot_seis_input_science";
+#$finput = "plot_seis_input_science";
+#$finput = "plot_seis_input_anisotropy";
-if (not -f $finput) {die("check if finput $finput exist or not\n")}
-open(IN,"$finput"); @flines = <IN>; close(IN);
+$fileinput = "INPUT/$finput";
+if (not -f $fileinput) {die("check if fileinput $fileinput exist or not\n")}
+open(IN,"$fileinput"); @flines = <IN>; close(IN);
$nseis = @flines;
print "$nseis seismograms in input file\n";
@@ -142,12 +147,9 @@
#=============================================
# GENERATE GMT FIGURES
-
-#------------------------------------------------
-
$imin = 1; $imax = $nseis;
#$imin = 1; $imax = 10;
-$imin = 5; $imax = $imin;
+$imin = 8; $imax = $imin;
if($imin > $nseis) {die("imin is larger than nseis");}
@@ -173,10 +175,16 @@
for ($kk = 1; $kk <= $nmod; $kk++) {
# check window and measurement files
$smodel = $smodels[$kk-1];
+ $mdir = "${smodel}";
- if($smodel eq "m00") {$mdir = "${smodel}_SAVE";} else {$mdir = "${smodel}";} # KEY FOR NOW
- #if($smodel eq "m16") {$mdir = "${smodel}_SMM_reflection";} else {$mdir = "${smodel}";}
- #if($smodel eq "m16") {$mdir = "${smodel}_RVR_all";} else {$mdir = "${smodel}";}
+ if($smodel eq "m00") {$mdir = "${smodel}_SAVE";} # KEY FOR NOW
+ if(0==1) {
+ #if($smodel eq "m16") {$mdir = "${smodel}_DAN_all";}
+ #if($smodel eq "m16") {$mdir = "${smodel}_RVR_all";}
+ if($smodel eq "m16") {$mdir = "${smodel}_EDW2_all";}
+ #if($smodel eq "m16") {$mdir = "${smodel}_SMM_reflection";}
+ }
+ print "$kk -- $smodel -- $mdir --\n";
$winfile = "${dir_run}/${eid}/${mdir}/WINDOW_${Ttag}/MEASUREMENT_WINDOWS_${eid}_${Ttag}_${smodel}";
$measfile = "${dir_run}/${eid}/${mdir}/MEASURE_${Ttag}/${eid}_${Ttag}_${smodel}_window_chi";
@@ -190,7 +198,7 @@
if (not -e $syndir) {die("check if syndir $syndir exist or not\n")}
`ln -s $syndir/*$sta*BHZ* SYN`; `ln -s $syndir/*$sta*BHR* SYN`; `ln -s $syndir/*$sta*BHT* SYN`;
}
- #print "-- @smodels --\n-- @winfiles --\n-- @measfiles --\n";
+ print "-- @smodels --\n-- @winfiles --\n-- @measfiles --\n";
# link the data into the temporary directory
$datadir = "${dir_data0}/${eid}/PROCESSED/PROCESSED_${Ttag}";
@@ -198,6 +206,8 @@
`ln -s $datadir/*$sta*BHZ* DATA`; `ln -s $datadir/*$sta*BHR* DATA`; `ln -s $datadir/*$sta*BHT* DATA`;
`ln -s $datadir/*$sta*HHZ* DATA`; `ln -s $datadir/*$sta*HHR* DATA`; `ln -s $datadir/*$sta*HHT* DATA`;
+ #$lcut = "0/260";
+
# KEY: plot 1, 2, or 3 sets of ZRT seismograms with map
`plot_seis.pl -m $cmtfile -n $stanet -l $lcut -a $stafile -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles`;
#print CSH "plot_seis.pl -m $cmtfile -n $stanet -l $lcut -a $stafile -d DATA -s SYN -i ${eid}/${Ts} @smodels @winfiles @measfiles\n";
@@ -209,7 +219,7 @@
}
close(CSH);
-print "csh -f $cshfile\n";
+#print "csh -f $cshfile\n";
#system("csh -f $cshfile");
#================================================
Modified: seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl
===================================================================
--- seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl 2009-04-05 04:05:59 UTC (rev 14597)
+++ seismo/3D/ADJOINT_TOMO/iterate_adj/misfit_plot/plot_seis_multi.pl 2009-04-05 23:08:26 UTC (rev 14598)
@@ -113,10 +113,10 @@
elsif ($trange < 100 && $trange > 60) {$ttick1 = 10; $ttick2 = 10;}
else {$ttick1 = 10; $ttick2 = 2;}
-# science paper figure
-$sdY = 1.0; $iplot_win = 1; $iplot_dTlabel = 1; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "B"; $pen = "1p";
+# nature paper figure
+$sdY = 1.0; $iplot_win = 1; $iplot_dTlabel = 1; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 1; $letter = "b"; $pen = "1p";
-# science cover
+# simple version
#$sdY = 1.0; $iplot_win = 0; $iplot_dTlabel = 1; $iplot_dAlabel = 0; $iplot_sigma = 0; $iletter = 0; $pen = "1p";
#---------------------------
More information about the CIG-COMMITS
mailing list