function [data, auxData, metaData, txtData, weights] = mydata_Lacerta_schreiberi
% file generated by prt_mydata

%% set metaData
metaData.phylum     = 'Chordata';
metaData.class      = 'Reptilia';
metaData.order      = 'Squamata';
metaData.family     = 'Lacertidae';
metaData.species    = 'Lacerta_schreiberi';
metaData.species_en = 'Iberian Emerald Lizard';

metaData.ecoCode.climate = {'BSk','Cfb','Cs'};
metaData.ecoCode.ecozone = {'THp'};
metaData.ecoCode.habitat = {'0iTh','0iTf'};
metaData.ecoCode.embryo  = {'Tt'};
metaData.ecoCode.migrate = {};
metaData.ecoCode.food    = {'biCi'};
metaData.ecoCode.gender  = {'Dg'};
metaData.ecoCode.reprod  = {'O'};

metaData.T_typical  = C2K(32); % K, body temp

metaData.data_0     = {'ah','ab','am','Lb','Lp','Lpm','Li','Lim','Ww0','Wwb','Ri','Wwi','Wwim','tpm','tR'};
metaData.data_1     = {'LN','Tab'};

metaData.COMPLETE   = 2.5; % using criteria of LikaKear2011

metaData.author     = {'Urtzi Enriquez-Urzelai'};
metaData.date_subm  = [2021 5 19];
metaData.email      = {'urtzi.enriquez@gmail.com'};
metaData.address    = {'CAS, Czech Academy of Sciences'};

metaData.curator    = {'Bas Kooijman'};
metaData.email_cur  = {'bas.kooijman@bio.vu.nl'};
metaData.date_acc   = [2021 5 20];

%% set zero-variate data
data.ab = 96; units.ab = 'd'; label.ab = 'age at birth'; bibkey.ab = {'Marco1994'};
  temp.ab = C2K(17.4); units.temp.ab = 'K'; label.temp.ab = 'temperature';
data.tp = 810; units.tp = 'd'; label.tp = 'time since birth at puberty for females'; bibkey.tp = {'Marco2011'};
  temp.tp = C2K(32); units.temp.tp = 'K'; label.temp.tp = 'temperature';
data.tpm = 575; units.tpm = 'd'; label.tpm = 'time since birth at puberty for males'; bibkey.tpm = {'Marco2011'};
  temp.tpm = C2K(32); units.temp.tpm = 'K'; label.temp.tpm = 'temperature';
data.am = 3285; units.am = 'd'; label.am = 'life span'; bibkey.am = {'Marco1994'};
  temp.am = C2K(32); units.temp.am = 'K'; label.temp.am = 'temperature';

data.Lb = 2.9; units.Lb = 'cm'; label.Lb = 'SVL at birth'; bibkey.Lb = {'Marco2011'};
data.Lp = 8.2; units.Lp = 'cm'; label.Lp = 'SVL at puberty'; bibkey.Lp = {'Galan1989'};
data.Lpm = 7.2; units.Lpm = 'cm'; label.Lpm = 'SVL at puberty for males'; bibkey.Lpm = {'Galan1989'};
data.Li = 13.1; units.Li = 'cm'; label.Li = 'ultimate SVL'; bibkey.Li = {'Salvador1988'};
data.Lim = 12.0; units.Lim = 'cm'; label.Lim = 'ultimate SVL for males'; bibkey.Lim = {'Salvador1988'};

data.Ww0 = 0.6; units.Ww0 = 'g'; label.Ww0 = 'initial wet weight'; bibkey.Ww0 = {'Brito1998'};
data.Wwb = 0.77; units.Wwb = 'g'; label.Wwb = 'wet weight at birth'; bibkey.Wwb = {'Marco2011'};
data.Wwi = 30.2; units.Wwi = 'g'; label.Wwi = 'ultimate wet weight'; bibkey.Wwi = {'Galan1984'};
data.Wwim = 23.2; units.Wwim = 'g'; label.Wwim = 'ultimate wet weight for males'; bibkey.Wwim = {'Galan1984'};

