@@ -0,0 +1,23 @@
#!/bin/bash
#PBS -A ehetland_flux
#PBS -M hinest@umich.edu
#PBS -N sse-model-2015a
#PBS -m abe
#PBS -V
#PBS -j oe
#PBS -o sse-model-2015a.log
#PBS -q flux
#PBS -l qos=flux
#PBS -l nodes=1:ppn=8,mem=32000mb,walltime=40:00:00
cd $PBS_O_WORKDIR

pygeons reml sse/2015a/data.h5 \
--network-model mat32-se \
--network-params 1.0 0.05 50.0 \
--station-model p0 p1 fogm \
--station-params east 0.63 0.23 \
north 0.44 0.04 \
vertical 11.2 1.15 \
--station-fix 0 1 2 \
-vv &> sse/2015a.log

@@ -0,0 +1,23 @@
#!/bin/bash
#PBS -A ehetland_flux
#PBS -M hinest@umich.edu
#PBS -N sse-model-2016a
#PBS -m abe
#PBS -V
#PBS -j oe
#PBS -o sse-model-2016a.log
#PBS -q flux
#PBS -l qos=flux
#PBS -l nodes=1:ppn=8,mem=32000mb,walltime=40:00:00
cd $PBS_O_WORKDIR

pygeons reml sse/2016a/data.h5 \
--network-model mat32-se \
--network-params 1.0 0.05 50.0 \
--station-model p0 p1 fogm \
--station-params east 0.63 0.23 \
north 0.44 0.04 \
vertical 11.2 1.15 \
--station-fix 0 1 2 \
-vv &> sse/2016a.log

@@ -0,0 +1,23 @@
#!/bin/bash
#PBS -A ehetland_flux
#PBS -M hinest@umich.edu
#PBS -N sse-model-null
#PBS -m abe
#PBS -V
#PBS -j oe
#PBS -o sse-model-null.log
#PBS -q flux
#PBS -l qos=flux
#PBS -l nodes=1:ppn=8,mem=32000mb,walltime=40:00:00
cd $PBS_O_WORKDIR

pygeons reml sse/null/data.h5 \
--network-model mat32-se \
--network-params 1.0 0.05 50.0 \
--station-model p0 p1 fogm \
--station-params east 0.63 0.23 \
north 0.44 0.04 \
vertical 11.2 1.15 \
--station-fix 0 1 2 \
-vv &> sse/null.log

@@ -0,0 +1,74 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2010a/data.h5
units : m
stations : 103
times : 93
observations : 26563
time range : 2010-07-01, 2010-10-01
longitude range : -125.541641065, -120.005200237
latitude range : 45.0222796408, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CHZZ, CPXX, CSHQ
CSHR, GOBS, KELS, KTBW, LINH, LKCP, NANO
NEAH, P064, P065, P395, P396, P397, P398
P399, P400, P401, P402, P403, P404, P405
P406, P407, P408, P409, P410, P411, P412
P413, P414, P415, P416, P417, P418, P419
P420, P421, P423, P424, P425, P426, P427
P428, P429, P430, P431, P432, P434, P435
P436, P437, P438, P439, P440, P441, P442
P443, P444, P445, P446, P448, P687, P688
P689, P690, P691, P692, P693, P694, P695
P696, P697, P698, P699, P700, P701, P702
P703, P704, P705, P791, P792, P815, P816
PABH, PCOL, PUPU, SC00, SC02, SC03, SC04
SEAT, SEDR, TPW2, TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2010a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2010a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2010a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 6.7813e-01, 4.0033e-02, 8.3244e+01
optimal north parameters : 5.2145e-01, 5.4980e-02, 9.8612e+01
optimal vertical parameters : 2.6912e+00, 4.3017e-03, inf
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 47242.9295656
north : 45488.9017391
vertical : 35277.5789768
output file : sse/2010a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,24 @@
#!/bin/bash
#PBS -A ehetland_flux
#PBS -M hinest@umich.edu
#PBS -N foo
#PBS -m abe
#PBS -V
#PBS -j oe
#PBS -o foo.log
#PBS -q flux
#PBS -l qos=flux
#PBS -l nodes=1:ppn=8,mem=32000mb,walltime=40:00:00
cd $PBS_O_WORKDIR

pygeons fit data.h5 \
--network-model mat32-se \
--network-params east 6.7813e-01 4.0033e-02 8.3244e+01 \
north 5.2145e-01 5.4980e-02 9.8612e+01 \
vertical 2.6912e+00 4.3017e-03 inf \
--station-model p0 p1 fogm \
--station-params east 6.3000e-01 2.3000e-01 \
north 4.4000e-01 4.0000e-02 \
vertical 1.1200e+01 1.1500e+00 \
-vv

