Skip to content

Commit d87f105

Browse files
committed
[WIP] remove pycall dependencies
1 parent 1dbbcc1 commit d87f105

File tree

3 files changed

+6
-9
lines changed

3 files changed

+6
-9
lines changed

Project.toml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name = "Muninn"
2-
uuid = "4b816528-16ba-4e32-9a2e-3c1bc2049d3a"
2+
uuid = "4464dba7-ec91-4867-a90e-42c611bf2148"
33
authors = ["Jordi Bolibar <jordi.bolibar@gmail.com>"]
44
version = "0.3.0"
55

@@ -9,19 +9,17 @@ Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
99
Infiltrator = "5903a43b-9cc3-4c30-8d17-598619ec4e9b"
1010
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
1111
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
12-
PyCall = "438e738f-606a-5dbb-bf0a-cddfbfd45ab0"
1312
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
1413
Revise = "295af30f-e4ad-537b-8983-00126c2a3abe"
15-
Sleipnir = "f5e6c550-199f-11ee-3608-394420200519"
14+
Sleipnir = "e39a38ff-72a2-4fea-8891-9f0a36e6c5fa"
1615
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
1716

1817
[compat]
1918
Infiltrator = "1"
2019
JLD2 = "0.4"
21-
PyCall = "1"
2220
Reexport = "1"
2321
Revise = "3"
24-
Sleipnir = "0.6"
22+
Sleipnir = "0.6.1"
2523
julia = "1.9"
2624

2725
[extras]

src/Muninn.jl

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ using Infiltrator
99
import Pkg
1010
using Distributed
1111
using Dates
12-
using PyCall
1312

1413
### ODINN.jl dependencies ###
1514
using Reexport

src/models/mass_balance/mass_balance_utils.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ end
88
function MB_timestep(model::Model, glacier::G, step::F, t::F) where {F <: AbstractFloat, G <: AbstractGlacier}
99
# First we get the dates of the current time and the previous step
1010
period = partial_year(Day, t - step):Day(1):partial_year(Day, t)
11-
climate_step::PyObject = get_cumulative_climate(glacier.climate.sel(time=period))
11+
climate_step::Dict{String, Any} = get_cumulative_climate(glacier.climate[At(period)])
1212
# Convert climate dataset to 2D based on the glacier's DEM
13-
climate_2D_step::PyObject = downscale_2D_climate(climate_step, glacier)
13+
climate_2D_step::Climate2Dstep = downscale_2D_climate(climate_step, glacier)
1414
MB::Matrix{F} = compute_MB(model.mb_model, climate_2D_step)
1515
return MB
1616
end
1717

18-
18+
1919
function MB_timestep!(model::Model, glacier::G, step::F, t; batch_id::Union{Nothing, I} = nothing) where {I <: Integer, F <: AbstractFloat, G <: AbstractGlacier}
2020
# First we get the dates of the current time and the previous step
2121
period = partial_year(Day, t - step):Day(1):partial_year(Day, t)

0 commit comments

Comments
 (0)