data.Ri = 24/365; units.Ri = '#/d'; label.Ri = 'ultimate reproduction rate'; bibkey.Ri = {'Marco1994'};
  temp.Ri = C2K(32); units.temp.Ri = 'K'; label.temp.Ri = 'temperature';
  comment.Ri = '7-24 eggs per clutch, 1 clutch per year (2 in Asturias?)';

%% set uni-variate data
% length - yearly fecundity
data.LN = [ ... 
  9.0988 8.071
  9.4038 7.137
  9.4982 9.037
  9.6952 9.081
  9.992 12
  10.1973 8.093
  10.2976 10.09
  10.2911 11.017
  10.6015 11.059
  10.4923 13.988
  10.5997 13.985
  10.6953 13.983
  10.7902 14.956
  10.7973 13.054
  10.8994 12.027
  10.9949 12.025
  11.0964 12.022
  11.2928 13.042
  11.1962 14.946
  11.0935 16.9
  11.5908 14.01
  11.7997 14.005
  11.7986 15.956
  11.8983 18.929
  11.9909 23.805
  12.3956 15.942];
units.LN = {'cm', '#'}; label.LN = {'length', 'yearly fecundity'};
temp.LN = C2K(32); units.temp.LN = 'K'; label.temp.LN = 'temperature';
bibkey.LN = {'Marco1994'};

% length (SVL) wet weight
data.LWw = [ ... % length (mm), weight (g)
30.54961832 0.848145886
33.97679389 0.961187447
34.04335878 1.23093469
34.91664122 1.321808312
34.91114504 1.148159457
34.84580153 0.917000848
35.89251908 0.98746056
36.0140458 1.16036302
35.84305344 1.257954198
35.96641221 1.48873961
36.93923664 1.057920271
36.8848855 1.174059372
36.94961832 1.385923664
37.40946565 1.247877863
37.99328244 1.35991179
38.45740458 1.356926209
39.09740458 1.410703986
38.87022901 1.566551315
39.33862595 1.698625954
39.68122137 1.522737913
39.97801527 1.733109415
40.95938931 1.572410517
41.65251908 1.47146056
41.54320611 1.684444444
42.07267176 1.912617472
42.93618321 1.694782019
43.93099237 1.9585581
43.8821374 2.248346056
44.97709924 2.009723494
44.92335878 2.145156913
44.98564885 2.279843936
45.90473282 1.984458015
46.53496183 1.729526718
46.96366412 2.440804071
46.95633588 2.209272265
47.53526718 2.166951654
47.99694656 2.086788804
48.51603053 1.986958439
47.94687023 2.337988126
49.97374046 2.209160305
49.92854962 2.614714165
50.46229008 2.977947413
50.9880916 3.090354538
51.89801527 2.505553859
52.54534351 2.790863444
52.03175573 3.064342663
52.0378626 3.257285835
53.02229008 3.193058524
53.07358779 2.980447837
54.7151145 3.510239186
56.0378626 3.135063613
56.04580153 3.385889737
56.05557252 3.694598813
57.09251908 3.456349449
57.04793893 3.881197625
58.0280916 3.681910093
58.09465649 3.951657337
59.04 4.485927057
60.06351145 3.823202714
61.11328244 3.990134012
62.0378626 3.868396947
65.04916031 5.508675148
67.12610687 6.96198134
70.14290076 6.942575064
72.11664122 6.968474979
70.15755725 7.405638677
74.12091603 7.959090755
71.13282443 8.885329941
71.14931298 9.406276506
74.15145038 8.923806616
75.06442748 8.435477523
76.10687023 8.370877014
78.09648855 8.898429177
78.16854962 9.341825276
76.15083969 9.760067854
76.15694656 9.953011026
75.12732824 10.4227922
77.21526718 10.39006277
83.1248855 11.93450382
85.15664122 11.96003053
65.07389163 5.435546018
69.90147783 7.441350046
70.98522167 7.039945374
71.62561576 5.898161245
72.01970443 7.034824172
70.98522167 8.475588938
72.95566502 7.574745159
72.95566502 8.416329318
72.4137931 8.666536604
72.01970443 9.955616251
73.10344828 9.504706628
73.99014778 10.04487148
75.27093596 8.899917085
75.96059113 9.045017802
76.99507389 8.495342145
78.96551724 8.931132029
79.01477833 9.970492123
80 11.40125835
79.95073892 15.41140321
81.57635468 13.47266254
81.97044335 11.58952348
84.97536946 12.46573672
84.97536946 11.77266741
87.04433498 13.39608838
86.99507389 14.18841145
91.08374384 13.3760913
89.01477833 13.03979905
89.01477833 13.88138321
90.09852217 11.35126567
92.1182266 14.46007901
92.1182266 15.45017802
95.07389163 16.42564503
95.07389163 17.96029849
98.07881773 17.99492757
101.0837438 19.61371507
101.1330049 20.35604546
101.1330049 21.14812466
100.0985222 21.49978052
98.22660099 22.59815637
101.9704433 20.99546408
102.955665 23.41632932
102.9064039 24.30766229
108.0788177 25.07413549
105.9605911 26.96580988
107.1428571 27.05896698
108.0788177 28.04443252
112.955665 31.8321709
91.07339845 20.01755155
94.01135323 19.37793819
96.07489178 20.99568678
97.94736087 22.46293811
95.96510248 24.08369277
99.13444681 25.00422789
101.0032504 24.07060183
102.071238 23.60243123
102.0321397 22.99307247
107.0764549 27.01955301
105.056611 29.02178719
105.0641165 33.93786946
107.0092548 33.00346764
106.0237693 37.51043396
109.9840969 31.52506478
113.0403356 33.36138349
118.9558089 32.99638884
117.9643306 33.57811118
115.9480358 37.90500442
118.9609871 36.38810451
116.9833251 41.01948319
92.05525606 19.05154987
93.03234501 19.59316038
99.95013477 20.5324503
98.03504043 29.6052687
102.9986523 22.6254001
100.9663073 30.17541274
101.0053908 34.08145216
104.0539084 28.51815195
104.9528302 32.06799613
106.0471698 28.0777249
107.0633423 28.30662483
106.9460916 27.05725657
106.9851752 26.39298349
108.0404313 29.08261034
114.0592992 26.1595561
113.0431267 28.46971867
111.9878706 32.53790431
109.9946092 35.00958137
109.0566038 38.13963528
115.1145553 33.53668295
114.0202156 35.18320418
113.0040431 36.59492925
117.0687332 42.97927898
119.9609164 37.06525859];
data.LWw(:,1) = data.LWw(:,1) / 10; % convert mm to cm
units.LWw  = {'cm', 'g'};  label.LWw = {'length (SVL)', 'weight (g)'};  
temp.LWw   = C2K(32);  units.temp.LWw = 'K'; label.temp.LWw = 'temperature';
bibkey.LWw = 'Salvador1988';

