CUG-hydro / BEPS.jl

BEPS Evapotranspiration and Photosynthesis model in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BEPS.jl

Dev CI Codecov

Boreal Ecosystem Productivity Simulator in Julia

Dongdong Kong

BEPS.jl is alive in Julia now. All functions have been ported to Julia, and the performance is about 2.5 times faster than C version.

  • Julia: 0.286327 seconds (822.38 k allocations: 22.998 MiB, 0.85% gc time)
  • C : 0.787059 seconds (629.95 k allocations: 13.915 MiB)

Caution

BEPS.clang only works under Windows.

Install

  • For developers

    git clone https://github.com/CUG-hydro/BEPS.jl
    cd BEPS.jl/deps
    git clone https://github.com/CUG-hydro/BEPS.c
  • For users

    # In Julia
    ] add https://github.com/CUG-hydro/BEPS.jl

Usage

using BEPS
d = deserialize("data/p1_meteo")
lai = readdlm("examples/input/p1_lai.txt")[:]

par = (lon=120.5, lat=30.5, landcover=25, clumping=0.85,
  soil_type=8, Tsoil=2.2,
  soilwater=0.4115, snowdepth=0.0)

@time df_jl, df_ET_jl, Tg = besp_main(d, lai, par; version="julia");

Figure1: The bias of Julia version compared with C, bias = (Julia - C)/ C.

The bias of SH is the largest due to double number accuracy, about 1.48%, which is acceptable.

Figure2: The variation of soil temperature at different depths.

See examples/example_01.qmd for details.

TODO

  • 通量站上测试模型表现 (top1 task)
  • 热浪期间,土壤温度的表现
  • 土壤类型参数
  • clumping index数据处理

Bugs

  • snowpack: depth_snow一直增加,一直到无穷

Researches

  • 研究土壤温度和空气温度之间的关系,为sentinel-2遥感数据反演提供依据
  • 光周期影响测试

References

  1. Hourly BEPS model. https://github.com/JChen-UToronto/BEPS_hourly_site

  2. Daily BEPS model developed by Jane Liu. https://github.com/JChen-UToronto/BEPS_D

About

BEPS Evapotranspiration and Photosynthesis model in Julia

License:GNU General Public License v3.0


Languages

Language:Julia 97.8%Language:Python 2.2%