Skip to content

Commit

Permalink
rm Wflow
Browse files Browse the repository at this point in the history
  • Loading branch information
kongdd committed Sep 8, 2024
1 parent 6b5f8b5 commit 1c37c7c
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 212 deletions.
4 changes: 1 addition & 3 deletions Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "Ipaper"
uuid = "e58298cb-69f7-4186-aecd-5834b6793426"
authors = ["Dongdong Kong <kongdd@users.noreply.github.com>"]
version = "0.2.2"
version = "0.2.3"

[deps]
CategoricalArrays = "324d7699-5711-5eae-9e2f-1d82baa6b597"
Expand All @@ -28,7 +28,6 @@ Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
GeoDataFrames = "62cb38b5-d8d2-4862-a48e-6a340996859f"
NaNStatistics = "b946abbf-3ea7-4610-9019-9858bfdeaf2d"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
Wflow = "d48b7d99-76e7-47ae-b1d5-ff0c1cf9a818"

[extensions]
IpaperArchGDALExt = "ArchGDAL"
Expand All @@ -50,7 +49,6 @@ ProgressMeter = "1"
Reexport = "1.2"
Requires = "1.3"
StatsBase = "0.33, 0.34"
Wflow = "0.7"
julia = "1.9"

[extras]
Expand Down
50 changes: 0 additions & 50 deletions ext/IpaperWflowExt.jl

This file was deleted.

Binary file removed src/hydro/data/GuanShan_flwdir.tif
Binary file not shown.
151 changes: 0 additions & 151 deletions src/hydro/test-SubBasins.ipynb

This file was deleted.

11 changes: 3 additions & 8 deletions src/hydro/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,12 @@ function tau2gis(A::AbstractArray)
R
end


function flowdir_drop_missing!(A::AbstractMatrix{T}; mv=T(99)) where {T<:Real}
replace!(A, missing => mv)
replace!(A, 0 => mv)
end

function read_flowdir_wflow(f::String)
function read_flowdir(f::String)
A_gis = read_gdal(f)[:, end:-1:1] # 修正颠倒的lat
A = gis2wflow(A_gis)

nodata = gdal_nodata(f)[1]
# replace!(A, missing => 0)
replace!(A, nodata => 0) # replace missing value with 0
A
end
Expand Down Expand Up @@ -130,4 +125,4 @@ end

export InGrid, DirLength, NextCell, row_goto, col_goto
export gis2wflow, gis2tau, tau2gis
export read_flowdir_wflow, flowdir_drop_missing!
export read_flowdir

0 comments on commit 1c37c7c

Please sign in to comment.