@@ -0,0 +1,70 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2011a/data.h5
units : m
stations : 76
times : 93
observations : 17906
time range : 2011-05-01, 2011-08-01
longitude range : -124.061887515, -120.005200237
latitude range : 43.6143111943, 46.9509248272
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, GOBS, KELS
NEWP, P063, P065, P366, P367, P373, P374
P375, P376, P377, P378, P379, P383, P384
P385, P387, P389, P395, P396, P397, P398
P404, P405, P406, P407, P408, P409, P410
P411, P412, P414, P415, P417, P420, P421
P425, P427, P428, P429, P431, P432, P445
P446, P448, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P791, P792, PMAR, REDM, SC00, TPW2

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2011a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2011a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2011a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 7.9837e-01, 6.9219e-02, 8.4381e+01
optimal north parameters : 5.5963e-01, 6.1904e-02, 7.8921e+01
optimal vertical parameters : 2.2654e+00, 2.8782e-03, 1.4138e+09
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 32026.6256723
north : 31033.4199135
vertical : 24227.4546977
output file : sse/2011a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,73 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2011b/data.h5
units : m
stations : 94
times : 93
observations : 23946
time range : 2011-07-01, 2011-10-01
longitude range : -125.541641065, -120.005200237
latitude range : 45.5379932138, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
GOBS, KELS, KTBW, LINH, LKCP, NANO, NEAH
P064, P065, P397, P398, P399, P400, P401
P402, P403, P405, P407, P408, P409, P410
P411, P413, P414, P415, P416, P417, P418
P419, P420, P421, P423, P424, P425, P426
P429, P430, P431, P432, P434, P435, P436
P437, P438, P439, P440, P441, P442, P443
P444, P445, P446, P448, P687, P688, P689
P690, P691, P692, P693, P694, P695, P696
P697, P698, P699, P700, P701, P702, P703
P704, P705, P792, P815, P816, PABH, PCOL
PUPU, SC00, SC02, SC03, SC04, SEAT, SEDR
TPW2, TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2011b/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2011b/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2011b/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 6.9042e-01, 3.1016e-02, 9.1486e+01
optimal north parameters : 6.4422e-01, 4.0037e-02, 1.0469e+02
optimal vertical parameters : 1.8134e+00, 2.4001e-03, 1.1902e+45
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 42332.0089225
north : 40703.7863503
vertical : 31524.457469
output file : sse/2011b/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,72 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2012a/data.h5
units : m
stations : 85
times : 93
observations : 21162
time range : 2012-08-01, 2012-11-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.0301218658, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KELS, KTBW, LINH, LKCP, NANO, NEAH, P064
P065, P397, P398, P399, P400, P401, P402
P403, P408, P410, P413, P415, P416, P417
P418, P419, P420, P421, P423, P424, P425
P426, P430, P431, P432, P434, P435, P436
P437, P438, P439, P440, P441, P442, P443
P444, P446, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P792, P815, P816, PABH, PCOL, PUPU, SC00
SC02, SC03, SC04, SEAT, SEDR, TPW2, TWHL
UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2012a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2012a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2012a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 8.0774e-01, 2.1384e-02, 1.2001e+02
optimal north parameters : 4.2933e-01, 1.0149e-02, 2.2662e+02
optimal vertical parameters : 1.9086e+00, 4.4359e-03, inf
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 37770.5776515
north : 36058.4240551
vertical : 28097.9403979
output file : sse/2012a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,74 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2013a/data.h5
units : m
stations : 100
times : 121
observations : 31261
time range : 2013-02-01, 2013-06-01
longitude range : -124.557151446, -120.005200237
latitude range : 43.6143111943, 47.9698466543
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, GOBS, KELS
KTBW, LINH, LKCP, NEWP, P063, P064, P065
P366, P367, P373, P374, P375, P376, P377
P378, P379, P383, P384, P385, P387, P389
P395, P396, P397, P398, P399, P400, P401
P402, P404, P405, P406, P407, P408, P409
P410, P411, P412, P414, P415, P416, P417
P418, P419, P420, P421, P423, P424, P425
P426, P427, P428, P429, P430, P431, P432
P434, P445, P446, P448, P687, P688, P689
P690, P691, P692, P693, P694, P695, P696
P697, P698, P699, P700, P701, P702, P703
P704, P705, P791, P792, P815, P816, PABH
PCOL, PMAR, PUPU, REDM, SC00, SC03, SEAT
TPW2, TWHL

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2013a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2013a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2013a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 1.4107e+00, 1.2885e-01, 3.7202e+01
optimal north parameters : 1.0003e+00, 1.3682e-01, 9.4921e+01
optimal vertical parameters : 3.1893e+00, 4.5411e-03, inf
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 55308.1345892
north : 53914.8681381
vertical : 42224.9272609
output file : sse/2013a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,68 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2013b/data.h5
units : m
stations : 58
times : 124
observations : 19553
time range : 2013-07-01, 2013-11-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.5318563355, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KTBW, LINH, LKCP, NANO, NEAH, P064, P065
P398, P399, P400, P401, P402, P403, P413
P415, P416, P417, P418, P419, P420, P421
P423, P424, P426, P430, P431, P432, P434
P435, P436, P437, P438, P439, P440, P441
P442, P443, P444, P815, P816, PABH, PCOL
PUPU, SC00, SC02, SC03, SC04, SEAT, SEDR
TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2013b/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2013b/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2013b/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 7.1081e-01, 6.7200e-02, 9.0908e+01
optimal north parameters : 8.8448e-01, 1.0586e-01, 5.1336e+01
optimal vertical parameters : 4.3938e+00, 7.0642e-03, 1.9508e+09
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 34987.6778876
north : 33255.6135559
vertical : 25727.3255091
output file : sse/2013b/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,68 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2014a/data.h5
units : m
stations : 58
times : 93
observations : 15055
time range : 2014-10-01, 2015-01-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.5318563355, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KTBW, LINH, LKCP, NANO, NEAH, P064, P065
P398, P399, P400, P401, P402, P403, P413
P415, P416, P417, P418, P419, P420, P421
P423, P424, P426, P430, P431, P432, P434
P435, P436, P437, P438, P439, P440, P441
P442, P443, P444, P815, P816, PABH, PCOL
PUPU, SC00, SC02, SC03, SC04, SEAT, SEDR
TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2014a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2014a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2014a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 8.0920e-01, 4.7641e-02, 9.9472e+01
optimal north parameters : 5.6591e-01, 4.4335e-02, 8.3460e+01
optimal vertical parameters : 3.8411e+00, 3.2686e-03, inf
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 26543.2881302
north : 25221.9957535
vertical : 19598.1428679
output file : sse/2014a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,72 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2015a/data.h5
units : m
stations : 85
times : 122
observations : 24201
time range : 2015-11-01, 2016-03-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.0301218658, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KELS, KTBW, LINH, LKCP, NANO, NEAH, P064
P065, P397, P398, P399, P400, P401, P402
P403, P408, P410, P413, P415, P416, P417
P418, P419, P420, P421, P423, P424, P425
P426, P430, P431, P432, P434, P435, P436
P437, P438, P439, P440, P441, P442, P443
P444, P446, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P792, P815, P816, PABH, PCOL, PUPU, SC00
SC02, SC03, SC04, SEAT, SEDR, TPW2, TWHL
UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2015a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2015a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2015a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 8.8747e-01, 3.2867e-02, 5.8870e+01
optimal north parameters : 7.1425e-01, 5.7151e-02, 6.0809e+01
optimal vertical parameters : 4.4343e+00, 4.8260e-03, 6.7898e+40
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 42186.4118293
north : 40755.2977194
vertical : 32302.2899183
output file : sse/2015a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,71 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2016a/data.h5
units : m
stations : 84
times : 123
observations : 25033
time range : 2015-12-01, 2016-04-01
longitude range : -124.409289752, -120.005200237
latitude range : 43.0903283712, 46.9509248272
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, DDSN, GOBS
KELS, NEWP, P062, P063, P065, P364, P365
P366, P367, P369, P371, P373, P374, P375
P376, P377, P378, P379, P382, P383, P384
P385, P387, P389, P395, P396, P397, P398
P404, P405, P406, P407, P408, P409, P410
P411, P412, P414, P415, P417, P420, P421
P425, P427, P428, P429, P431, P432, P445
P446, P448, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P732, P791, P792, PMAR, REDM, SC00, TPW2

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2016a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2016a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2016a/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 1.4155e+00, 6.1730e-02, 4.2549e+01
optimal north parameters : 6.6288e-01, 5.5091e-02, 6.5394e+01
optimal vertical parameters : 5.0995e+00, 6.2997e-03, 3.2057e+03
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 43707.4245959
north : 42854.808193
vertical : 33666.8562829
output file : sse/2016a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,48 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/null/data.h5
units : m
stations : 96
times : 121
observations : 30046
time range : 2015-01-01, 2015-05-01
longitude range : -124.557151446, -120.005200237
latitude range : 44.0521190341, 47.9698466543
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, GOBS, KELS
KTBW, LINH, LKCP, NEWP, P063, P064, P065
P367, P374, P375, P376, P377, P378, P379
P383, P384, P385, P387, P395, P396, P397
P398, P399, P400, P401, P402, P404, P405
P406, P407, P408, P409, P410, P411, P412
P414, P415, P416, P417, P418, P419, P420
P421, P423, P424, P425, P426, P427, P428
P429, P430, P431, P432, P434, P445, P446
P448, P687, P688, P689, P690, P691, P692
P693, P694, P695, P696, P697, P698, P699
P700, P701, P702, P703, P704, P705, P791
P792, P815, P816, PABH, PCOL, PUPU, REDM
SC00, SC03, SEAT, TPW2, TWHL

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/null/data.h5
network :
model : mat32-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/null/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,123 @@
#!/usr/bin/env python
import numpy as np
from pygeons.io.parser import _get_field
from pygeons.main.gpstation import fogm
import os
import matplotlib.pyplot as plt
np.random.seed(0)

