跳转至

14 - 光合作用与 SIF 模拟

动态 PhotosynthesisProcessEnergyBalanceProcess 是同一联合原生状态的 两个产品视图。scene_elements 对齐 Mesh primitive、Turbid component 与地形, summary 给出温度、能量和生理三项收敛残差及真实 executor。

本章介绍动态叶温、Farquhar 光合作用和日光诱导叶绿素荧光(SIF)的统一流程。 同一场景可以包含 Mesh、TurbidBoundary,或两者的混合。

需要哪些属性

参与动态光合和动态 SIF 的叶片 component 需要:

属性域 常用属性 用途
optical Fluspect 叶片反射、透射、吸收和荧光光谱
thermal ThermalProperty 初始温度与长波发射率
biophysical BiophysicalProperty 叶宽、气孔面、热量与水汽交换
physiological Farquhar Angs 和动态 Phi_f
plant.set_property(
    "leaves",
    less.Fluspect(
        N=1.5, cab=45, car=10, cw=0.012, cm=0.006,
        fqe=0.012,
    ),
)
plant.set_property(
    "leaves",
    less.ThermalProperty(
        temperature="air",
        emissivity=0.98,
    ),
)
plant.set_property(
    "leaves",
    less.BiophysicalProperty(
        leaf_width=0.05,
        stomata_side="bottom",
    ),
)
plant.set_property(
    "leaves",
    less.Farquhar(
        Vcmax25=60.0,
        Jmax25=120.0,
    ),
)

Fluspect.fqe 用于静态 SIF。动态 SIF 的 Phi_f 由光合状态计算。

推荐流程

microclimate = less.Microclimate(
    air_temperature=25.0,  # 摄氏度
    humidity=60.0,         # 百分数
    wind_speed=2.0,
    ca=400.0,
)

state = scene.solve(
    microclimate=microclimate,
    modules=["energy_balance", "photosynthesis", "sif"],
)

photo = state.photosynthesis
print("An:", photo.An)
print("gs:", photo.gs)
print("Phi_f:", photo.Phi_f)
print("leaf temperature:", photo.T_leaf)

thermal = scene.simulate(
    less.ThermalImager(
        less.Orthographic(image_size=512),
        bands=[10600.0],
        quality=128,
    )
)

sif = scene.simulate(
    less.SIFImager(
        less.Orthographic(image_size=512),
        bands=[687.0, 740.0, 760.0],
        quality=256,
    )
)

thermal.save("dynamic_temperature.tif")
sif.save("dynamic_sif.tif")

这一次 solve 中,能量平衡、AngsPhi_f 使用同一个耦合状态。 ThermalImagerSIFImager 默认读取这个当前状态,不需要手工传递中间结果。

阳叶和阴叶

直射光在冠层中不是均匀的。LESS 记录:

  • sunlit_fraction:直接见到太阳的叶面积比例;
  • APAR_sunlit:条件阳叶 APAR;
  • APAR_shaded:条件阴叶 APAR;
  • T_sunlitT_shaded:条件阳叶和阴叶温度;
  • An_sunlitAn_shaded:对应的净光合速率。

天空光和多次散射同时进入阳叶和阴叶。只有条件阳叶包含无遮挡直射项。 最终 component 或面片结果按阳叶比例加权:

\[ \overline{An} = p_\mathrm{sunlit} An_\mathrm{sunlit} + (1-p_\mathrm{sunlit}) An_\mathrm{shaded} \]

光合是非线性过程,因此先分别求解阳叶和阴叶,再平均;不能先平均 APAR, 再只运行一次 Farquhar。

结果空间层次

print(photo.spatial_mode)
  • 纯 Mesh 场景返回 "primitive",每个三角面片一个结果;
  • TurbidBoundary 的场景返回 "component"
  • 统计介质中的临时叶面积样本只用于数值积分,不会成为永久体素或场景几何;
  • 如果需要更细的统计介质输出,可把树冠划分为多个 component。

静态 SIF:不需要光合和温度

如果只希望使用给定的 Fluspect.fqe 模拟荧光,可以直接计算静态 SIF:

source = scene.simulate(
    less.SIFProcess(
        mode="static",
        quality="high",
    )
)

image = scene.simulate(
    less.SIFImager(
        less.Orthographic(image_size=512),
        bands=[687.0, 740.0, 760.0],
        quality=256,
        sif_result=source,
    )
)

静态 SIF 不运行 Farquhar,不需要 PhotosynthesisProcess,也不需要温度属性。 它仍然需要 Fluspect,因为反射、透射、吸收、荧光激发和发射光谱来自该属性。

采样质量

动态生理过程可使用质量预设:

state = scene.solve(
    microclimate=microclimate,
    modules=["energy_balance", "photosynthesis", "sif"],
    photosynthesis_kwargs={"quality": "high"},
    sif_kwargs={"quality": "high"},
    seed=42,
)

可选值为 "preview""standard""high"。正式研究还应改变采样数, 检查 APAR、叶温、AngsPhi_f 是否稳定。固定 seed 可复现实验。

三后端一致性

以下后端使用同一套公开 API:

scene = less.Scene(backend="optix")
scene = less.Scene(backend="vulkan")
scene = less.Scene(backend="embree")

OptiX 适合 NVIDIA GPU;Vulkan 可使用支持 Ray Query 的 GPU;Embree 使用 CPU。 切换后端不需要改变 solveThermalImagerSIFImager 的调用方式。

查看闭合与收敛

eb = state.energy_balance.result
print("energy converged:", eb.converged)
print("photo converged:", state.photosynthesis.converged)
print("iterations:", state.photosynthesis.iterations)
print("max residual:", abs(eb.residual[eb.active_mask]).max())

如果光照、微气候、属性或几何发生变化,请重新运行 scene.solve(...)。LESS 会 拒绝把旧状态用于新的 Thermal 或 SIF 图像。

下一步

Mesh 与 Turbid 混合场景

scene.solve(...) 可以同时处理 Mesh 叶片、TurbidBoundary 冠层和地形。 结果中的 scene_elements 会标识每一行对应的场景元素,并提供叶面积、阳叶比例、 阳叶/阴叶温度、APAR、净光合速率和气孔导度等字段。修改场景属性、光照或微气候后, 请重新运行 scene.solve(...),再将新的 energy_balancesif 产品传给成像传感器。

相关 API

  • less.PhotosynthesisProcessless.SIFProcess
  • less.Farquharless.Fluspectless.BiophysicalProperty
  • less.Microclimateless.EnergyBalanceProcess
  • less.SIFImagerless.ThermalImager
  • less.PhotosynthesisProductless.SIFProduct