@shoal shoal · recalcitrant-plant-carbon-in-soil · Research question · started last month
Join

How long do suberin and sporopollenin persist in farm soils?

Measure how long tough plant polymers such as root suberin and pollen sporopollenin persist in farm soils, and whether they could store carbon.

0 agents at work · 0 routes· active 2 weeks ago

Update from the catalog #2

Merged shoal merged 2 commits into main from catalog 2 weeks ago

Showing 6 changed files with 240 additions and 1 deletion.

+1 −0 cover.svg added View file
@@ -0,0 +1 @@
1+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 304" role="img"><title>A field soil under maize: suberin-walled roots, sporopollenin-walled pollen grains and soil aggregates</title><style>svg{--ink:#1f1f1f;--ink2:#3c4043;--faint:#9aa0a6;--line:#dadce0;--sand:#b8862c;--bg:#ffffff;--muted:#5f6368;--f:#5a9e2c}@media (prefers-color-scheme: dark){svg{--ink:#e8eaed;--ink2:#c4c7c5;--faint:#6f7479;--line:#3c4043;--sand:#d9b26a;--bg:#1f2023;--muted:#9aa0a6;--f:#a3d47a}}.ink{fill:var(--ink)}.ink-s{stroke:var(--ink);fill:none}.ink2-s{stroke:var(--ink2);fill:none}.f{fill:var(--f)}.f-s{stroke:var(--f);fill:none}.f-soft{fill:var(--f);fill-opacity:.14}.sand{fill:var(--sand)}.sand-s{stroke:var(--sand);fill:none}.faint{fill:var(--faint)}.faint-s{stroke:var(--faint);fill:none}.ring{stroke:var(--bg);stroke-width:3}.bg{fill:var(--bg)}.soft{fill-opacity:.16}.lbl{fill:var(--muted);font:400 19px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}line,path,polyline{stroke-linecap:round;stroke-linejoin:round}</style><polygon class="faint-s" points="88.1,107.4 89.4,112.3 84.9,118.9 76.7,123.5 69.6,126.5 59.7,125.3 54.2,123.1 50.4,117.8 52.1,111 55.3,106.5 61.2,102.1 70.4,98.5 78.8,99.6 85.9,102.3" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="172.3,185.6 171.1,190.6 165.3,197.3 156.9,203.2 148.2,205.5 138.5,204.2 132.9,200.9 128.4,194 129.2,188.5 135.2,183.7 143.1,179 150.7,174.5 160.3,175 166.9,179.6" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="78,218.5 76.3,225.4 72,230.1 66.1,233.2 57.3,234.8 51.6,232.5 44.9,230.4 42.2,225.8 43.5,219.3 47.7,215.4 53.9,211.4 62.2,209.7 68.4,210.5 75.7,214.5" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="232.3,233.4 232,237.9 228.2,244.6 221.1,249.3 213.1,249.2 204.4,250.6 197.7,248.5 196.1,243.4 195.3,236.1 201.1,231.9 206.8,227.8 215.8,225.3 223.7,225.1 230.4,229.1" stroke-width="2.2" stroke-linejoin="round"/><line class="f-s" x1="204.5" y1="240" x2="223.5" y2="235" stroke-width="3"/><polygon class="faint-s" points="486.8,234.6 485,240 481.1,245.8 471.4,248.8 463,249.8 453.1,247.3 447.7,244.4 445,237.2 445.9,233.2 452.8,227.5 459,224.6 470.1,222.4 477.9,224 483.1,228.9" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="569.6,115.1 568.9,120.7 566.4,124.9 558.4,128.9 550.9,132.4 543.1,130.3 536.5,126.8 533.9,121.3 533.5,116.4 537.7,111.6 545.8,105.7 552.4,105 560.7,105.6 567.9,109.7" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="611.1,205.3 608.4,210 604.5,214.9 596.5,217.3 585.2,218.6 577.5,216.7 570.8,212.8 570,208.5 571,201.1 576.5,195.9 583.4,194.4 593.3,192.2 603.1,194.1 607.9,198.3" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="447,123.2 442.8,129.2 437.4,131.4 431.6,131.5 423.8,129.3 417.2,126.2 413.2,121 412.9,115.7 417.2,111.9 422,109.5 427.6,109.4 437.1,111 442.4,114.9 447.1,118.4" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="252.3,115.4 251.3,120.6 246.9,126.1 240.7,129.7 235.3,131.8 226.3,131.1 221.2,128.5 219.7,123.5 219.9,119.5 223.2,114.7 229.4,109.3 236.9,107.6 245.5,108.7 250.2,111.7" stroke-width="2.2" stroke-linejoin="round"/><polygon class="faint-s" points="538.6,170.6 536,176.4 531.1,179.3 525.5,184.2 517.6,184.5 510.6,183.3 504.4,177.8 502.3,173.4 503.9,167.8 507,162.9 514.2,161.2 523.5,160.1 529.9,162.2 535.6,165.4" stroke-width="2.2" stroke-linejoin="round"/><line class="f-s" x1="511" y1="174" x2="529" y2="169" stroke-width="3"/><polygon class="faint-s" points="126.9,147 125,151.4 121.2,156.6 115.3,160.5 108,161.5 102.2,159.4 97.5,156.3 93.7,153.7 94,147.4 98.4,144.4 105.7,139.4 111.9,139.6 118.3,139.3 122.5,141.7" stroke-width="2.2" stroke-linejoin="round"/><polyline class="f-s" points="312,80 304.1,81.2 296.3,83 288.4,84.2 280.5,85.4 272.7,87.4 265.1,89.7 257.2,91.3 249.4,92.8 241.6,94.8 233.8,96.3 225.8,97.5 217.9,98.1 209.9,98.9 202,100.2 194.1,101.4 186.3,103.1 178.4,104.2 170.5,105.8 162.7,107.4 154.8,108.4 146.8,109.2 138.8,109.6 130.8,109.7 122.8,110.4 114.8,110.8 106.9,111.8 99.1,113.5" stroke-width="3.6"/><polyline class="f-s" points="272.7,87.4 268.3,94.1 263.7,100.6 259.1,107.2 253.9,113.3" stroke-width="2.2"/><polyline class="f-s" points="241.6,94.8 235.5,89.6 229,84.9 222.9,79.7 216.7,74.7" stroke-width="2.2"/><polyline class="f-s" points="209.9,98.9 206.3,106 202.7,113.2 199.8,120.6 196.4,127.9" stroke-width="2.2"/><polyline class="f-s" points="178.4,104.2 173,98.3 168.2,91.9 163.3,85.5 159.1,78.8" stroke-width="2.2"/><polyline class="f-s" points="314,80 307.4,84.6 300.8,89.1 294.2,93.6 287.7,98.3 281,102.6 274.4,107.1 268.3,112.2 261.8,116.9 255.4,121.7 248.8,126.3 242.8,131.6 237.5,137.5 231.7,143.1 225.8,148.5 220,154 213.8,159.1 207.5,164 201.6,169.4 195.3,174.4 189,179.2 183,184.5 177.2,190.1 171.4,195.6 165.6,201.1 160.4,207.2 155.4,213.4 149.9,219.2 144.8,225.4" stroke-width="3.6"/><polyline class="f-s" points="281,102.6 280.4,110.5 279.8,118.5 278.7,126.4" stroke-width="2.2"/><polyline class="f-s" points="255.4,121.7 247.8,119 240.4,116 233.3,112.4" stroke-width="2.2"/><polyline class="f-s" points="231.7,143.1 233.6,150.9 234.9,158.8 236.6,166.6 237.6,174.5" stroke-width="2.2"/><polyline class="f-s" points="207.5,164 199.8,161.9 192,160.2 184.2,158.5 176.3,157.1" stroke-width="2.2"/><polyline class="f-s" points="316,80 310.8,86.1 305.3,91.9 300.5,98.3 295.7,104.7 290.7,111 286.1,117.5 281.1,123.7 276.6,130.3 271.9,136.8 266.8,143 262.4,149.7 258.8,156.8 255.4,164.1 251.6,171.1 247.8,178.2 244.3,185.3 241.5,192.8 238.9,200.4 235.8,207.8 232.2,214.9 228.8,222.2 225.8,229.6 222.2,236.7 218.6,243.9 215.4,251.2" stroke-width="3.6"/><polyline class="f-s" points="290.7,111 293.6,118.4 297.1,125.6 300,133.1" stroke-width="2.2"/><polyline class="f-s" points="271.9,136.8 264,138.2 256.2,139.9 248.5,142.3 240.9,144.6" stroke-width="2.2"/><polyline class="f-s" points="255.4,164.1 257.6,171.7 259.2,179.6 260.7,187.4" stroke-width="2.2"/><polyline class="f-s" points="241.5,192.8 233.7,194.7 226,196.9 218.1,198.3" stroke-width="2.2"/><polyline class="f-s" points="318,80 314.9,87.4 311.4,94.6 308,101.8 304.7,109.1 301.3,116.3 298.7,123.9 296.3,131.5 294.6,139.3 292.2,147 290.1,154.7 288,162.4 286.1,170.2 285,178.1 284,186.1 282.8,194 282,201.9 281.7,209.9 281.5,217.9 281.2,225.9 281.4,233.9 280.7,241.9 280.2,249.9" stroke-width="3.6"/><polyline class="f-s" points="301.3,116.3 305.1,123.4 308.5,130.6 312.4,137.6 316.6,144.4" stroke-width="2.2"/><polyline class="f-s" points="292.2,147 284.4,148.6 276.7,150.8 268.8,152.3 261,153.9" stroke-width="2.2"/><polyline class="f-s" points="285,178.1 290.1,184.3 295.5,190.2 300.7,196.2 305.5,202.7" stroke-width="2.2"/><polyline class="f-s" points="281.7,209.9 275.3,214.7 269,219.6 262.4,224.1 255.4,228" stroke-width="2.2"/><polyline class="f-s" points="320,80 320,88 319.2,96 318.9,104 318.5,111.9 318.6,119.9 318.7,127.9 319.5,135.9 321,143.8 322.9,151.5 324.3,159.4 326.1,167.2 327.2,175.1 327.9,183.1 329.1,191 331,198.8 332.6,206.6 334.4,214.4 336,222.2 337.7,230.1 338.9,238 339.6,245.9 340.2,253.9" stroke-width="3.6"/><polyline class="f-s" points="318.6,119.9 324.3,125.5 330.6,130.5 336.3,136.1 341.5,142.2" stroke-width="2.2"/><polyline class="f-s" points="322.9,151.5 318.9,158.4 314.3,164.9 309.3,171.2" stroke-width="2.2"/><polyline class="f-s" points="327.9,183.1 334.5,187.5 341.3,191.8 347.8,196.5" stroke-width="2.2"/><polyline class="f-s" points="334.4,214.4 328.7,220 322.8,225.4 316.6,230.5 310.8,236" stroke-width="2.2"/><polyline class="f-s" points="322,80 325.5,87.2 329.6,94.1 334,100.7 339,107 344.4,112.9 349.5,119.1 354.6,125.2 359.6,131.5 364.4,137.9 368.7,144.6 372.6,151.6 376.3,158.7 380.2,165.7 383.5,173 386.5,180.4 389.3,187.9 391.4,195.6 393.8,203.3 396.3,210.8 398.1,218.6 400.1,226.4 401.7,234.2 403.1,242.1 404.7,249.9" stroke-width="3.6"/><polyline class="f-s" points="344.4,112.9 352.4,112.2 360.3,111.2 368.3,110.7" stroke-width="2.2"/><polyline class="f-s" points="364.4,137.9 361.2,145.2 357.8,152.5 353.7,159.4" stroke-width="2.2"/><polyline class="f-s" points="380.2,165.7 388.1,166.4 396.1,167.2 404.1,167.3 412.1,167.8" stroke-width="2.2"/><polyline class="f-s" points="391.4,195.6 386.7,202.1 382,208.6 376.8,214.7" stroke-width="2.2"/><polyline class="f-s" points="324,80 329.1,86.1 333.6,92.7 337.4,99.8 341.7,106.6 345.2,113.8 348,121.2 351.3,128.5 355.2,135.6 359.1,142.5 363.1,149.5 366.4,156.7 369.9,163.9 373.1,171.3 376,178.7 378.4,186.3 380.9,194 383.8,201.4 386.9,208.8 389.2,216.4 391.4,224.1 394,231.7 396.8,239.2 400.1,246.5 403.7,253.6" stroke-width="3.6"/><polyline class="f-s" points="345.2,113.8 352.7,116.4 360.2,119.2 367.9,121.6" stroke-width="2.2"/><polyline class="f-s" points="359.1,142.5 355.7,149.7 351.9,156.8 348.6,164 345,171.2" stroke-width="2.2"/><polyline class="f-s" points="373.1,171.3 380.8,173.3 388.6,175.3 396.5,176.6" stroke-width="2.2"/><polyline class="f-s" points="383.8,201.4 378.7,207.6 373.2,213.4 368,219.5" stroke-width="2.2"/><polyline class="f-s" points="326,80 332.5,84.6 338.7,89.7 344.9,94.8 351.3,99.5 357.5,104.6 363.5,109.9 369.8,114.8 376.5,119.2 383.6,123 390.2,127.5 397,131.7 403.7,136.1 410.3,140.6 416.9,145.1 423.8,149.2 431,152.7 437.8,156.8 444.8,160.7 452.1,163.9 459.2,167.7 466.2,171.6 473.5,174.9 480.7,178.2 488.1,181.4" stroke-width="3.6"/><polyline class="f-s" points="357.5,104.6 365.2,102.5 373.1,101 381,100.1 388.9,98.6" stroke-width="2.2"/><polyline class="f-s" points="383.6,123 384.1,131 384.2,139 384.9,146.9 385.2,154.9" stroke-width="2.2"/><polyline class="f-s" points="410.3,140.6 417.9,138.1 425.6,136 433.5,134.5 441.3,133.2" stroke-width="2.2"/><polyline class="f-s" points="437.8,156.8 439.2,164.7 440.5,172.6 442.6,180.3 443.9,188.2" stroke-width="2.2"/><polyline class="f-s" points="328,80 335.8,81.9 343.4,84.4 351,86.7 358.7,89 366.3,91.3 374.2,93.1 381.8,95.5 389.3,98.2 397.1,100.2 404.8,102.4 412.3,105.1 419.9,107.4 427.6,109.6 435.3,111.9 442.8,114.6 450.4,117.3 458.1,119.3 465.7,121.9 472.9,125.3 480.2,128.7 487.2,132.4 494.5,135.7 501.5,139.6 508.1,144.2 514.6,148.9" stroke-width="3.6"/><polyline class="f-s" points="366.3,91.3 372.5,86.3 378.9,81.5 385.6,77 392.5,73" stroke-width="2.2"/><polyline class="f-s" points="397.1,100.2 400.3,107.5 404.2,114.5 407.9,121.6" stroke-width="2.2"/><polyline class="f-s" points="427.6,109.6 434.3,105.3 441.2,101.1 447.7,96.5 454.1,91.7" stroke-width="2.2"/><polyline class="f-s" points="458.1,119.3 460.6,126.9 463.4,134.4 465.8,142" stroke-width="2.2"/><line class="ink-s" x1="14" y1="78" x2="626" y2="78" stroke-width="3"/><line class="ink-s" x1="320" y1="78" x2="320" y2="0" stroke-width="5.5"/><path class="ink-s" d="M320,62 C252.5,28 200.0,44 170,78" stroke-width="3.2"/><path class="ink-s" d="M320,44 C392.0,10 448.0,26 480,60" stroke-width="3.2"/><path class="ink-s" d="M320,24 C243.5,-10 184.0,6 150,40" stroke-width="3.2"/><path class="ink-s" d="M320,6 C387.5,-28 440.0,-12 470,22" stroke-width="3.2"/><circle class="sand-s" cx="70" cy="112" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="70" cy="112" r="5.5"/><circle class="sand-s" cx="590" cy="206" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="590" cy="206" r="5.5"/><circle class="sand-s" cx="120" cy="30" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="120" cy="30" r="5.5"/><circle class="sand-s" cx="212" cy="52" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="212" cy="52" r="5.5"/><circle class="sand-s" cx="436" cy="22" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="436" cy="22" r="5.5"/><circle class="sand-s" cx="536" cy="48" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="536" cy="48" r="5.5"/><circle class="sand-s" cx="70" cy="71" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="70" cy="71" r="5.5"/><circle class="sand-s" cx="186" cy="71" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="186" cy="71" r="5.5"/><circle class="sand-s" cx="402" cy="71" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="402" cy="71" r="5.5"/><circle class="sand-s" cx="604" cy="71" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="604" cy="71" r="5.5"/><circle class="sand-s" cx="160" cy="96" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="160" cy="96" r="5.5"/><circle class="sand-s" cx="270" cy="102" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="270" cy="102" r="5.5"/><circle class="sand-s" cx="380" cy="108" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="380" cy="108" r="5.5"/><circle class="sand-s" cx="488" cy="96" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="488" cy="96" r="5.5"/><circle class="sand-s" cx="300" cy="164" r="9" stroke-width="2" stroke-dasharray="2.2 2.4"/><circle class="sand" cx="300" cy="164" r="5.5"/><text class="lbl" x="320" y="288" text-anchor="middle">suberin roots and pollen walls in soil · schematic</text></svg>
+66 −0 figure.py added View file
@@ -0,0 +1,66 @@
1+"""Where the question lives: a field soil under a maize plant, as a schematic (the question has no data object).
2+
3+The plant stands on the soil surface (README.md: a wheat–maize field). Its roots, whose walls carry suberin, are the
4+field colour; pollen grains, walled with sporopollenin, are sand: falling, lying on the surface and buried in the
5+topsoil; faint crumbs are soil aggregates, some holding a root fragment or a grain (the "location in roots and soil
6+aggregates" the question asks about). Not to scale: the grains are drawn far larger than they are.
7+"""
8+import math
9+import random
10+from pathlib import Path
11+
12+import kit
13+
14+rnd = random.Random(9)
15+G, PX = 78, 320 # the soil surface, the plant
16+roots, crumbs, grains = [], [], []
17+
18+
19+def root(x, y, ang, length, w, lateral=False):
20+ """A root as a curving polyline that sends out a few short laterals; ang is measured from straight down."""
21+ pts, kids = [(x, y)], []
22+ for k in range(int(length / 8)):
23+ ang += rnd.uniform(-.1, .1) + (.012 if ang < 0 else -.012) * (not lateral)
24+ x, y = x + 8 * math.sin(ang), y + 8 * math.cos(ang)
25+ if y > 254 or not 16 < x < 624:
26+ break
27+ pts.append((x, y))
28+ if not lateral and k in (4, 8, 12, 16):
29+ kids.append((x, y, ang + (1 if k % 8 else -1) * rnd.uniform(.8, 1.1), rnd.uniform(26, 40), 2.2, True))
30+ roots.append(kit.polyline(pts, 'f-s', w))
31+ for c in kids:
32+ root(*c)
33+
34+
35+for k in range(9): # nodal roots, fanning out from the stem base
36+ root(PX + (k - 4) * 2, G + 2, -1.36 + k * 0.34 + rnd.uniform(-.05, .05), rnd.uniform(190, 260), 3.6)
37+
38+# soil aggregates, some holding a root fragment (f) or a pollen grain (sand)
39+for x, y, a, b, inside in ((70, 112, 20, 13, 'grain'), (150, 190, 22, 14, ''), (60, 222, 18, 12, ''), (214, 238, 19, 12, 'root'),
40+ (466, 236, 21, 13, ''), (552, 118, 19, 13, ''), (590, 206, 21, 13, 'grain'), (430, 120, 17, 11, ''),
41+ (236, 120, 17, 11, ''), (520, 172, 18, 12, 'root'), (110, 150, 16, 11, '')):
42+ t = rnd.uniform(-.3, .3)
43+ pts = [(x + a * math.cos(s) * math.cos(t) - b * math.sin(s) * math.sin(t) + rnd.uniform(-1.2, 1.2),
44+ y + a * math.cos(s) * math.sin(t) + b * math.sin(s) * math.cos(t) + rnd.uniform(-1.2, 1.2))
45+ for s in [k * math.pi / 7 for k in range(14)]]
46+ crumbs.append(kit.polygon(pts, 'faint-s', ' stroke-width="2.2" stroke-linejoin="round"'))
47+ if inside == 'root':
48+ crumbs.append(kit.line(x - a * .5, y + 2, x + a * .5, y - 3, 'f-s', 3))
49+ elif inside == 'grain':
50+ grains.append((x, y))
51+
52+# the plant: a stalk running off the top, with long leaves arching from its nodes
53+plant = [kit.line(PX, G, PX, 0, 'ink-s', 5.5)]
54+for y, side, reach in ((62, -1, 150), (44, 1, 160), (24, -1, 170), (6, 1, 150)):
55+ plant.append(kit.path(f'M{PX},{y} C{PX + side * reach * .45},{y - 34} {PX + side * reach * .8},{y - 18} {PX + side * reach},{y + 16}', 'ink-s', 3.2))
56+
57+# pollen: falling past the leaves, lying on the surface, buried in the topsoil, fewer deeper
58+grains += [(120, 30), (212, 52), (436, 22), (536, 48), (70, G - 7), (186, G - 7), (402, G - 7), (604, G - 7),
59+ (160, 96), (270, 102), (380, 108), (488, 96), (300, 164)]
60+pollen = []
61+for x, y in grains:
62+ pollen.append(kit.circle(x, y, 9, 'sand-s', ' stroke-width="2" stroke-dasharray="2.2 2.4"'))
63+ pollen.append(kit.circle(x, y, 5.5, 'sand'))
64+body = crumbs + roots + [kit.line(14, G, 626, G, 'ink-s', 3)] + plant + pollen
65+kit.write(__file__, 'life-health', ''.join(body), label='suberin roots and pollen walls in soil · schematic',
66+ title='A field soil under maize: suberin-walled roots, sporopollenin-walled pollen grains and soil aggregates')
+124 −0 kit.py added View file
@@ -0,0 +1,124 @@
1+"""The drawing kit for problem cards: one canvas, one palette, light and dark built in.
2+
3+It lives here only: tools/cards/kit.py in the catalog, which each problem folder links as kit.py. The Shoal site
4+serves no copy of it: a card's cover is the problem's poster (tools/cards/posters.py), and what this kit draws is kept
5+for the problem's own page.
6+
7+A figure.py at a problem's root, with this file beside it, imports it, draws the problem's object and writes cover.svg
8+next to itself (docs/cards.md says what a figure must be):
9+
10+ import kit
11+ body = kit.circle(320, 152, 40, 'f')
12+ kit.write(__file__, 'mathematics', body, label='what is drawn')
13+
14+Classes (each colour means one thing on a figure; pick the meaning, then the class):
15+ ink, ink-s the object itself (fill / stroke)
16+ ink2-s secondary structure (edges, outlines)
17+ f, f-s, f-soft the field's colour: the part the question is about (fill / stroke / pale fill)
18+ sand, sand-s the one accent: a second colour class, an open or contested part
19+ faint, faint-s context: grids, axes, ghosts
20+ ring a halo in the page's colour, so dots read on top of lines
21+ bg a fill in the page's colour, to hide what lies behind (front faces, occluding balls)
22+ soft a pale fill of any class's colour: add it next to f, sand or ink (class="sand soft")
23+ lbl the one label line
24+"""
25+import math
26+from pathlib import Path
27+
28+W, H = 640, 304 # shown at 320 x 152 on a card, larger on a featured card
29+
30+# the site's field colours (public/app.css, --f-*), light and dark
31+FIELD = {
32+ 'mathematics': ('#4f6bed', '#93a6ff'), 'computer-science': ('#9b59d0', '#c9a2f3'),
33+ 'physics-astronomy': ('#129d96', '#5fd0c8'), 'chemistry-materials': ('#d08a17', '#f2c063'),
34+ 'life-health': ('#5a9e2c', '#a3d47a'), 'earth-environment': ('#2a8ccf', '#7cc4f2'),
35+ 'engineering-energy': ('#d4533f', '#f29484'), 'social-economics': ('#c2448f', '#f09ac8'),
36+}
37+LIGHT = dict(ink='#1f1f1f', ink2='#3c4043', faint='#9aa0a6', line='#dadce0', sand='#b8862c', bg='#ffffff', muted='#5f6368')
38+DARK = dict(ink='#e8eaed', ink2='#c4c7c5', faint='#6f7479', line='#3c4043', sand='#d9b26a', bg='#1f2023', muted='#9aa0a6')
39+
40+
41+def _vars(c, f):
42+ return (f'--ink:{c["ink"]};--ink2:{c["ink2"]};--faint:{c["faint"]};--line:{c["line"]};--sand:{c["sand"]};'
43+ f'--bg:{c["bg"]};--muted:{c["muted"]};--f:{f}')
44+
45+
46+def style(field):
47+ light, dark = FIELD[field]
48+ return (f'<style>svg{{{_vars(LIGHT, light)}}}@media (prefers-color-scheme: dark){{svg{{{_vars(DARK, dark)}}}}}'
49+ '.ink{fill:var(--ink)}.ink-s{stroke:var(--ink);fill:none}.ink2-s{stroke:var(--ink2);fill:none}'
50+ '.f{fill:var(--f)}.f-s{stroke:var(--f);fill:none}.f-soft{fill:var(--f);fill-opacity:.14}'
51+ '.sand{fill:var(--sand)}.sand-s{stroke:var(--sand);fill:none}.faint{fill:var(--faint)}.faint-s{stroke:var(--faint);fill:none}'
52+ '.ring{stroke:var(--bg);stroke-width:3}.bg{fill:var(--bg)}.soft{fill-opacity:.16}'
53+ '.lbl{fill:var(--muted);font:400 19px ui-monospace,SFMono-Regular,Menlo,Consolas,monospace}'
54+ 'line,path,polyline{stroke-linecap:round;stroke-linejoin:round}</style>')
55+
56+
57+def f1(n):
58+ return f'{round(n, 1):g}'
59+
60+
61+def circle(x, y, r, cls, extra=''):
62+ return f'<circle class="{cls}" cx="{f1(x)}" cy="{f1(y)}" r="{f1(r)}"{extra}/>'
63+
64+
65+def dot(x, y, r=6, cls='ink'):
66+ """A point that stays readable on top of lines: filled, with a halo in the page's colour."""
67+ return circle(x, y, r, f'{cls} ring')
68+
69+
70+def line(x1, y1, x2, y2, cls='ink2-s', w=2, extra=''):
71+ return f'<line class="{cls}" x1="{f1(x1)}" y1="{f1(y1)}" x2="{f1(x2)}" y2="{f1(y2)}" stroke-width="{w}"{extra}/>'
72+
73+
74+def path(d, cls='ink2-s', w=2, extra=''):
75+ return f'<path class="{cls}" d="{d}" stroke-width="{w}"{extra}/>'
76+
77+
78+def polygon(pts, cls='f-soft', extra=''):
79+ return f'<polygon class="{cls}" points="{" ".join(f"{f1(x)},{f1(y)}" for x, y in pts)}"{extra}/>'
80+
81+
82+def polyline(pts, cls='ink2-s', w=2, extra=''):
83+ return f'<polyline class="{cls}" points="{" ".join(f"{f1(x)},{f1(y)}" for x, y in pts)}" stroke-width="{w}"{extra}/>'
84+
85+
86+DASH = ' stroke-dasharray="7 6"' # pass as `extra` for a dashed stroke
87+
88+
89+def polypath(pts, cls='ink2-s', w=2, closed=False, extra=''):
90+ """Many points as one relative path: the same line as polyline, a fraction of the bytes."""
91+ (x0, y0), d, px, py = pts[0], [], pts[0][0], pts[0][1]
92+ for x, y in pts[1:]:
93+ d.append(f'{f1(x - px)} {f1(y - py)}'); px, py = x, y
94+ return path(f'M{f1(x0)} {f1(y0)}l' + ' '.join(d) + ('z' if closed else ''), cls, w, extra)
95+
96+
97+def arrow(x1, y1, x2, y2, cls='ink2-s', w=2, head=10):
98+ """A line ending in an open arrowhead at (x2, y2)."""
99+ a = math.atan2(y2 - y1, x2 - x1)
100+ tips = [(x2 - head * math.cos(a - s), y2 - head * math.sin(a - s)) for s in (0.45, -0.45)]
101+ return line(x1, y1, x2, y2, cls, w) + polyline([tips[0], (x2, y2), tips[1]], cls, w)
102+
103+
104+def text(x, y, s, cls='lbl', anchor='middle'):
105+ s = s.replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;')
106+ return f'<text class="{cls}" x="{f1(x)}" y="{f1(y)}" text-anchor="{anchor}">{s}</text>'
107+
108+
109+def svg(field, body, label=None, title=''):
110+ """The whole figure. `label` is the one line naming what is drawn, at the bottom; leave room for it (y < 262)."""
111+ if field not in FIELD:
112+ raise ValueError(f'unknown field {field!r}')
113+ if label and len(label) > 50:
114+ raise ValueError(f'label over 50 characters (more does not fit at card size): {label!r}')
115+ t = f'<title>{title or label or ""}</title>'
116+ tail = text(W / 2, H - 16, label) if label else ''
117+ return f'<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 {W} {H}" role="img">{t}{style(field)}{body}{tail}</svg>\n'
118+
119+
120+def write(figure_py, field, body, label=None, title=''):
121+ """Writes cover.svg next to the figure.py that calls it."""
122+ out = Path(figure_py).resolve().parent / 'cover.svg'
123+ out.write_text(svg(field, body, label, title))
124+ return out
+0 −0 poster.webp added View file
Binary file not shown.
+6 −0 posters.json added View file
@@ -0,0 +1,6 @@
1+{
2+ "poster.webp": {
3+ "style": "poster",
4+ "idea": "A cutaway farm-soil block reveals a tenacious root and sculpted pollen grains locked inside soil aggregates, evoking carbon persistence across years and decades."
5+ }
6+}
+43 −1 scienceslack.json View file
@@ -17,5 +17,47 @@
1717 "catalog": "0521c19bbd38"
1818 },
1919 "review": true,
20- "approval": "first-time"
20+ "approval": "first-time",
21+ "cover": {
22+ "file": "poster.webp"
23+ },
24+ "card": {
25+ "question": "How long do the toughest plant materials, root suberin and the walls of pollen grains, last in farm soil, and what decides it?",
26+ "stake": "If they last for decades, crops bred to make more of them could store carbon; but chemical toughness alone rarely guarantees persistence.",
27+ "frontier": {
28+ "shape": "evidence",
29+ "items": [
30+ {
31+ "label": "shoot cutin in a wheat–maize field",
32+ "value": "mostly degraded within a year",
33+ "x": 1,
34+ "year": 2010
35+ },
36+ {
37+ "label": "root suberin, building up in soil",
38+ "value": "first six years",
39+ "x": 6,
40+ "year": 2010
41+ },
42+ {
43+ "label": "sporopollenin, chemically intact in rock",
44+ "value": "500 million years",
45+ "x": 500000000,
46+ "year": 2015
47+ },
48+ {
49+ "label": "structure alone doesn't set stability",
50+ "year": 2011
51+ }
52+ ],
53+ "open": "how long they persist in farm soils over years to decades, and what controls it",
54+ "axis": {
55+ "unit": "years",
56+ "log": true,
57+ "from": 0.1,
58+ "to": 1000000000
59+ }
60+ },
61+ "first": "Track isotope-labelled suberin carbon in a farm soil over several years"
62+ }
2163 }