Loading required package: spam
Loading required package: dotCall64
Loading required package: grid
Spam version 2.7-0 (2021-06-25) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: ‘spam’
The following objects are masked from ‘package:base’:
backsolve, forwardsolve
Loading required package: viridis
Loading required package: viridisLite
See https://github.com/NCAR/Fields for
an extensive vignette, other supplements and source code
Loading required package: lhs
Loading required package: parallel
Loading required package: viztools
Loading required package: usethis
[1] “baresoilFrac_lnd_mean_ens_ssp585_S3” “c3PftFrac_lnd_mean_ens_ssp585_S3” “c4PftFrac_lnd_mean_ens_ssp585_S3”
[4] “cSoil_ens_ssp585_S3” “cVeg_ens_ssp585_S3” “fHarvest_lnd_sum_ens_ssp585_S3”
[7] “fLuc_lnd_sum_ens_ssp585_S3” “lai_lnd_mean_ens_ssp585_S3” “nbp_ens_ssp585_S3”
[10] “npp_ens_ssp585_S3” “rh_lnd_sum_ens_ssp585_S3” “shrubFrac_lnd_mean_ens_ssp585_S3”
[13] “treeFrac_lnd_mean_ens_ssp585_S3”
Which ensemble members match constraints?
Start with Level 2 (Andy’s constraints in NPP, NBP, cSoil and cVeg)
Timeseries of absolute vales
Anomaly timeseries
Include baresoil fraction data
Anomaly timeseries AW + baresoil
End-Of-Century values under various constraints
Starting with AW constraints (level 2) and then bare soil (level3)
Histograms of end-of-century absolute values
Histograms of end-of-century changes (anomaly from preindustrial)
Adding cumulative NBP as a constraint
[,1] [,2] [,3]
[1,] 1 2 3
[2,] 4 5 6
[3,] 7 8 9
[,1] [,2] [,3]
[1,] 1 3 6
[2,] 4 9 15
[3,] 7 15 24
Cumulative NBP in the level 4 constrained ensemble
[1] 37
[1] 12.8
[1] 10
The carbon cycle in level 4 constrained ensemble
Level 5 constraint
rank the level5 members by their 2100 values
2100
139.5931
[1] -175.2754 249.8923 397.8024
Level 5 CNPB, with selected test set members
Level5 has constraints on:
NBP, NPP, cVeg, cSoil, baresoilfrac, cumulativeNBP and treefrac.
Level 5 in green, selected test set in sky blue. Standard in dark blue.
Indices in the design of the test set
[1] "param-perturb-P0918.conf" "param-perturb-P0811.conf" "param-perturb-P0629.conf"
[1] 918 811 629
[,1] [,2] [,3]
[1,] "param-perturb-P0918.conf" "17.3046968083808" "-175.275400905985"
[2,] "param-perturb-P0811.conf" "20.665665082613" "249.892286200105"
[3,] "param-perturb-P0629.conf" "60.7303559460895" "397.802374430549"
[1] "param-perturb-P0506.conf" "param-perturb-P0514.conf" "param-perturb-P0518.conf" "param-perturb-P0534.conf"
[5] "param-perturb-P0535.conf" "param-perturb-P0571.conf" "param-perturb-P0629.conf" "param-perturb-P0633.conf"
[9] "param-perturb-P0637.conf" "param-perturb-P0638.conf" "param-perturb-P0655.conf" "param-perturb-P0668.conf"
[13] "param-perturb-P0689.conf" "param-perturb-P0690.conf" "param-perturb-P0694.conf" "param-perturb-P0699.conf"
[17] "param-perturb-P0708.conf" "param-perturb-P0726.conf" "param-perturb-P0737.conf" "param-perturb-P0767.conf"
[21] "param-perturb-P0779.conf" "param-perturb-P0780.conf" "param-perturb-P0786.conf" "param-perturb-P0788.conf"
[25] "param-perturb-P0792.conf" "param-perturb-P0799.conf" "param-perturb-P0806.conf" "param-perturb-P0811.conf"
[29] "param-perturb-P0812.conf" "param-perturb-P0822.conf" "param-perturb-P0830.conf" "param-perturb-P0846.conf"
[33] "param-perturb-P0859.conf" "param-perturb-P0898.conf" "param-perturb-P0905.conf" "param-perturb-P0909.conf"
[37] "param-perturb-P0911.conf" "param-perturb-P0913.conf" "param-perturb-P0918.conf" "param-perturb-P0926.conf"
[41] "param-perturb-P0968.conf" "param-perturb-P0969.conf" "param-perturb-P0989.conf" "param-perturb-P0999.conf"
[1] 506 514 518 534 535 571 629 633 637 638 655 668 689 690 694 699 708 726 737 767 779 780 786 788 792 799 806 811 812 822 830 846
[33] 859 898 905 909 911 913 918 926 968 969 989 999
RUNID CNBP_1995-2014 CNBP_2100
[1,] "param-perturb-P0506.conf" "-7.84657453995265" "172.205803356935"
[2,] "param-perturb-P0514.conf" "66.3871666776373" "76.9772863665623"
[3,] "param-perturb-P0518.conf" "-4.32798296984071" "115.693002668575"
[4,] "param-perturb-P0534.conf" "55.5836549035358" "166.764130029029"
[5,] "param-perturb-P0535.conf" "47.8569455222457" "236.600922271012"
[6,] "param-perturb-P0571.conf" "23.6581460814361" "129.211811369449"
[7,] "param-perturb-P0629.conf" "60.7303559460895" "397.802374430549"
[8,] "param-perturb-P0633.conf" "15.5122401162351" "120.868837553522"
[9,] "param-perturb-P0637.conf" "46.7165168399118" "247.738717119868"
[10,] "param-perturb-P0638.conf" "58.1146374281919" "44.8472948298766"
[11,] "param-perturb-P0655.conf" "63.1581396245538" "27.0499840531412"
[12,] "param-perturb-P0668.conf" "36.0536153241313" "161.024336589004"
[13,] "param-perturb-P0689.conf" "55.0536357350386" "279.090708879328"
[14,] "param-perturb-P0690.conf" "18.0253016974566" "117.090613265657"
[15,] "param-perturb-P0694.conf" "4.34762479349868" "150.309551049826"
[16,] "param-perturb-P0699.conf" "54.0151616871214" "50.0619408631258"
[17,] "param-perturb-P0708.conf" "-6.67157214936386" "141.559563974736"
[18,] "param-perturb-P0726.conf" "19.2984858197139" "3.36488463251706"
[19,] "param-perturb-P0737.conf" "61.0012780539166" "163.461048185285"
[20,] "param-perturb-P0767.conf" "29.171315753705" "149.289829747145"
[21,] "param-perturb-P0779.conf" "52.9149137034168" "47.5549265466262"
[22,] "param-perturb-P0780.conf" "43.7796426943458" "122.488961475274"
[23,] "param-perturb-P0786.conf" "37.8624365146829" "174.672229024731"
[24,] "param-perturb-P0788.conf" "63.6471834643835" "193.788483182276"
[25,] "param-perturb-P0792.conf" "45.2360506865352" "213.570910964087"
[26,] "param-perturb-P0799.conf" "32.5503106986962" "83.885852928508"
[27,] "param-perturb-P0806.conf" "36.1313820232343" "194.12773028712"
[28,] "param-perturb-P0811.conf" "20.665665082613" "249.892286200105"
[29,] "param-perturb-P0812.conf" "2.31420763940994" "-6.00808795517249"
[30,] "param-perturb-P0822.conf" "37.6308617488356" "90.2274194135868"
[31,] "param-perturb-P0830.conf" "41.3764281016866" "172.710129733403"
[32,] "param-perturb-P0846.conf" "26.3891956711879" "68.4167773199623"
[33,] "param-perturb-P0859.conf" "59.2184963890963" "259.046449634767"
[34,] "param-perturb-P0898.conf" "11.0537941112906" "150.558454240257"
[35,] "param-perturb-P0905.conf" "26.7473630296673" "-76.3858668331925"
[36,] "param-perturb-P0909.conf" "-1.47594975081028" "-28.1145594335714"
[37,] "param-perturb-P0911.conf" "12.6732222928714" "7.4477265118674"
[38,] "param-perturb-P0913.conf" "34.3523735215602" "109.607119430019"
[39,] "param-perturb-P0918.conf" "17.3046968083808" "-175.275400905985"
[40,] "param-perturb-P0926.conf" "-18.1572803411821" "150.761835973614"
[41,] "param-perturb-P0968.conf" "33.1584215550412" "128.828481780042"
[42,] "param-perturb-P0969.conf" "53.5086154392904" "48.2149437084363"
[43,] "param-perturb-P0989.conf" "65.7174836770793" "228.084244827178"
[44,] "param-perturb-P0999.conf" "25.5473538706682" "139.593092216788"
LS0tCnRpdGxlOiAiQW5hbHlzaXMgb2YgSlVMRVMxcDAgZW5zZW1ibGUgU1NQNTg1IgpvdXRwdXQ6CiAgaHRtbF9kb2N1bWVudDoKICAgIHRvYzogeWVzCiAgICB0b2NfZGVwdGg6ICcyJwogICAgZGZfcHJpbnQ6IHBhZ2VkCiAgaHRtbF9ub3RlYm9vazoKICAgIHRvYzogeWVzCiAgICB0b2NfZmxvYXQ6IHllcwogICAgdG9jX2RlcHRoOiAyCiAgICBudW1iZXJfc2VjdGlvbnM6IHllcwotLS0KCgpgYGB7ciwgZWNobyA9IEZBTFNFLCBtZXNzYWdlID0gRkFMU0UsIHdhcm5pbmc9RkFMU0UsIHJlc3VsdHMgPSAnaGlkZSd9CiMgTG9hZCBoZWxwZXIgZnVuY3Rpb25zCgprbml0cjo6b3B0c19jaHVuayRzZXQoZmlnLn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