function [data, auxData, metaData, txtData, weights] = mydata_Plicofollis_layardi
%% set metaData

metaData.phylum     = 'Chordata'; 
metaData.class      = 'Actinopterygii'; 
metaData.order      = 'Siluriformes'; 
metaData.family     = 'Ariidae';
metaData.species    = 'Plicofollis_layardi'; 
metaData.species_en = 'Thinspine sea catfish '; 

metaData.ecoCode.climate = {'MA'};
metaData.ecoCode.ecozone = {'MIN','MPSW'};
metaData.ecoCode.habitat = {'0iMcd'};
metaData.ecoCode.embryo  = {'Mbm'};
metaData.ecoCode.migrate = {'Mo'};
metaData.ecoCode.food    = {'biO'};
metaData.ecoCode.gender  = {'D'};
metaData.ecoCode.reprod  = {'O'};

metaData.T_typical  = C2K(28.3); % K, body temp
metaData.data_0     = {'am'; 'Lp'; 'Li'; 'Wwb'; 'Wwp'; 'Wwi'}; 
metaData.data_1     = {'t-L'; 'Ww-N'}; 

metaData.COMPLETE = 2.5; % using criteria of LikaKear2011

metaData.author   = {'Bas Kooijman'};    
metaData.date_subm = [2023 11 04];              
metaData.email    = {'bas.kooijman@vu.nl'};            
metaData.address  = {'VU University Amsterdam'};   

metaData.curator     = {'Dina Lika'};
metaData.email_cur   = {'lika@uoc.gr'}; 
metaData.date_acc    = [2023 11 04];

%% set data
% zero-variate data;

data.am = 17*365;     units.am = 'd';    label.am = 'life span';     bibkey.am = 'AlHuAlBa2021';
  temp.am = C2K(27.6);  units.temp.am = 'K'; label.temp.am = 'temperature'; 

data.Lp  = 25;  units.Lp  = 'cm';	label.Lp  = 'total length at puberty';  bibkey.Lp  = 'AlHuAlBa2021';
data.Li  = 51;   units.Li  = 'cm';	label.Li  = 'ultimate total length';    bibkey.Li  = 'fishbase'; 

data.Wwb = 0.294; units.Wwb = 'g';	label.Wwb = 'wet weight at birth';      bibkey.Wwb = 'AlHuAlBa2021'; 
  comment.Wwb = 'based on egg diameter of 8.25 mm: pi/6*0.825^3';
data.Wwp  = 125; units.Wwp  = 'g';	label.Wwp  = 'wet weight at puberty';    bibkey.Wwp  = 'AlHuAlBa2021'; 
  comment.Wwp = 'based on 0.00708*Lp^3.04, see F1';
data.Wwi  = 1.1e3; units.Wwi  = 'g';	label.Wwi  = 'ultimate wet weight';    bibkey.Wwi  = 'fishbase'; 
  comment.Wwi = 'based on 0.00708*Li^3.04, see F1';
 