names = ['2010a','2011a','2011b','2012a','2013a','2013b','2014a','2015a','2016a']
files = ['sse/%s/data.reml.txt' % i for i in names]


params0 = {'east':[],'north':[],'vertical':[]}
params1 = {'east':[],'north':[],'vertical':[]}

for f in files:
buff = open('%s' % f,'r')
content = buff.read()
buff.close()
content = content[content.find('REML RESULTS'):]
content = content[content.find('network :'):]
units = _get_field('parameter units',content).strip().split(',')
for dir in ['east','north','vertical']:
params = _get_field('optimal %s parameters' % dir,content).strip().split(',')
params0[dir] += [float(params[0])]
params1[dir] += [float(params[1])]

east_p0 = params0['east']
north_p0 = params0['north']
vertical_p0 = params0['vertical']
east_p1 = params1['east']
north_p1 = params1['north']
vertical_p1 = params1['vertical']

stats_box = {'facecolor':'w','alpha':0.8,'boxstyle':'round','edgecolor':'0.8'}

fig,axs = plt.subplots(3,2,figsize=(7,6))

axs[0][0].hist(east_p0,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(east_p0),) + tuple(np.percentile(east_p0,[25,75])))
axs[0][0].text(0.55,0.68,text,transform=axs[0][0].transAxes,bbox=stats_box)
axs[0][0].grid(c='0.5',alpha=0.5)
axs[0][0].set_ylabel('count')
axs[0][0].set_xlabel('east [%s]' % units[0])


