diff --git a/src/demand/water_demand.jl b/src/demand/water_demand.jl index 7d00355af..156d9f895 100644 --- a/src/demand/water_demand.jl +++ b/src/demand/water_demand.jl @@ -138,7 +138,7 @@ get_demand_gross(model::NonPaddy) = model.variables.demand_gross get_demand_gross(model::NoIrrigationNonPaddy) = 0.0 """ - update_demand_gross!(Model::NonPaddy, soil::SbmSoilModel) + update_demand_gross!(model::NonPaddy, soil::SbmSoilModel) Update gross water demand `demand_gross` of the non-paddy irrigation model for a single timestep. @@ -396,7 +396,7 @@ function update_demand_gross!(model::Paddy) return nothing end -update_demand_gross!(paddy::NoIrrigationPaddy) = nothing +update_demand_gross!(model::NoIrrigationPaddy) = nothing "Struct to store water demand model variables" @get_units @grid_loc @with_kw struct DemandVariables{T} @@ -696,7 +696,7 @@ function surface_water_allocation_area!(model::AllocationLand, demand, river, ne for j in inds_river[i] act_surfacewater_abst_vol[j] += frac_abstract_sw * available_surfacewater[j] act_surfacewater_abst[j] = - (act_surfacewater_abst_vol[j] / network.river.area[j]) * 1000.0 + (act_surfacewater_abst_vol[j] / network.river.cell_area[j]) * 1000.0 end # water allocated to each land cell. diff --git a/src/flow.jl b/src/flow.jl index 22419b58a..c442cc6e7 100644 --- a/src/flow.jl +++ b/src/flow.jl @@ -2081,7 +2081,7 @@ timestep. function update_lateral_inflow!( model::AbstractRiverFlowModel, external_models::NamedTuple, - river_area, + river_cell_area, land_area, river_indices, dt, @@ -2094,7 +2094,7 @@ function update_lateral_inflow!( get_flux_to_river(subsurface)[river_indices] .+ land.variables.to_river[river_indices] .+ (net_runoff_river[river_indices] .* land_area[river_indices] .* 0.001) ./ dt .+ - (get_nonirrigation_returnflow(allocation) .* 0.001 .* river_area) ./ dt + (get_nonirrigation_returnflow(allocation) .* 0.001 .* river_cell_area) ./ dt ) return nothing end @@ -2225,7 +2225,7 @@ function surface_routing!(model) update_lateral_inflow!( river, (; allocation = river.allocation, runoff, land, subsurface), - network.river.area, + network.river.cell_area, network.land.area, network.river.land_indices, dt, diff --git a/src/sbm_gwf_model.jl b/src/sbm_gwf_model.jl index ca0d102fc..bd94a265c 100644 --- a/src/sbm_gwf_model.jl +++ b/src/sbm_gwf_model.jl @@ -457,7 +457,7 @@ function initialize_sbm_gwf_model(config::Config) order = toposort_river, # water allocation areas allocation_area_indices = river_allocation_area_inds, - area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], + cell_area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], ) elseif river_routing == "local-inertial" river = ( @@ -472,7 +472,7 @@ function initialize_sbm_gwf_model(config::Config) links_at_node = adjacent_links_at_node(graph_river, nodes_at_link), # water allocation areas allocation_area_indices = river_allocation_area_inds, - area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], + cell_area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], ) end diff --git a/src/sbm_model.jl b/src/sbm_model.jl index 661ca78c5..be34ba1b4 100644 --- a/src/sbm_model.jl +++ b/src/sbm_model.jl @@ -388,7 +388,7 @@ function initialize_sbm_model(config::Config) order = toposort_river, # water allocation areas allocation_area_indices = river_allocation_area_inds, - area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], + cell_area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], ) elseif river_routing == "local-inertial" river = ( @@ -403,7 +403,7 @@ function initialize_sbm_model(config::Config) links_at_node = adjacent_links_at_node(graph_river, nodes_at_link), # water allocation areas allocation_area_indices = river_allocation_area_inds, - area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], + cell_area = x_length[inds_land_map2river] .* y_length[inds_land_map2river], ) end