% uni-variate data
% time-length
data.tL_f = [ ... % time since birth (yr), total length (cm)
0.321	12.090
0.642	14.216
0.642	16.007
0.706	14.216
0.963	13.881
0.984	20.149
1.005	18.246
1.070	18.806
1.091	13.657
1.091	16.903
1.112	13.321
1.112	16.455
1.134	14.552
1.134	17.910
1.198	14.776
1.198	18.246
1.219	15.784
1.219	21.269
1.241	18.694
1.305	14.328
1.326	19.701
1.348	17.575
1.369	17.575
1.390	21.828
1.412	16.791
1.412	20.261
1.433	15.672
1.433	18.246
1.455	20.597
1.476	19.142
1.497	15.896
1.561	17.463
1.561	17.910
1.561	20.261
1.583	19.478
1.775	14.216
1.882	20.933
1.904	16.567
1.947	22.052
1.968	23.619
2.011	17.239
2.053	26.754
2.053	26.082
2.053	25.746
2.053	21.269
2.075	23.396
2.075	22.612
2.075	16.231
2.118	24.627
2.139	28.209
2.139	17.127
2.160	24.851
2.160	21.157
2.225	26.866
2.246	21.940
2.289	21.940
2.332	26.978
2.332	27.985
2.353	28.657
2.374	29.888
2.417	19.478
2.439	17.127
2.460	28.209
2.460	16.567
2.481	26.082
2.545	21.157
2.588	26.530
2.588	29.888
2.631	26.754
2.631	27.873
2.674	31.119
2.717	27.313
2.738	25.075
2.781	26.418
2.781	30.224
2.781	30.896
2.802	28.769
2.845	30.336
2.952	27.873
2.952	25.187
2.995	30.112
3.037	33.022
3.037	28.881
3.037	26.194
3.059	31.007
3.080	31.903
3.209	34.142
3.230	25.187
3.294	32.910
3.337	25.746
3.465	26.978
3.487	22.500
3.529	29.776
3.572	35.821
3.615	28.657
3.679	28.097
3.701	28.545
3.701	32.910
3.765	39.067
3.807	35.149
3.850	34.254
3.936	32.015
4.000	29.216
4.000	28.097
4.021	29.776
4.021	30.448
4.021	31.567
4.043	35.821
4.086	38.172
4.086	28.433
4.107	36.157
4.128	37.052
4.299	34.925
4.342	31.343
4.385	37.836
4.449	36.045
4.535	38.843
4.535	32.799
4.599	36.940
4.642	41.418
4.663	31.679
4.684	43.321
4.706	39.403
4.770	40.410
4.770	36.045
4.963	43.993
4.984	39.291
4.984	40.410
5.048	36.940
5.091	41.978
5.326	35.597
5.412	39.179
5.497	40.187
5.668	37.836
5.690	39.963
5.711	38.955
6.011	41.978
6.075	43.097
6.118	42.537
6.160	38.396
6.160	37.500
6.182	39.403
6.225	40.634
6.246	39.291
6.246	36.045
6.267	36.716
6.289	41.194
6.289	36.045
6.353	36.269
6.374	36.381
6.396	39.067
6.460	41.082
6.460	38.284
6.567	40.187
6.652	39.851
6.652	36.045
6.674	38.284
6.674	38.619
6.717	40.970
6.845	35.149
6.973	38.396
6.995	47.910
7.016	43.433
7.059	39.067
7.080	39.963
7.123	41.194
7.209	39.851
7.230	43.209
7.273	40.075
7.380	41.978
7.465	45.112
7.487	42.761
7.508	42.425
7.529	41.642
7.594	42.201
7.636	46.231
7.701	41.194
7.722	44.216
7.786	42.425
7.957	44.888
7.979	44.440
8.000	50.149
8.000	43.769
8.021	42.090
8.021	40.970
8.086	39.403
8.086	38.955
8.107	42.873
8.107	40.522
8.128	40.075
8.235	42.201
8.299	43.881
8.299	39.403
8.364	42.090
8.364	42.985
8.428	42.313
8.471	45.000
8.492	43.545
8.513	42.090
8.513	41.642
8.556	40.299
8.578	39.963
8.599	46.231
8.599	40.858
8.620	45.000
8.663	41.194
8.684	44.104
8.727	47.463
8.727	42.761
8.770	48.022
8.791	42.090
8.941	42.985
8.941	44.440
8.963	41.418
9.048	47.127
9.091	43.545
9.305	48.022
9.455	44.104
9.497	40.187
9.497	42.313
9.519	41.306
9.519	45.112
9.604	42.201
9.647	40.410
9.668	45.112
9.668	39.627
9.775	48.022
9.775	48.806
9.775	40.187
9.840	46.231
9.989	44.328
10.011	40.075
10.053	50.933
10.417	43.209
10.439	43.993
10.460	42.090
10.524	42.873
10.610	44.888
10.674	47.799
10.759	44.104
10.888	47.015
10.973	44.440
11.016	48.022
11.016	43.433
11.337	42.985
11.358	48.134
11.465	42.761
11.615	48.358
11.658	41.082
11.658	43.097
11.701	42.090
11.850	44.440
12.556	44.216
12.578	43.209
12.663	46.119
12.727	45.336
12.813	47.015
13.604	47.239
13.604	43.209
13.840	48.022
15.701	49.366
16.642	43.993];
data.tL_f(:,1) = 365 * (0.8 + data.tL_f(:,1)); % conver yr to d
for i=2:size(data.tL_f,1);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
units.tL_f   = {'d', 'cm'};  label.tL_f = {'time since birth', 'total length','females'};  
temp.tL_f    = C2K(27.6);  units.temp.tL_f = 'K'; label.temp.tL_f = 'temperature';
bibkey.tL_f = 'AlHuAlBa2021';
%
data.tL_m = [ ... % time since birth (yr), total length (cm)
0.492	12.201
0.513	14.888
0.578	13.993
0.642	14.552
0.770	13.097
0.898	17.351
1.048	14.776
1.070	18.806
1.091	18.022
1.155	15.672
1.155	13.993
1.176	16.343
1.241	17.910
1.262	19.142
1.305	16.455
1.348	20.373
1.369	21.604
1.390	19.813
1.412	18.918
1.412	22.052
1.455	17.575
1.455	14.664
1.497	16.903
1.540	20.149
1.561	19.254
1.561	15.896
1.604	18.694
1.604	21.493
1.754	24.963
1.861	17.799
1.882	21.493
1.925	16.343
1.968	19.478
1.968	18.918
2.011	22.724
2.011	21.381
2.032	25.075
2.032	19.813
2.032	17.575
2.032	18.582
2.053	25.970
2.053	23.731
2.075	26.978
2.118	22.276
2.118	21.493
2.118	21.045
2.118	17.015
2.139	23.507
2.139	22.276
2.225	27.425
2.246	25.970
2.310	24.291
2.439	25.410
2.439	29.216
2.460	25.410
2.460	24.067
2.481	26.642
2.524	23.955
2.567	26.866
2.588	27.537
2.695	28.769
2.717	25.075
2.717	27.201
2.759	27.313
2.952	28.097
2.973	25.410
2.973	22.052
2.995	29.776
3.059	27.649
3.059	27.201
3.080	24.851
3.102	28.769
3.144	29.552
3.230	30.560
3.251	28.321
3.316	32.239
3.337	31.119
3.337	29.104
3.380	29.776
3.380	22.948
3.401	29.552
3.422	27.201
3.422	26.978
3.444	32.799
3.465	30.672
3.465	28.321
3.487	35.821
3.487	26.306
3.551	33.134
3.594	30.000
3.615	28.881
3.636	31.903
3.658	31.455
3.658	27.873
3.679	30.672
3.701	34.590
3.701	29.328
3.765	29.664
3.765	27.090
3.957	30.560
4.000	29.216
4.043	31.343
4.043	30.000
4.064	33.246
4.214	27.985
4.214	29.888
4.214	31.119
4.235	32.463
4.257	29.104
4.299	32.687
4.364	34.366
4.364	33.134
4.385	30.336
4.449	34.254
4.471	31.343
4.492	35.149
4.513	32.239
4.513	27.201
4.535	28.993
4.556	30.672
4.599	27.985
4.642	26.418
4.663	36.940
4.684	31.567
4.706	35.709
4.706	34.366
4.706	32.351
4.727	28.433
4.749	35.149
4.749	33.918
4.770	32.575
4.791	29.328
4.834	31.455
4.834	31.007
4.834	30.112
4.898	32.910
4.898	29.776
4.920	36.045
5.219	33.918
5.283	27.985
5.348	34.142
5.390	36.381
5.433	33.918
5.519	37.948
5.519	37.724
5.519	33.358
5.561	35.821
5.583	38.284
5.626	30.672
5.668	32.799
5.668	31.791
5.733	30.896
5.754	32.351
5.797	30.336
5.861	30.784
5.968	33.582
6.032	35.821
6.075	32.687
6.118	36.269
6.118	35.485
6.139	34.142
6.160	36.716
6.182	34.813
6.246	37.276
6.267	37.052
6.267	34.142
6.289	33.358
6.396	36.269
6.417	35.597
6.567	35.261
6.610	32.127
6.631	35.933
6.631	35.933
6.695	30.896
6.738	32.127
6.738	33.358
6.845	33.918
6.995	32.015
7.102	35.597
7.144	39.291
7.166	38.619
7.230	31.791
7.380	33.918
7.422	35.373
7.444	36.493
7.444	34.813
7.465	31.903
7.465	36.828
7.594	31.455
7.594	33.134
7.615	40.410
7.658	34.701
7.658	35.149
7.658	36.604
7.658	36.604
7.658	40.075
7.679	37.500
7.701	33.694
7.722	33.022
7.722	39.851
7.765	38.619
7.786	35.821
7.807	38.284
7.893	40.410
7.936	36.716
7.979	32.127
8.021	37.724
8.086	35.037
8.150	37.724
8.171	36.381
8.321	35.149
8.364	37.724
8.406	38.060
8.449	33.806
8.535	31.791
8.578	33.806
8.599	32.799
8.620	34.813
8.642	35.597
8.684	32.127
8.684	37.052
8.749	37.052
8.749	38.619
8.770	37.836
8.791	34.142
8.813	36.269
8.834	40.187
8.941	35.933
8.941	40.634
8.984	32.910
9.112	39.067
9.198	38.507
9.519	38.284
9.561	37.276
9.583	35.037
9.647	35.933
9.690	36.940
9.690	39.291
9.711	34.142
9.754	33.022
9.797	39.963
9.818	35.933
9.818	32.239
9.925	36.828
10.075	37.612
10.481	37.052
10.567	36.604
10.695	40.075
10.738	37.500
10.759	40.970
10.759	38.284
10.759	35.821
11.187	38.955
11.273	38.843
11.337	37.948
11.422	37.612
11.658	36.828
11.679	38.955
11.701	36.269
11.701	37.836
11.807	39.851
11.893	38.284
12.428	36.940
12.663	40.858
12.663	35.933
12.834	38.843
12.920	39.067
13.797	39.067
13.861	41.082
14.717	38.731
15.679	37.052];
data.tL_m(:,1) = 365 * (0.8 + data.tL_m(:,1)); % conver yr to d
for i=2:size(data.tL_m,1);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
units.tL_m   = {'d', 'cm'};  label.tL_m = {'time since birth', 'total length','males'};  
temp.tL_m    = C2K(27.6);  units.temp.tL_m = 'K'; label.temp.tL_m = 'temperature';
bibkey.tL_m = 'AlHuAlBa2021';