axs[1][0].hist(north_p0,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(north_p0),) + tuple(np.percentile(north_p0,[25,75])))
axs[1][0].text(0.55,0.68,text,transform=axs[1][0].transAxes,bbox=stats_box)
axs[1][0].grid(c='0.5',alpha=0.5)
axs[1][0].set_ylabel('count')
axs[1][0].set_xlabel('north [%s]' % units[0])

axs[2][0].hist(vertical_p0,5,color='C0',alpha=0.8)
text = 'median : %.1f\nIQR : %.1f - %.1f' % ((np.median(vertical_p0),) + tuple(np.percentile(vertical_p0,[25,75])))
axs[2][0].text(0.55,0.68,text,transform=axs[2][0].transAxes,bbox=stats_box)
axs[2][0].grid(c='0.5',alpha=0.5)
axs[2][0].set_ylabel('count')
axs[2][0].set_xlabel('vertical [%s]' % units[0])


axs[0][1].hist(east_p1,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(east_p1),) + tuple(np.percentile(east_p1,[25,75])))
axs[0][1].text(0.55,0.68,text,transform=axs[0][1].transAxes,bbox=stats_box)
axs[0][1].grid(c='0.5',alpha=0.5)
axs[0][1].set_ylabel('count')
axs[0][1].set_xlabel('east [%s]' % units[1])

axs[1][1].hist(north_p1,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(north_p1),) + tuple(np.percentile(north_p1,[25,75])))
axs[1][1].text(0.55,0.68,text,transform=axs[1][1].transAxes,bbox=stats_box)
axs[1][1].grid(c='0.5',alpha=0.5)
axs[1][1].set_ylabel('count')
axs[1][1].set_xlabel('north [%s]' % units[1])

axs[2][1].hist(vertical_p1,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(vertical_p1),) + tuple(np.percentile(vertical_p1,[25,75])))
axs[2][1].text(0.55,0.68,text,transform=axs[2][1].transAxes,bbox=stats_box)
axs[2][1].grid(c='0.5',alpha=0.5)
axs[2][1].set_ylabel('count')
axs[2][1].set_xlabel('vertical [%s]' % units[1])
fig.tight_layout()

plt.show()

## plot samples of the median noise models
#fig,ax = plt.subplots(3,1,figsize=(7,6))
#
#dt = 1.0/365.25
#time = np.arange(0.0,7.0,dt)
#
#gp = fogm(np.median(east_p0),np.median(east_p1),convert=False)
#sample = gp.sample(time[:,None])
#ax[0].plot(time,sample,'C0')
#sample = gp.sample(time[:,None])
#ax[0].plot(time,sample,'C1')
#ax[0].grid(c='0.5',alpha=0.5)
#ax[0].set_xlabel('time [yr]')
#ax[0].set_ylabel('easting [mm]')
#
#gp = fogm(np.median(north_p0),np.median(north_p1),convert=False)
#sample = gp.sample(time[:,None])
#ax[1].plot(time,sample,'C0')
#sample = gp.sample(time[:,None])
#ax[1].plot(time,sample,'C1')
#ax[1].grid(c='0.5',alpha=0.5)
#ax[1].set_xlabel('time [yr]')
#ax[1].set_ylabel('northing [mm]')
#
#gp = fogm(np.median(vertical_p0),np.median(vertical_p1),convert=False)
#sample = gp.sample(time[:,None])
#ax[2].plot(time,sample,'C0')
#sample = gp.sample(time[:,None])
#ax[2].plot(time,sample,'C1')
#ax[2].grid(c='0.5',alpha=0.5)
#ax[2].set_xlabel('time [yr]')
#ax[2].set_ylabel('vertical [mm]')
#
#fig.tight_layout()
#
#plt.show()
#
#
@@ -120,3 +120,18 @@ pygeons crop data.final.h5 \
--max-lon -120.0 \
--output-stem sse/2016a/data \
-vv


