Skip to content

Commit

Permalink
fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Jan 16, 2024
1 parent e3afd5f commit d63bde2
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 20 deletions.
File renamed without changes.
2 changes: 0 additions & 2 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ authors = ["Dongdong Kong <[email protected]>"]
version = "0.1.1"

[deps]
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab"
LabelledArrays = "2ee39098-c373-598a-b85f-a56591580800"
Expand All @@ -17,7 +16,6 @@ Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
UnPack = "3a884ed6-31ef-47d7-9d2a-63182c4928ed"

[compat]
CSV = "0.10"
DataFrames = "1.5, 1.6"
DelimitedFiles = "1.9"
LabelledArrays = "1.14"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# BEPS.jl

Boreal Ecosystem Productivity Simulator in Julia

<!-- [![Stable](https://img.shields.io/badge/docs-stable-blue.svg)](https://CUG-hydro.github.io/BEPS.jl/stable) -->
[![Dev](https://img.shields.io/badge/docs-dev-blue.svg)](https://CUG-hydro.github.io/BEPS.jl/dev)
[![CI](https://github.com/CUG-hydro/BEPS.jl/actions/workflows/CI.yml/badge.svg)](https://github.com/CUG-hydro/BEPS.jl/actions/workflows/CI.yml)
[![Codecov](https://codecov.io/gh/CUG-hydro/BEPS.jl/branch/master/graph/badge.svg)](https://codecov.io/gh/CUG-hydro/BEPS.jl)

Boreal Ecosystem Productivity Simulator in Julia

> Dongdong Kong

Expand Down
4 changes: 2 additions & 2 deletions deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ using Libdl
println(pwd())
println("Hello world!")

run(`make`)
run(`cp BEPS.c/libbeps.dll libbeps.$(dlext)`)
# run(`make`)
# run(`cp BEPS.c/libbeps.dll libbeps.$(dlext)`)
4 changes: 2 additions & 2 deletions examples/example_01.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@

```{julia}
using BEPS
using RTableTools
# using BEPS.clang
# using Ipaper
f = "examples/input/p1_meteo.txt"
d = fread(f)
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,
soil_type=8, Tsoil=2.2,
soilwater=0.4115, snowdepth=0.0)
```

Expand Down
3 changes: 3 additions & 0 deletions src/BEPS.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ export besp_main
export clang


path_proj(f...) = normpath(joinpath(@__DIR__, "..", f...))
libbeps = path_proj("deps/libbeps.dll")

# import Statistics: mean, std
include("IO.jl")
include("Ipaper.jl")
Expand Down
17 changes: 8 additions & 9 deletions src/IO.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

import DataFrames: DataFrame
import CSV
using DelimitedFiles: readdlm


Expand All @@ -19,11 +18,11 @@ function Base.max(df::DataFrame)
list(keys, vals)
end

fread(f) = DataFrame(CSV.File(f))
fwrite(df, file) = begin
# dirname(file) |> check_dir
CSV.write(file, df)
end


export fread, fwrite, readdlm
# import CSV
# fread(f) = DataFrame(CSV.File(f))
# fwrite(df, file) = begin
# # dirname(file) |> check_dir
# CSV.write(file, df)
# end
# export fread, fwrite,
readdlm
5 changes: 2 additions & 3 deletions src/clang/BEPS_c.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,12 @@ module clang
# export BEPS_jll

# using CEnum
const libbeps = "deps/libbeps.dll"


import Base: RefValue, RefArray
TypeRef{T} = Union{Ref{T},RefArray{T,Vector{T},Nothing}}

using BEPS
import BEPS: libbeps
# const libbeps = "deps/libbeps.dll"

# include("../DataType/DataType.jl")
# include("helpers.jl")
Expand Down

0 comments on commit d63bde2

Please sign in to comment.