Skip to content

Commit

Permalink
run engineering script, add dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
achiang17 committed Oct 28, 2024
1 parent 1c72a3f commit f86a35d
Show file tree
Hide file tree
Showing 9 changed files with 67 additions and 52 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*.DS_Store
*.dbf
*.shp
*.txt

# Files generated by invoking Julia with --code-coverage
*.jl.cov
Expand Down
22 changes: 21 additions & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@ authors = ["Mauricio Lima, Andrew Chiang, Katherine Deck, Ollie Dunbar"]
version = "0.1.0"

[deps]
JuliaFormatter = "98e50ef6-434e-11e9-1051-2b60c6c9e899"
CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b"
CUDA = "052768ef-5323-5732-b1bb-66c8b64840ba"
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
ColorSchemes = "35d6a980-a343-548e-a6ea-1d62b119f2f4"
DSP = "717857b8-e6f2-59f4-9121-6e50c889abd2"
DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0"
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a"
Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab"
NetCDF = "30363a11-5582-574a-97bb-aa9a979735b9"
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
Shapefile = "8e980c4a-a4fe-5da2-b3a7-4b4b0353a2f4"
SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76"
cuDNN = "02a925ec-e4fe-4b08-9a7e-0d78e3d38ccd"

[compat]
julia = "1.10"
2 changes: 1 addition & 1 deletion examples/routing_models/engineering/Config.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# midway data is assumed to be already present

[base]
base = "/groups/esm/achiang/Rivers/data_from_sampo"
base = "/groups/esm/achiang/ClimaRivers.jl/data"

[level]
hydro_lv = "05"
Expand Down
2 changes: 1 addition & 1 deletion examples/routing_models/engineering/engineer_lv05.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using Rivers
using ClimaRivers
using Dates
using TOML

Expand Down
2 changes: 1 addition & 1 deletion examples/routing_models/routing/LSTM-IRF/Config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[base]
base = "/central/scratch/mdemoura/Rivers"
base = "/groups/esm/achiang/ClimaRivers.jl/data"

[level]
hydro_lv = "05"
Expand Down
2 changes: 1 addition & 1 deletion examples/routing_models/routing/gamma-IRF/Config.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[base]
base = "/groups/esm/achiang/Rivers/data_from_sampo"
base = "/groups/esm/achiang/ClimaRivers.jl/data"

[level]
hydro_lv = "05"
Expand Down
1 change: 0 additions & 1 deletion examples/routing_models/routing/gamma-IRF/route_lv05.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ include("../../../../src/routing/routing.jl")

function main()
# Unpack config
#examples/routing_models/routing/
config = TOML.parsefile("examples/routing_models/routing/gamma-IRF/Config.toml")
base = config["base"]["base"]
hydro_lv = config["level"]["hydro_lv"]
Expand Down
43 changes: 41 additions & 2 deletions src/ClimaRivers.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,44 @@
module ClimaRivers

greet() = print("Hello World!")
export grid_points_to_basins, compute_basins_timeseries, merge_and_shift_grdc_files,
gauges_to_basins, caravan_to_basins, create_graph, merge_era5_grdc, attribute_attributes,
select_uniques, extract_basin_lists, write_routing_levels, write_routing_timeseries,
write_routing_attributes

end # module ClimaRivers
export standard_longitudes! # used for plotting in the monte carlo example


# engineering
include("engineering/geo_utils.jl")

include("engineering/grid_points_to_basins.jl")

include("engineering/compute_basins_timeseries.jl")

include("engineering/merge_and_shift_grdc_files.jl")

include("engineering/gauges_to_basins.jl")

include("engineering/caravan_to_basins.jl")

include("engineering/create_graph.jl")

include("engineering/merge_era5_grdc_single.jl")

include("engineering/merge_era5_grdc_graph.jl")

include("engineering/attribute_attributes_single.jl")

include("engineering/attribute_attributes_graph.jl")

include("engineering/select_uniques.jl")

include("engineering/extract_basins.jl")

include("engineering/write_routing_levels.jl")

include("engineering/write_routing_timeseries.jl")

include("engineering/write_routing_attributes.jl")

end # Rivers module
44 changes: 0 additions & 44 deletions src/Rivers.jl

This file was deleted.

0 comments on commit f86a35d

Please sign in to comment.