# null (no signal present)
# lat : 44.0 - 48.0
# date : 2015-01-01 - 2015-05-01
mkdir -p sse/null
pygeons crop data.final.h5 \
--start-date 2015-01-01 \
--stop-date 2015-05-01 \
--min-lat 44.0 \
--max-lat 48.0 \
--max-lon -120.0 \
--output-stem sse/null/data \
-vv

@@ -0,0 +1,23 @@
#!/bin/bash
#PBS -A ehetland_flux
#PBS -M hinest@umich.edu
#PBS -N sse-model-null
#PBS -m abe
#PBS -V
#PBS -j oe
#PBS -o sse-model-null.log
#PBS -q flux
#PBS -l qos=flux
#PBS -l nodes=1:ppn=8,mem=32000mb,walltime=40:00:00
cd $PBS_O_WORKDIR

pygeons reml sse/null/data.h5 \
--network-model se-se \
--network-params 1.0 0.05 50.0 \
--station-model p0 p1 fogm \
--station-params east 0.63 0.23 \
north 0.44 0.04 \
vertical 11.2 1.15 \
--station-fix 0 1 2 \
-vv &> sse/null.log

@@ -47,3 +47,28 @@ station :
output file : sse/2010a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2010a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 5.4581e-01, 2.2458e-02, 8.0226e+01
optimal north parameters : 4.0964e-01, 2.9630e-02, 9.2756e+01
optimal vertical parameters : 2.5274e+00, 2.5836e-03, 4.6480e+14
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 47235.6306888
north : 45488.0069006
vertical : 35273.4390089
output file : sse/2010a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,15 @@
#!/bin/bash
#PBS -A ehetland_flux
#PBS -M hinest@umich.edu
#PBS -N foo
#PBS -m abe
#PBS -V
#PBS -j oe
#PBS -o foo.log
#PBS -q flux
#PBS -l qos=flux
#PBS -l nodes=1:ppn=8,mem=32000mb,walltime=40:00:00
cd $PBS_O_WORKDIR

pygeons fit data.h5 --network-model se-se --network-params east 5.4581e-01 2.2458e-02 8.0226e+01 north 4.0964e-01 2.9630e-02 9.2756e+01 vertical 2.5274e+00 2.5836e-03 4.6480e+14 --station-model p0 p1 fogm --station-params east 6.3000e-01 2.3000e-01 north 4.4000e-01 4.0000e-02 vertical 1.1200e+01 1.1500e+00 -vv