% temprature - age at birth
data.Tab = [ ... temperature C, age at birth (incubation duration)
16.603  111.007
16.602  108.826
16.577  106.308
16.577  104.295
16.913  100.790
17.512  93.609
17.512  92.770
17.620  91.601
18.161  89.450
18.196  87.103
18.124  86.092
18.460  84.098
19.288  76.090
19.071  73.897
19.600  74.094
19.636  73.090
19.599  72.081
19.467  71.067
20.419  79.006
21.799  70.023
21.896  71.035
21.907  69.022
22.640  65.036
19.576  74.093];
units.Tab   = {'C', 'd'};  label.Tab = {'temperature', 'incubation duration'};  
bibkey.Tab = 'Monasterio2013';

% time-temperature for tL_j, tL_f, tL_m
data.tT = [ ...
    0 25.13272
	31 20.15374
	61 16.44665
	92 12.73350
	123 14.52458
	151 12.40676
	182 17.22930
	212 18.91197
	243 22.92747
	273 27.79010
	304 31.20513
	335 28.92074
	365 27.31306
	396 23.59780
	426 17.63560
	457 14.03329
	488 13.45808
	516 14.15185
	547 15.81719
	577 22.10182
	608 22.01645
	638 27.39247
	669 29.47372
	700 28.40540
	730 25.89117]; 