% weight-fecundity
data.WN = [ ... % weight (g), fecundity (#)
128.746	94.546
142.064	87.491
150.943	35.618
168.701	77.313
177.580	55.314
179.800	29.374
221.976	31.799
224.195	37.306
224.195	52.243
235.294	38.895
235.294	56.191
241.953	42.837
246.393	45.202
264.151	52.306
279.689	54.689
293.008	40.559
312.986	99.552
321.865	55.541
324.084	60.262
324.084	42.966
337.403	47.704
348.502	61.086
366.260	52.466
381.798	75.289
408.435	91.841
412.875	73.766
412.875	39.961
450.610	106.058
459.489	76.198
459.489	72.267
461.709	65.981
470.588	80.932
481.687	84.880
499.445	66.827
499.445	69.971
506.104	62.906
514.983	66.851
532.741	71.596
550.499	88.919
566.038	72.434
592.675	74.049
608.213	83.507
650.388	70.209
657.048	40.345
701.443	96.232
712.542	73.451
719.201	142.644
721.421	92.333
736.959	65.628
770.255	102.630
790.233	71.215
807.991	95.614
827.969	102.720
832.408	57.130
839.068	123.178
845.727	80.736
845.727	87.811
852.386	111.407
867.925	140.519
890.122	113.824
890.122	55.648
894.562	90.247
912.320	109.929
927.858	176.777
958.935	101.354
963.374	95.072
965.594	185.484
1001.110	143.087
1012.209	184.771
1045.505	85.767
1047.725	102.280
1069.922	206.874
1072.142	195.085
1107.658	232.091
1140.954	203.055
1149.833	129.956
1152.053	85.934
1180.910	220.414
1234.184	71.913
1249.722	130.899
1331.854	83.859
1445.061	131.206
1462.819	224.788
1524.972	178.502];
units.WN   = {'g', '#'};  label.WN = {'weight', 'fecundity'};  
temp.WN    = C2K(27.6);  units.temp.WN = 'K'; label.temp.WN = 'temperature';
bibkey.WN = 'AlHuAlBa2021';
    
%% set weights for all real data
weights = setweights(data, []);
weights.tL_f = 3 * weights.tL_f;
weights.tL_m = 3 * weights.tL_m;
weights.Wwb = 3 * weights.Wwb;

%% set pseudodata and respective weights
[data, units, label, weights] = addpseudodata(data, units, label, weights);
weights.psd.k_J = 0; weights.psd.k = 1;

%% 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_f','tL_m'}; subtitle1 = {'Data for females, males'};
metaData.grp.sets = {set1};
metaData.grp.subtitle = {subtitle1};

%% Discussion points
D1 = 'Males are assumed to differ from females by {p_Am} only';
metaData.discussion = struct('D1',D1);

%% Facts
F1 = 'length-weight: W in g = 0.00708*(TL in cm)^3.04';
metaData.bibkey.F1 = 'fishbase';
metaData.facts = struct('F1',F1); 

%% Links
metaData.links.id_CoL = '4KG23'; % Cat of Life
metaData.links.id_ITIS = '680772'; % ITIS
metaData.links.id_EoL = '219269'; % Ency of Life
metaData.links.id_Wiki = 'Plicofollis_layardi'; % Wikipedia
metaData.links.id_ADW = ''; % ADW
metaData.links.id_Taxo = '5600610'; % Taxonomicon
metaData.links.id_WoRMS = '1043427'; % WoRMS
metaData.links.id_fishbase = 'Plicofollis-layardi'; % fishbase

%% References
bibkey = 'Wiki'; type = 'Misc'; bib = ...
'howpublished = {\url{https://en.wikipedia.org/wiki/Plicofollis_layardi}}';
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{../../../bib/Kooy2010.html}}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'AlHuAlBa2021'; type = 'Article'; bib = [ ... 
'doi = {10.1016/j.rsma.2021.101885}, ' ...
'author = {M. Al-Husaini and A. Al-Baz and T. Dashti and S. Rajab;H. Husain},'...
'title = {Age, growth, and reproductive parameters of four species of sea catfish ({S}iluriformes: {A}riidae) from {K}uwaiti waters },'...
'journal = {Regional Studies in Marine Science}, '...
'volume = {46}, '...
'year = {2021}, '...
'pages = {101885}'];
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];
%
bibkey = 'fishbase'; type = 'Misc'; bib = ...
'howpublished = {\url{https://www.fishbase.se/summary/Plicofollis-layardi.html}}';
metaData.biblist.(bibkey) = ['''@', type, '{', bibkey, ', ' bib, '}'';'];