@@ -43,3 +43,28 @@ station :
output file : sse/2011a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2011a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 5.8705e-01, 3.2743e-02, 8.3706e+01
optimal north parameters : 5.0086e-01, 4.3579e-02, 6.9857e+01
optimal vertical parameters : 2.2245e+00, 2.1871e-03, 6.8109e+29
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 32027.457103
north : 31034.6234966
vertical : 24227.0852551
output file : sse/2011a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,73 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2011b/data.h5
units : m
stations : 94
times : 93
observations : 23946
time range : 2011-07-01, 2011-10-01
longitude range : -125.541641065, -120.005200237
latitude range : 45.5379932138, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
GOBS, KELS, KTBW, LINH, LKCP, NANO, NEAH
P064, P065, P397, P398, P399, P400, P401
P402, P403, P405, P407, P408, P409, P410
P411, P413, P414, P415, P416, P417, P418
P419, P420, P421, P423, P424, P425, P426
P429, P430, P431, P432, P434, P435, P436
P437, P438, P439, P440, P441, P442, P443
P444, P445, P446, P448, P687, P688, P689
P690, P691, P692, P693, P694, P695, P696
P697, P698, P699, P700, P701, P702, P703
P704, P705, P792, P815, P816, PABH, PCOL
PUPU, SC00, SC02, SC03, SC04, SEAT, SEDR
TPW2, TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2011b/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2011b/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2011b/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 6.7029e-01, 3.2997e-02, 6.5896e+01
optimal north parameters : 4.9731e-01, 1.9975e-02, 9.6266e+01
optimal vertical parameters : 1.7949e+00, 1.9497e-03, 5.7448e+15
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 42317.1305716
north : 40697.985862
vertical : 31524.1559297
output file : sse/2011b/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,72 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2012a/data.h5
units : m
stations : 85
times : 93
observations : 21162
time range : 2012-08-01, 2012-11-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.0301218658, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KELS, KTBW, LINH, LKCP, NANO, NEAH, P064
P065, P397, P398, P399, P400, P401, P402
P403, P408, P410, P413, P415, P416, P417
P418, P419, P420, P421, P423, P424, P425
P426, P430, P431, P432, P434, P435, P436
P437, P438, P439, P440, P441, P442, P443
P444, P446, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P792, P815, P816, PABH, PCOL, PUPU, SC00
SC02, SC03, SC04, SEAT, SEDR, TPW2, TWHL
UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2012a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2012a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2012a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 6.3857e-01, 1.2033e-02, 1.0597e+02
optimal north parameters : 4.1398e-01, 3.1677e-02, 9.1781e+01
optimal vertical parameters : 1.8320e+00, 2.9998e-03, 1.3620e+63
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 37748.4543851
north : 36047.4676273
vertical : 28096.5503792
output file : sse/2012a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,74 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2013a/data.h5
units : m
stations : 100
times : 121
observations : 31261
time range : 2013-02-01, 2013-06-01
longitude range : -124.557151446, -120.005200237
latitude range : 43.6143111943, 47.9698466543
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, GOBS, KELS
KTBW, LINH, LKCP, NEWP, P063, P064, P065
P366, P367, P373, P374, P375, P376, P377
P378, P379, P383, P384, P385, P387, P389
P395, P396, P397, P398, P399, P400, P401
P402, P404, P405, P406, P407, P408, P409
P410, P411, P412, P414, P415, P416, P417
P418, P419, P420, P421, P423, P424, P425
P426, P427, P428, P429, P430, P431, P432
P434, P445, P446, P448, P687, P688, P689
P690, P691, P692, P693, P694, P695, P696
P697, P698, P699, P700, P701, P702, P703
P704, P705, P791, P792, P815, P816, PABH
PCOL, PMAR, PUPU, REDM, SC00, SC03, SEAT
TPW2, TWHL

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2013a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2013a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2013a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 9.3125e-01, 6.2648e-02, 3.4869e+01
optimal north parameters : 5.4966e-01, 5.4323e-02, 8.4869e+01
optimal vertical parameters : 2.9739e+00, 2.7544e-03, 1.2638e+15
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 55295.1903023
north : 53918.2859473
vertical : 42222.1578836
output file : sse/2013a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,68 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2013b/data.h5
units : m
stations : 58
times : 124
observations : 19553
time range : 2013-07-01, 2013-11-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.5318563355, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KTBW, LINH, LKCP, NANO, NEAH, P064, P065
P398, P399, P400, P401, P402, P403, P413
P415, P416, P417, P418, P419, P420, P421
P423, P424, P426, P430, P431, P432, P434
P435, P436, P437, P438, P439, P440, P441
P442, P443, P444, P815, P816, PABH, PCOL
PUPU, SC00, SC02, SC03, SC04, SEAT, SEDR
TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2013b/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2013b/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2013b/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 5.7797e-01, 3.6067e-02, 8.9528e+01
optimal north parameters : 5.9135e-01, 4.7370e-02, 4.9205e+01
optimal vertical parameters : 3.9946e+00, 3.9247e-03, 1.6162e+08
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 34986.8809611
north : 33254.0719243
vertical : 25717.8007269
output file : sse/2013b/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,68 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2014a/data.h5
units : m
stations : 58
times : 93
observations : 15055
time range : 2014-10-01, 2015-01-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.5318563355, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KTBW, LINH, LKCP, NANO, NEAH, P064, P065
P398, P399, P400, P401, P402, P403, P413
P415, P416, P417, P418, P419, P420, P421
P423, P424, P426, P430, P431, P432, P434
P435, P436, P437, P438, P439, P440, P441
P442, P443, P444, P815, P816, PABH, PCOL
PUPU, SC00, SC02, SC03, SC04, SEAT, SEDR
TWHL, UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2014a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2014a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2014a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 6.7028e-01, 2.9864e-02, 9.0948e+01
optimal north parameters : 5.0476e-01, 3.0799e-02, 7.4431e+01
optimal vertical parameters : 3.7110e+00, 2.3043e-03, 3.3744e+237
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 26541.0488073
north : 25222.2982239
vertical : 19597.2271548
output file : sse/2014a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,72 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2015a/data.h5
units : m
stations : 85
times : 122
observations : 24201
time range : 2015-11-01, 2016-03-01
longitude range : -125.541641065, -120.149583683
latitude range : 46.0301218658, 49.2948104293
station names : ALBH, BAMF, BLYN, CHWK, CPXX, CSHQ, CSHR
KELS, KTBW, LINH, LKCP, NANO, NEAH, P064
P065, P397, P398, P399, P400, P401, P402
P403, P408, P410, P413, P415, P416, P417
P418, P419, P420, P421, P423, P424, P425
P426, P430, P431, P432, P434, P435, P436
P437, P438, P439, P440, P441, P442, P443
P444, P446, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P792, P815, P816, PABH, PCOL, PUPU, SC00
SC02, SC03, SC04, SEAT, SEDR, TPW2, TWHL
UCLU

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2015a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2015a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2015a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 7.6429e-01, 1.9952e-02, 5.5402e+01
optimal north parameters : 5.8566e-01, 3.2234e-02, 5.6866e+01
optimal vertical parameters : 4.2988e+00, 2.5037e-04, 1.1574e+232
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 42167.8284142
north : 40753.934349
vertical : 32255.9081963
output file : sse/2015a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,71 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/2016a/data.h5
units : m
stations : 84
times : 123
observations : 25033
time range : 2015-12-01, 2016-04-01
longitude range : -124.409289752, -120.005200237
latitude range : 43.0903283712, 46.9509248272
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, DDSN, GOBS
KELS, NEWP, P062, P063, P065, P364, P365
P366, P367, P369, P371, P373, P374, P375
P376, P377, P378, P379, P382, P383, P384
P385, P387, P389, P395, P396, P397, P398
P404, P405, P406, P407, P408, P409, P410
P411, P412, P414, P415, P417, P420, P421
P425, P427, P428, P429, P431, P432, P445
P446, P448, P687, P688, P689, P690, P691
P692, P693, P694, P695, P696, P697, P698
P699, P700, P701, P702, P703, P704, P705
P732, P791, P792, PMAR, REDM, SC00, TPW2

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/2016a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/2016a/data.reml.txt

