cd ~
. .4ag
Utility |
converts |
example |
procag2kal |
day-of-year to month-day | procag ... | procag2kal |
procag2jd |
day-of-year to Julian | procag ... | procag2jd |
procag2h |
dates to hours after epoch |
procag ... | procag2h -D 2014,05,28 |
tsf-kal2dy | dates to decimal years | cat *.tsf | tsf-kal2dy |
Top level = TD/a/ |
IfE-2009-11/ IfE-2014-05/ Recalc2014/ ... Original data |
Alldrops/ Drop files
|
Allsets/ Set and project files
|
Allsmp/ Processing files
|
Allcamps/ Analysis and Result files |
Directories |
result of unzip per campaign as needed |
PS/ plot
d/ data tmp/ o/ output tsfo/ final msets/ own sets.txt per project msets/d/ raw for concatenation msets/b/ bundled t/ urtapm dumps |
|||
Symlinks |
symlinks to original data sources, *.drop.txt |
symlinks to original data sources, *.set.txt, *.project.txt |
prl2tse
-> ~/Ttide/SCG/+ campaigns.lst -> ../Allsmp/+ |
||
Data files |
.tar, .zip |
*.drop.smp *.*-drift.tsf |
|||
Control files |
*.drop.smp.tse remdc.tse wmean.tse |
urtap-*.ins agreduct.tse allties.tse autoset.tse diff-*.tse synth-*.tse weed.tse msets/msets-<campaign>.tse |
|||
File catalogs and lists |
project-files.lst |
files.lst bundles.lst 1) campaigns.lst dropfiles.lst |
cdumps.lst (temporary) files.lst (temporary) campaigns.lst -> ../Allsmp/+ features-MJD.lst 2) meters.lst mc-files.lst orientations.lst project-dates.lst equivalent-sets.lst 3) drop-symlinks.lst 4) smp-symlinks.lst 4) |
||
Programs All programs should either reside in ~/TD/a/bin or should have symlinks there. At least their path should be in the $path shell variable. There are a few exceptions: scgts4ag |
add-campaign |
procag.pl (symlink in ~/bin) |
agsmp2mc*)
make-drift-tsf*) make-s-and-j-tsf mc4campaigns pf-of-project *) please no symlink in bin/ |
analyse-mc bundle cal-wmean calplot calplot-sop evaluate-b+s evaluate-tp-by-project final-analysis final-results4plot list-features list-project-dates MJD-tp make-mc-files-list make-outlier-mc make-own-sets make-scg-rms make-urtap-ins pf-of-project plot-cal-results plot-final-results plot-project plot-all-projects plot-all-sets plot-merged-residuals plot-tp prl2tse -> ~/Ttide/SCG/+ procag.pl (symlink in ~/bin) produce-ag project-from-to project-times project-times2tse ps-add-platform redtp slope-bars4plot the-campaign-of the-dropfiles the-drop.smp-files the-meter-of the-orientation-of the-platform-of the-project-files tp-index-of-project tplist tplist-project tp2tsf vary-bias-and-slopes |
Part 1 What is / are...? |
||
drop files .drop.txt |
They result from analysis of each single mass
drop, comprise all drops within a project. |
|
set files .set.txt |
time and measurements. One set comprises /
averages over a series of drops, typically 50 |
|
project files .project.txt |
Parameters and information |
|
a project |
a succession of sets No move of instrument within a project |
|
a campaign |
several projects within a time period of days
to weeks. The original data should be put into a directory
under ~/TD/a , e.g. ~/TD/a/IfE-2014-05 Campaign names should be a common substring in all file names, e.g. 201502b The association with drop, set and project files is defined in a file named campaigns.lst If the original .txt-file names run month names instead if numbers, it is advisable to create symlinks with dates in the form YYYYMMDD. There is some flexibility with the rest of the file name, b ut not too much should be expected. A functioning file name in campaign 200907a may e.g. be Onsala_AC_20090706b_1.drop.txt |
|
platform and orientation codes |
Due to limitations in urtap, the
least-squares program, the platform cannot have more than
two characters. In order to signify bias terms with a
four-letter word, one character is needed for orientation
and one to enumerate the list, AAN3 .
The slope terms are not depending on platform nor
orientation, so that the are named SLOn
|
|
Part 2 File name extensions... |
What's in the files? |
ASCII Binary |
txt |
after project. , set.
, drop. , original result files from g-software |
A |
tse |
instructions for tsf-edit, a subroutine e.g.
in tslist |
A |
tsi |
instructions for tsf-edit without a leader
and a trailing END, biding their time for import
into a complete tse-file. Use wraptse if the
instructions form a complete set. |
A |
ts mc |
binary time series files, one component
(column) multi-column |
B |
tsf |
time series files, irregular sampling
intervals possible yyyy mm dd hhh mm ss fff data data ... :: comment |
A |
prl |
Result sheet from tide least-squares program
urtapt |
A |
ins | instruction files for (almost all of my)
Fortran main programs |
A |
drop.smp |
tsf-files from drop files, regularized
sampling interval yyyy mm dd hhh mm ss fff jul : SCG-obs :: AG-obs AG-sigma |
A |
mkdir ~/TD/a/LM-201606!!! You'll get a number of lst-files in a/Allcamps/ marked with the campaign name.
cp <files> ~/TD/a/LM-201606cd ~/TD/a
add-campaign 201606a FG5-233 LM-201606
source <file>.csh # according to the report
cd /TD/a!!! end
project-times <yyyymm> >! Allcamps/project-dates-<campaign>.lst
project-times -J <yyyymn> >> Allcamps/project-dates-<campaign>.lst
cd ~/TD/a/Allsmp
pprocag <drop-files> # e.g. pprocag ../Alldrops/Onsala_??_2018*.drop.txt
source run_procag.csh
cd ~/TD/a/AllsmpFor creation of .drop.smp and .drop.smp.tse -files,
cp files.lst files.lst-bup#n
cd ~/TDand this is for GGP-filter corrected files:
scgts4ag -new <campaign> -O a/Allsmp -sigma -n -S %.smp.tse a/Alldrops/*A?_201304*.drop.txt
lpf-unbessel -N -GO -C <campaign>
cp tmp/G1_g_<yymm>*-1s.ts lpfu/
scgts4ag -new <campaign> -O a/Allsmp-s -SCG lpfu/G1_g_%%%%%%-1s.ts -E NONE -L NONE -f -sigma -n -S %.smp.tse \
`the-dropfiles -D <campaign>`
OBS! There seem to be offsets from one G1_g_ file to the next. We must adjust them.and binary mc-files containing the data from SCG and AG (skip the `-%Pยด if you have more than one platform)
lpf-unbessel has been built out to this end (2017-07-17). Test the result using
check-overlap-dc lpfu/G1_g_201707*-1s.ts
agsmp2mc -O a/Allsmp -o AGSG_201304a_%N-%P-%I-%O a/Allsmp/*A?_2013042*.drop.smp(if there are multiple campaigns that match the filename expression, add the campaign's id-letter, a or b or ... ) like here:
agsmp2mc -O a/Allsmp -o AGSG_201405a_%N-%P-%I-%O a/Allsmp/*A?_201405*a.drop.smpIf you have created lpf-unbessel'ed files, use instead
agsmp2mc -O a/Allsmp-s -C 201502b -DY -o AGSG_201502b_s_%N-%P-%I-%O \If the drift series has been created in a subdir, like here DSYN , use the -DD option:
a/Allsmp-s/A?_20150204*.drop.smp \
a/Allsmp-s/A?_20150205*.drop.smp \
a/Allsmp-s/A?_20150206*.drop.smp \
a/Allsmp-s/A?_20150207*.drop.smp \
a/Allsmp-s/A?_20150209*.drop.smp \
a/Allsmp-s/A?_2015021*.drop.smp
# obs! drop.smp-files must be in temporal order
# You may use `the-dropfiles -S 201502b`
agsmp2mc -O a/Allsmp-s -C 201707a -DY -DD a/Allcamps/d/DSYN/ -dt LIST -o AGSG_201707a_%N-%P-%I-%O `the-dropfiles -S 201707a`and you're ready for calibration with urtapt. The instruction file urtap-cal201304a.ins would contain
ln -s ../../Allsmp-s/AGSG_201707a_2P-AA-FG5-233-S-5s.mc AGSG_201707a_FG5-233-5s.mcIf you want to explore the impact of low-pass filtering the SCG, generate parallel mc-files, like here for 201106a:
agsmp2mc -O a/Allsmp-s -C 201106a -DY -DD a/Allcamps/d/DSYN/ -dt 1 -o AGSG_201106a_s_%N-%P-%I-%O `the-dropfiles -S 201106a`
agsmp2mc -O a/Allsmp -C 201106a -DY -DD a/Allcamps/d/DSYN/ -dt 1 -o AGSG_201106a_s_%N-%P-%I-%O `the-dropfiles -S -d a/Allsmp 201106a`
mc4campaignsand warrant consistent file names using the .lst -catalogues.
cd a/Allsmp/etc.
ln -s AA_2009Nov03a.drop.smp AA_20091103a.drop.smp
cd ~/TDcollects SCG 1s-data in synch with the AG drop files.; and a file catalogue, files.lst
scgts4ag -O a/Allcamps/d/ -fl files-new.lst -sigma -t -n -S - a/Alldrops/*.drop.txt
Cataloging files and projectsThis box explains the hand-work to be done for
cataloging. If you have used the add-campaign procedure cd ~/TD/a/AllsmpMake a copy of the files.lst (a/Allsmp) Update campaigns.lst (a/Allsmp) and edit in lines of the following kind #C 201004a AGSG_201004a_%I AS_2010Apr17a.drop.smp AS_2010Apr17b.drop.smp ... ^-- Campaign ^--- mc-filename stub ^----input files... all those files you want to combine for a campaign. You may have help from the file a/Allcamps/files.lst Once the campaign's drop files are processed, add the information to a/Allsmp/dropfiles.lstin temporal order; example: 201606a Onsala_AC_20160627a.dropFor all campaigns: set campaigns = ( `awk '/^#C /{print $2}' ../Allcamps/campaigns.lst | sort | uniq` )Edit this as required. Then in a/Allcamps add orientations to the file orientations.lst Sometimes a one-liner can help: cd ~/TD/a/Allsetsand in meters.lst (a/Allcamps) #M records and %P records Finally, update project-dates.lst (a/Allcamps/ , manually editing in the output of cd ~/TD/a/Allsmp |
cd ~/Ttide/SCGWhere the CONT command is used, check that the file has been renewed recently, and that the urtap solution was successful.
prl2tse -S+ o/g090615-OPNEND-1h-atmw.prl >! /home/hgs/TD/DSYNTH-drift.tsi
setenv DSYNTH_TSI /home/hgs/TD/DSYNTH-drift.tsi
cd ~/TD/a/Allsmp-salt.
make-drift-tsf [-DY] -O dest-dir/ *<yyyymm>*.drop.smp.tse
make-drift-tsf [-DY] -CY -O dest-dir/ *<yyyymm>*.drop.smp.tsealt.
make-drift-tsf -DY -CY -O ../Allcamps/d/ `the-dropfiles -x .smp.tse <campaign>`most actual (three drift solutions in one AGSG*.mc -file):
tslist _$nhours -B2009,06,15 -r1 -Emake-drift-tsf,DWWFSYNTH -I -o ~/TD/a/Allcamps/d/synth-drift-extd.tsof which this one ...
tslist _$nhours -B2009,06,15 -r1 -Emake-drift-tsf,EXPF -I -o ~/TD/a/Allcamps/d/synth-drift-expfit.ts
cd ~/Ttide/SCG...uses the latest weekly solution with local barometer.
prl2tse -S+ o/g090615-OPNEND-1h-atm.prl > ! ~/TD/a/Allcamps/d/g090615-OPNEND-1h-atm-drft.tsi
setenv DSYNTH_TSI ~/TD/a/Allcamps/d/g090615-OPNEND-1h-atm-drft.tsi
cd ~/TD/a/Allsmp-s
tslist _$nhours -B2009,06,15 -r1 -Emake-drift-tsf,DSYNTH -I -o ~/TD/a/Allcamps/d/synth-drift-simp.ts
make-drift-tsf -DY -from synth-drift-extd.ts -CY -O ../Allcamps/d/DWWF/ `the-dropfiles -d ../Allsmp-s -x .smp.tse <campaign>`which will create samples of the SCG drift model in synch with the drop.smp-files
make-drift-tsf -DY -from synth-drift-simp.ts -CY -O ../Allcamps/d/DSYN/ `the-dropfiles -d ../Allsmp-s -x .smp.tse <campaign>`
make-drift-tsf -DY -from synth-drift-expfit.ts -CY -O ../Allcamps/d/EXPF/ `the-dropfiles -d ../Allsmp-s -x .smp.tse <campaign>`
the-dropfiles -x .smp.tse <campaign>
Prefer to add the check-up option -CY whether the old syn-drift.ts file is long enough.All of that and much of the following can be carried out with a super-script, urtap-merge-pp
If not,
cd ~/Ttide/SCGand copy to ~/TD/a/Allcamps/d/synth-drift.ts if the file is o.k.
tslist _#n -B2009,6,15 -r1 -Emake-drift-tsf,SYNTH -I -o ~/TD/a/Allcamps/d/synth-drift-new.ts
Replace SYNTH with DSYNTH or DWWFSYNTH to base drift on the most recent open-end solution of the weekly SCG analyses, standard or extended solution, respectively.
mc4campaigns -DYwhich will run a full series of agsmp2mc , one for each #C line in campaigns.lst .
mc4campaigns -DY <DVAR> [-DD ../Allcamps/d/DSYN/ ] -C <campaign>where the -DY option asks to use the "synthetic" drift files (from TSF EDIT-recipes inside the make-drift-tsf script).
scgts4ag -GO -new 201405a -f -O a/Allsmp-s -ilp -sigma -n -S %.smp.tse a/Alldrops/*A?_201405*a.drop.txtMost actual:
cd a/Allsmp
mc4campaigns -DY -smpdir ../Allsmp-s -dt 5 -C 201405a
mc4campaigns -DY DWWF -smpdir ../Allsmp-s -dt 5 -DD ../Allcamps/d/DWWF/ -C <campaign>The latter one is most probable to extend through a campaign, since its creation is most independent of acquired model data.
mc4campaigns -U -DY EXPF -smpdir ../Allsmp-s -dt 5 -DD ../Allcamps/d/EXPF/ -C <campaign>
mc4campaigns -U -DY DSYN -smpdir ../Allsmp-s -dt 5 -DD ../Allcamps/d/DSYN/ -C <campaign>
cd ~/TD/a/Allcampsand manually update mc-files.lst
cp mc-files.lst mc-files.lst-bup#n
make-mc-files-list -o mc-files.lst $campaigns
mc4campaigns -dt p -DY -C <campaign>or, if Allcamps/campaigns.lst holds the information in a #D -record
mc4campaigns -dt LIST -DY -C <campaign>However, if the mc-data is to be combined with seismometer records where missing-records and precision to the second matter,
make-urtap-ins -C <campaign> -with-drift -outliers-from-rawor, to fetch the mc-file name from mc-files.lst rather than from the jump-file(s), like in campaign 201502b,
make-urtap-ins -C <campaign> -mc-from-list -with-drift-var SYNT -outliers-from-raw -include =where we also specify a drift signal (SYNT) and allow only bias parameters in the signal model.
ls *$campaign[n]*.drop.smp | awk '{print "%O",$1}'Then you can run
urtapt @ urtap-<campaign>.insor if you dare
foreach i ( urtap*.ins )
urtap-outlit $i
end
Branch here to urtapm.html for a multi-campaign analysis The sequel here continues with single campaigns |
cal-wmean [-d]where the -d option makes cal-wmean more talkative.
evaluate-b+s <campaign>Then you can collect the outlier data (for showing them on the calplot)
evaluate-b+s -b <campaign>
make-outlier-mc `awk '/^#C /{print $2}' campaigns.lst`producing e.g. o/AGSG_200907a_FG5-233-10s-del.mc for campaign 200907a
make-outlier-mc $campaigns
plot-cal-results [-scg-rms] [-with-outliers] <campaign>But let's continue with calplot . The bias-and-slope solution that
project-times2tse -do-cutout -o o/cutout $campaignsHave a look at the tse-files produced; use setenv to set variables to appropriate
setenv CUTOUT o/cutoutFinally, you can plot
foreach c ( $campaigns )
tslist o/scg-cal-$c.ph01.ts -E o/cutout-$c.tse,CUTOUT -I
end
setenv PNGOUT ~/www/4me/ag2014/Extra settings are needed for e.g. 201004a
calplot -sj -cal -del d/AGSG_200907a_FG5-233-10s.mc
setenv WEEDOUT 3000Examining the bias-and-slope files:
set c=201004a
calplot +LEG C:8.8,4.0 -sj REMDC -pfs -cal -del d/`the-mc-file-for $c`
prl2tse -XB 1 -S o/scg-cal-201405a.prl BPS0 >! synth.tseor by a script:
prl2tse -XB -1 -S o/scg-cal-201405a.prl BMS0 >> synth.tse
prl2tse -XS 1 -S o/scg-cal-201405a.prl B0SP >> synth.tse
prl2tse -XS -1 -S o/scg-cal-201405a.prl B0SM >> synth.tse
prl2tse -S o/scg-cal-201405a.prl B0S0 >> synth.tse
vary-bias-and-slopes $campaignsEverything from the above starting with urtap in a one-size-fits-all approach can be done with
foreach c ( $campaigns )(sorry, can analyse-mc with plotting only one campaign at a time)
analyse-mc -S -C -PP $c
end
long-time-movrms -hshows all necessary steps.
tslist d/AGSG_200907a_FG5-233-10s.mc -LA -LA -E autoset.tse,A -C3with autoset.tse
TSF EDIT AAnother example, subtracting the SCG:
OPEN 31 < set.ts
AUTOSLMEAN U=6 ->W G=5.
; = use weights, print results ASCII to protocol, gap width=5*dt,
; then copy the result into the W-array and output:
DUMPW U=31
END
setenv FUNIT 11and converting dates to hours from midnight of day 1:
setenv OPEN22 '; '
setenv FNSUBLABEL 'S+V'
setenv FACSUB 774.16
tslist d/AGSG_201405b_FG5-220-4P-05s.mc -LA -LA -keep-open \
-E subts.tse,ADDVL -E autoset.tse,A -C3 -qqq -w tmp/A-S-201405b-autoset.tsf
awk '{print ($7-56805)*24,substr($0,32)}' tmp/A-S-201405b-autoset.tsf
produce-ag -results -weighted-means -with-slopes $campaignswhich amounts to the same using -results defaults.
prodcue-ag -results $campaigns
foreach c ( $campaigns )
final-analysis -add 380. -S -I tsfo $c
end
final-results4plot -I tsfo > tsfo/final-results.tbl
plot-final-results
make-mc-files-list $campaigns
setenv REPORT msets/msets
setenv MSETSADDG 380.
foreach c ( $campaigns )procag commands with their and our sets:
project-times2tse -S -C 'AUTOSLMEAN U=32' -C+ '${FFMT:[+TSF]} ->W ${WOPT} G=${GOPT:[1000.]} ' -o msets/msets $c
end
setenv DELCOMMAND RJC
setenv DELTHRESH 200.
foreach c ( $campaigns )
produce-ag -own-sets msets/ -weighted-means -with-slopes -use-gaplength 5 $c
end
set c = 200911a
produce-ag -own-sets msets/ -weighted-means -with-slopes -use-gaplength 2 $c
foreach c ( $campaigns )
foreach m ( AA AC AS )
echo M=$m C=$c
bundle -by-camp $c -by-monu $m
end
end
bundle -by-monu AC -by-instr FG5-233
bundle -by-monu AA -by-instr FG5-233
bundle -by-monu AA -by-instr FG5-220
bundle -by-monu AC -by-instr FG5-220
procag.pl -o -u -s -r -A -c Gravity -f "%5.2f " $ourSee plot-project how it's used
procag.pl -u -s -r -A -c G_ures -f "%5.2f " $theirs
agsetwmean.pl -q -o -R 0.0 -w msets/b/own-AC-FG5-233.set.txttheir sets:
agsetwmean.pl -q -o -R 0.0 -w msets/b/own-AA-FG5-220.set.txt
agsetwmean.pl -q -u -r -w -A ../Allsets/Onsala_AC*.set.txt
agsetwmean.pl -q -u -r -w -A ../Allsets/AA*.set.txt
plot-project -g 2 msets/b/own-AA-201405a.set.txtThe project plots suggest that we need to account for orientation biases. The respective ADD commands have to be issued inside produce-ag
plot-all-sets -M 233 -P AA__________________________________