units.tT = {'d','C'}; label.tT = {'time','temperature'};
bibkey.tT = 'Salvador1988';
comment.tT = 'Temperature for tL_j tL_f and tL_m data';

% t-L data subadults
data.tL_j = [ ... % time since birth (d), SVL (mm)
182	30
182	33.96
182	33.96
182	34.83
182	34.83
182	34.83
182	35.79
182	35.79
182	35.75
182	35.79
182	35.79
182	36.66
182	36.66
182	36.66
182	37.58
182	37.68
182	39.71
182	40.58
212	35.94
212	35.94
212	36.81
212	35.94
212	35.94
212	35.94
212	36.81
212	36.81
212	37.68
212	37.68
212	38.69
212	38.64
212	38.69
212	38.64
212	39.61
212	40.67
212	40.67
212	41.54
212	43.52
243	35.94
243	38.74
243	38.84
243	39.66
243	40.48
243	40.62
243	40.58
243	41.64
243	42.65
243	42.65
243	43.52
243	43.57
243	43.62
243	43.62
243	44.49
243	44.54
243	44.54
243	44.54
243	45.6
243	46.61
243	46.61
243	46.57
243	46.57
243	47.39
243	47.53
243	47.48
243	47.48
243	47.48
243	49.51
243	49.56
243	49.51
243	49.51
243	51.54
243	51.59
243	52.55
243	55.55
273	45.7
273	49.66
273	50.57
273	51.49
273	52.41
273	53.13
273	53.76
273	55.69
273	55.69
273	55.6
273	55.65
273	56.56
273	56.56
273	57.58
273	57.48
273	57.53
273	58.5
273	59.46
273	61.73
273	64.73
304	66.71
304	70.76
304	70.76
304	71.68
304	71.68
304	72.7
304	74.77
304	74.77
304	75.69
304	75.74
304	76.66
304	76.75
304	77.72
304	77.77
304	77.72
304	82.6
304	84.63
334	69.7
334	69.7
334	70.62
334	73.61
334	75.69
334	76.71
334	77.48
334	77.53
334	78.44
334	80.52
547	80.52
547	80.52
547	81.22
547	85.95
547	89.86
547	91.38
577	75.09
577	78.94
577	79.7
577	80.4
577	81.16
577	87.47
608	79.64
608	81.28
608	81.22
608	82.04
608	82.74
608	83.67
608	84.31
608	85.89
608	85.83
608	85.89
608	86.53
608	88.28
608	90.44
608	90.44
608	92.08
608	92.08
608	93.54
608	95.93
638	93.54
638	94.24
638	95.17
638	95.87
638	95.93
638	98.27
638	98.21
638	99.73
638	102.12
638	103.58
638	108.37
669	102.12
669	102.82
669	102.88
669	104.4
669	106.79
669	107.49
669	108.25
669	112.22
699	102.88
699	102.88
699	104.4
699	107.49
699	112.22];
n = size(data.tL_j,1); for i=2:n; if data.tL_j(i,1) <= data.tL_j(i-1,1);  data.tL_j(i,1) = data.tL_j(i-1,1) + 1e-3; end; end
data.tL_j(:,2) = data.tL_j(:,2) / 10; % convert mm to cm
units.tL_j  = {'d', 'cm'};  label.tL_j = {'time since birth', 'SVL', 'subadult'};  
bibkey.tL_j = 'Salvador1988';
comment.tL_j = 'Data for juveniles; temperature according to tT data';

% t-L data females
data.tL_f = [ ... % time since birth (d), SVL (mm); fem = females
1276	91.93011647
1276	92.92845258
1276	97.92013311
1276	100.8485857
1276	103.9101498
1276	104.9084859
1276	108.9018303
1276	109.9001664
1276	112.828619
1306	99.91680532
1306	100.8485857
1306	102.9118136
1306	106.9051581
1306	106.9051581
1306	111.8302829
1306	112.7620632
1306	119.8835275
1306	130.9983361
1336	103.843594
1336	113.8935108
1367	109.9667221
1367	114.8252912
1367	117.8868552
1367	119.8169717
1367	122.9450915
1397	116.9550749];
n = size(data.tL_f,1); for i=2:n; if data.tL_f(i,1) <= data.tL_f(i-1,1);  data.tL_f(i,1) = data.tL_f(i-1,1) + 1e-3; end; end
data.tL_f(:,2) = data.tL_f(:,2) / 10; % convert mm to cm
units.tL_f  = {'d', 'cm'};  label.tL_f = {'time since birth', 'SVL', 'female'};  
bibkey.tL_f = 'Salvador1988';
comment.tL_f = 'Data for females; temperature according to tT data';