--------------------------------------------------------------

-------------------- PYGEONS REML RESULTS --------------------

input file : sse/2016a/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
optimal east parameters : 1.1477e+00, 3.5659e-02, 3.9909e+01
optimal north parameters : 5.6851e-01, 3.3572e-02, 6.2108e+01
optimal vertical parameters : 4.4207e+00, 3.0654e-03, 5.2269e+211
station :
model : p0 p1 fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
optimal east parameters : 6.3000e-01, 2.3000e-01
optimal north parameters : 4.4000e-01, 4.0000e-02
optimal vertical parameters : 1.1200e+01, 1.1500e+00
log likelihood :
east : 43700.121586
north : 42854.2652741
vertical : 33655.5839283
output file : sse/2016a/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,48 @@

------------------ PYGEONS DATA INFORMATION ------------------

file : sse/null/data.h5
units : m
stations : 96
times : 121
observations : 30046
time range : 2015-01-01, 2015-05-01
longitude range : -124.557151446, -120.005200237
latitude range : 44.0521190341, 47.9698466543
station names : CHZZ, CORV, CPXX, CSHQ, CSHR, GOBS, KELS
KTBW, LINH, LKCP, NEWP, P063, P064, P065
P367, P374, P375, P376, P377, P378, P379
P383, P384, P385, P387, P395, P396, P397
P398, P399, P400, P401, P402, P404, P405
P406, P407, P408, P409, P410, P411, P412
P414, P415, P416, P417, P418, P419, P420
P421, P423, P424, P425, P426, P427, P428
P429, P430, P431, P432, P434, P445, P446
P448, P687, P688, P689, P690, P691, P692
P693, P694, P695, P696, P697, P698, P699
P700, P701, P702, P703, P704, P705, P791
P792, P815, P816, PABH, PCOL, PUPU, REDM
SC00, SC03, SEAT, TPW2, TWHL

--------------------------------------------------------------

---------------- PYGEONS REML RUN INFORMATION ----------------

input file : sse/null/data.h5
network :
model : se-se
parameter units : mm, yr, km
fixed parameters :
initial east parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial north parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
initial vertical parameters : 1.0000e+00, 5.0000e-02, 5.0000e+01
station :
model : p0, p1, fogm
parameter units : mm/yr^0.5, yr^-1
fixed parameters : 0, 1, 2
initial east parameters : 6.3000e-01, 2.3000e-01
initial north parameters : 4.4000e-01, 4.0000e-02
initial vertical parameters : 1.1200e+01, 1.1500e+00
output file : sse/null/data.reml.txt

--------------------------------------------------------------
@@ -0,0 +1,123 @@
#!/usr/bin/env python
import numpy as np
from pygeons.io.parser import _get_field
from pygeons.main.gpstation import fogm
import os
import matplotlib.pyplot as plt
np.random.seed(0)

names = ['2010a','2011a','2011b','2012a','2013a','2013b','2014a','2015a','2016a']
files = ['sse/%s/data.reml.txt' % i for i in names]


params0 = {'east':[],'north':[],'vertical':[]}
params1 = {'east':[],'north':[],'vertical':[]}

for f in files:
buff = open('%s' % f,'r')
content = buff.read()
buff.close()
content = content[content.find('REML RESULTS'):]
content = content[content.find('network :'):]
units = _get_field('parameter units',content).strip().split(',')
for dir in ['east','north','vertical']:
params = _get_field('optimal %s parameters' % dir,content).strip().split(',')
params0[dir] += [float(params[0])]
params1[dir] += [float(params[1])]

east_p0 = params0['east']
north_p0 = params0['north']
vertical_p0 = params0['vertical']
east_p1 = params1['east']
north_p1 = params1['north']
vertical_p1 = params1['vertical']

stats_box = {'facecolor':'w','alpha':0.8,'boxstyle':'round','edgecolor':'0.8'}

fig,axs = plt.subplots(3,2,figsize=(7,6))

axs[0][0].hist(east_p0,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(east_p0),) + tuple(np.percentile(east_p0,[25,75])))
axs[0][0].text(0.55,0.68,text,transform=axs[0][0].transAxes,bbox=stats_box)
axs[0][0].grid(c='0.5',alpha=0.5)
axs[0][0].set_ylabel('count')
axs[0][0].set_xlabel('east [%s]' % units[0])


axs[1][0].hist(north_p0,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(north_p0),) + tuple(np.percentile(north_p0,[25,75])))
axs[1][0].text(0.55,0.68,text,transform=axs[1][0].transAxes,bbox=stats_box)
axs[1][0].grid(c='0.5',alpha=0.5)
axs[1][0].set_ylabel('count')
axs[1][0].set_xlabel('north [%s]' % units[0])

axs[2][0].hist(vertical_p0,5,color='C0',alpha=0.8)
text = 'median : %.1f\nIQR : %.1f - %.1f' % ((np.median(vertical_p0),) + tuple(np.percentile(vertical_p0,[25,75])))
axs[2][0].text(0.55,0.68,text,transform=axs[2][0].transAxes,bbox=stats_box)
axs[2][0].grid(c='0.5',alpha=0.5)
axs[2][0].set_ylabel('count')
axs[2][0].set_xlabel('vertical [%s]' % units[0])


axs[0][1].hist(east_p1,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(east_p1),) + tuple(np.percentile(east_p1,[25,75])))
axs[0][1].text(0.55,0.68,text,transform=axs[0][1].transAxes,bbox=stats_box)
axs[0][1].grid(c='0.5',alpha=0.5)
axs[0][1].set_ylabel('count')
axs[0][1].set_xlabel('east [%s]' % units[1])

axs[1][1].hist(north_p1,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(north_p1),) + tuple(np.percentile(north_p1,[25,75])))
axs[1][1].text(0.55,0.68,text,transform=axs[1][1].transAxes,bbox=stats_box)
axs[1][1].grid(c='0.5',alpha=0.5)
axs[1][1].set_ylabel('count')
axs[1][1].set_xlabel('north [%s]' % units[1])

axs[2][1].hist(vertical_p1,5,color='C0',alpha=0.8)
text = 'median : %.2f\nIQR : %.2f - %.2f' % ((np.median(vertical_p1),) + tuple(np.percentile(vertical_p1,[25,75])))
axs[2][1].text(0.55,0.68,text,transform=axs[2][1].transAxes,bbox=stats_box)
axs[2][1].grid(c='0.5',alpha=0.5)
axs[2][1].set_ylabel('count')
axs[2][1].set_xlabel('vertical [%s]' % units[1])
fig.tight_layout()

plt.show()

## plot samples of the median noise models
#fig,ax = plt.subplots(3,1,figsize=(7,6))
#
#dt = 1.0/365.25
#time = np.arange(0.0,7.0,dt)
#
#gp = fogm(np.median(east_p0),np.median(east_p1),convert=False)
#sample = gp.sample(time[:,None])
#ax[0].plot(time,sample,'C0')
#sample = gp.sample(time[:,None])
#ax[0].plot(time,sample,'C1')
#ax[0].grid(c='0.5',alpha=0.5)
#ax[0].set_xlabel('time [yr]')
#ax[0].set_ylabel('easting [mm]')
#
#gp = fogm(np.median(north_p0),np.median(north_p1),convert=False)
#sample = gp.sample(time[:,None])
#ax[1].plot(time,sample,'C0')
#sample = gp.sample(time[:,None])
#ax[1].plot(time,sample,'C1')
#ax[1].grid(c='0.5',alpha=0.5)
#ax[1].set_xlabel('time [yr]')
#ax[1].set_ylabel('northing [mm]')
#
#gp = fogm(np.median(vertical_p0),np.median(vertical_p1),convert=False)
#sample = gp.sample(time[:,None])
#ax[2].plot(time,sample,'C0')
#sample = gp.sample(time[:,None])
#ax[2].plot(time,sample,'C1')
#ax[2].grid(c='0.5',alpha=0.5)
#ax[2].set_xlabel('time [yr]')
#ax[2].set_ylabel('vertical [mm]')
#
#fig.tight_layout()
#
#plt.show()
#
#