% t-L data males
data.tL_m = [ ... % time since birth (d), SVL (mm); 
1276	90.85365854
1276	90.91463415
1276	93.84146341
1276	95.85365854
1276	98.84146341
1276	98.84146341
1276	104.7560976
1276	104.7560976
1276	105.7317073
1276	113.7804878
1276	115.7926829
1276	116.7682927
1306	97.86585366
1306	100.7926829
1306	101.8292683
1306	105.7317073
1306	118.7804878
1306	118.7804878
1306	107.7439024
1306	110.8536585
1336	107.8658537
1336	117.804878
1397	118.902439];
n = size(data.tL_m,1); for i=2:n; if data.tL_m(i,1) <= data.tL_m(i-1,1);  data.tL_m(i,1) = data.tL_m(i-1,1) + 1e-3; end; end
data.tL_m(:,2) = data.tL_m(:,2) / 10; % convert mm to cm
units.tL_m  = {'d', 'cm'};  label.tL_m = {'time since birth', 'SVL', 'male'};  
bibkey.tL_m = 'Salvador1988';
comment.tL_m = 'Data for males; ; temperature according to tT data';


%% set weights for all real data
weights = setweights(data, []);
weights.tT = 5 * weights.tT;
weights.ab = 0;
weights.Ww0 = 0;
weights.Wwi = 1;
weights.Wwim = 0;
weights.tp = 0;
weights.tpm = 0;

%% set pseudodata and respective weights
[data, units, label, weights] = addpseudodata(data, units, label, weights);

%% pack auxData and txtData for output
auxData.temp = temp;
txtData.units = units;
txtData.label = label;
txtData.bibkey = bibkey;
txtData.comment = comment;

%% Group plots
set1 = {'tL_j','tL_f','tL_m'}; subtitle1 = {'Data for subadults, females, males (Salvador 1988)'};
metaData.grp.sets = {set1};
metaData.grp.subtitle = {subtitle1};

%% Discussion points
D1  = 'Males are assumed to differ from females by {p_Am} and E_Hp';
D2  = 'I set zero weights to ab, Ww0, Wwi and Wwim. ab: it is inconsistent with univariate (Tab) data. Ww0: data comes from a different population in Portugal. Wwi and Wwim: data from a population in Galicia, and obviously inconsistent with the univariate data that comes from Leon.';
D3  = 'temperature in tL data is assumed to oscillate as T(t) = T_m + T_a*sin(2*pi*(t-t_T)/365)';
D4  = 'curator: weight for tp and tpm have been set to 0 because of complex temperature trajectory';
metaData.discussion = struct('D1',D1, 'D2',D2, 'D3',D3, 'D4',D4);

%% Links
metaData.links.id_CoL = '3RMVW'; % Cat of Life
metaData.links.id_ITIS = '1155287'; % ITIS
metaData.links.id_EoL = '792821'; % Ency of Life
metaData.links.id_Wiki = 'Lacerta_schreiberi'; % Wikipedia
metaData.links.id_ADW = 'Lacerta_schreiberi'; % ADW
metaData.links.id_Taxo = '49577'; % Taxonomicon
metaData.links.id_WoRMS = ''; % WoRMS
metaData.links.id_ReptileDB = 'genus=Lacerta&species=schreiberi'; % ReptileDB
metaData.links.id_AnAge = ''; % AnAge


%% References
bibkey = 'Brito1998'; type = 'techreport'; bib = [ ...
'author = {Brito, J. C.and Luis, C. and Godinho, M. R. and Paulo, O. S. and Crespo, E. G.}, ' ... 
'title = {Bases para a Conserva\c{c}\={a}o do Lagarto-de-\''{a}gua (\emph{Lacerta schreiberi})}, ' ... 
'series = {Estudos de Biologia e Conserva\c{c}\={a}o da Natureza}, ' ...
'institution = {Instituto da Conserva\c{c}\={a}o da Natureza, Ministerio do Ambiente}, ' ... 
'volume = {23}, ' ...
'year = {1998}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
bibkey = 'Galan1984'; type = 'article'; bib = [ ...
'author = {Gal\''{a}n, P.}, ' ... 
'title = {Estudio sobre la biometr\''{i}a, folidosis, dise\={n}o y coloraci\''{o}n de \emph{Lacerta schreiberi} {B}edriaga, 1878. ({S}auria, {L}acertidae)}, ' ... 
'journal = {Alytes}, ' ... 
'year = {1984}, ' ... 
'volume = {2}, ' ... 
'pages = {25-54}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
bibkey = 'Galan1989'; type = 'article'; bib = [ ...
'author = {Gal\''{a}n, P.}, ' ... 
'title = {Notas sobre los ciclos de actividad de \emph{Lacerta schreiberi} {B}edriaga, 1878, en {G}alicia}, ' ... 
'journal = {Treballs de la Societat Catalana d''Ictiologia i Herpetologia}, ' ... 
'year = {1989}, ' ... 
'volume = {2}, ' ... 
'pages = {250-265}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
bibkey = 'Kooy2010'; type = 'Book'; bib = [ ...  % used in setting of chemical parameters and pseudodata
'author = {Kooijman, S.A.L.M.}, ' ...
'year = {2010}, ' ...
'title  = {Dynamic Energy Budget theory for metabolic organisation}, ' ...
'publisher = {Cambridge Univ. Press, Cambridge}, ' ...
'pages = {Table 4.2 (page 150), 8.1 (page 300)}, ' ...
'howpublished = {\url{http://www.bio.vu.nl/thb/research/bib/Kooy2010.html}}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'Marco1994'; type = 'article'; bib = [ ...
'author = {Marco, A. and P\''{e}rez-Mellado, V. and Gil, M.}, ' ... 
'title = {Reproductive strategy in a montane population of the lizard \emph{Lacerta schreiberi} ({S}auria: {L}acertidae)}, ' ... 
'journal = {Herpetological Journal}, ' ... 
'year = {1994}, ' ... 
'volume = {4}, ' ... 
'pages = {49-55}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
bibkey = 'Marco2011'; type = 'incollection'; bib = [ ...
'author = {Marco, A.}, ' ... 
'title = {Lagarto verdinegro - \emph{Lacerta schreiberi}}, ' ... 
'editor = {Salvador, A. and Marco, A.}, ' ... 
'booktitle = {Enciclopedia Virtual de los Vertebrados Espa\~{n}oles}, ' ... 
'publisher = {Museo Nacional de Ciencias Naturales, Madrid}, ' ... 
'year = {2011}, ' ... 
'howpublished = {\url{http://www.vertebradosibericos.org/}}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
bibkey = 'Salvador1988'; type = 'article'; bib = [ ...
'author = {Salvador, A.}, ' ... 
'title = {Die populationsstruktur von lizard \emph{Lacerta schreiberi} ({S}auria: {L}acertidae)}, ' ... 
'journal = {Jb. Feldherpetologie}, ' ... 
'year = {1988}, ' ... 
'volume = {2}, ' ... 
'pages = {3-22}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
bibkey = 'Monasterio2013'; type = 'article'; bib = [ ...
'author = {Monasterio, C. and Shoo, L. P. and Salvador, A. and Iraeta, P. and Diaz, J. A.}, ' ... 
'title = {High temperature constrains reproductive success in a temperate lizard: implications for distribution range limits and the impacts of climate change}, ' ... 
'journal = {Journal of Zoology}, ' ... 
'year = {2013}, ' ... 
'volume = {291}, ' ... 
'pages = {136-145}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ', bib, '}'';'];
%
