Skip to content

subsurface_water__to_river_volume_flow_rate not recognized as an [output.netcdf_grid.variables] #1018

Description

@AquaPore

Wflow version checks

  • I have checked that this issue has not already been reported.

  • I have checked that this bug exists on the latest version of Wflow.

Reproducible Example

Dear Wflow developer,

Based on Issue_889 which was partially fixed.

I thank you for fixing the error of not getting the output land_surface_water__to_river_volume_flow_rate, which after testing seems to be working.

Nevertheless the computation of the subsurface which flows in the river is not recognised
parameters_routing

TOML FILE

[output.netcdf_grid.variables] 
subsurface_water__to_river_volume_flow_rate = "subsurface_water__to_river_volume_flow_rate" #  [m3 / day] Part of subsurface flow that flows to the river"

Please note that I am running the latest Wflow model.

With kindness,
Joseph A.P. Pollacco

Current behaviour

Error message

 Error: Wflow simulation failed
│   exception =
│    Couldn't obtain a field from this model specified by 'subsurface_water__to_river_volume_flow_rate'.
│    Stacktrace:
│      [1] error(s::String)
│        @ Base .\error.jl:44
│      [2] get_field_in_model(model::@NamedTuple{land::Main.Wflow.LandHydrologySBM{Main.Wflow.NoDemandModel, Main.Wflow.NoAllocationLandModel}, routing::Main.Wflow.Routing{Main.Wflow.OverlandFlowModel{Main.Wflow.KinematicWave, Main.Wflow.LandFlowBC, Main.Wflow.ManningFlowParameters, Main.Wflow.OverLandFlowVariables}, Main.Wflow.RiverFlowModel{Main.Wflow.KinematicWave, Nothing, Main.Wflow.RiverFlowParameters, Main.Wflow.RiverFlowVariables, Main.Wflow.NoAllocationRiverModel}, Main.Wflow.GroundwaterFlowModel{Main.Wflow.SubsurfaceFlowBC{Main.Wflow.RechargeModel, Main.Wflow.GwfRiverModel, Nothing, Nothing}}}, mass_balance::Main.Wflow.NoMassBalance}, name::String; check_allow_dynamic_input::Bool)
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\standard_name\standard_name_utils.jl:188
│      [3] get_field_in_model
│        @ D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\standard_name\standard_name_utils.jl:172 [inlined]
│      [4] out_map(output_names_dict::Dict{String, String}, modelmap::@NamedTuple{land::Main.Wflow.LandHydrologySBM{Main.Wflow.NoDemandModel, Main.Wflow.NoAllocationLandModel}, routing::Main.Wflow.Routing{Main.Wflow.OverlandFlowModel{Main.Wflow.KinematicWave, Main.Wflow.LandFlowBC, Main.Wflow.ManningFlowParameters, Main.Wflow.OverLandFlowVariables}, Main.Wflow.RiverFlowModel{Main.Wflow.KinematicWave, Nothing, Main.Wflow.RiverFlowParameters, Main.Wflow.RiverFlowVariables, Main.Wflow.NoAllocationRiverModel}, Main.Wflow.GroundwaterFlowModel{Main.Wflow.SubsurfaceFlowBC{Main.Wflow.RechargeModel, Main.Wflow.GwfRiverModel, Nothing, Nothing}}}, mass_balance::Main.Wflow.NoMassBalance})
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\io.jl:673
│      [5] Main.Wflow.Writer(config::Main.Wflow.Config, modelmap::@NamedTuple{land::Main.Wflow.LandHydrologySBM{Main.Wflow.NoDemandModel, Main.Wflow.NoAllocationLandModel}, routing::Main.Wflow.Routing{Main.Wflow.OverlandFlowModel{Main.Wflow.KinematicWave, Main.Wflow.LandFlowBC, Main.Wflow.ManningFlowParameters, Main.Wflow.OverLandFlowVariables}, Main.Wflow.RiverFlowModel{Main.Wflow.KinematicWave, Nothing, Main.Wflow.RiverFlowParameters, Main.Wflow.RiverFlowVariables, Main.Wflow.NoAllocationRiverModel}, Main.Wflow.GroundwaterFlowModel{Main.Wflow.SubsurfaceFlowBC{Main.Wflow.RechargeModel, Main.Wflow.GwfRiverModel, Nothing, Nothing}}}, mass_balance::Main.Wflow.NoMassBalance}, domain::Main.Wflow.Domain, nc_static::NCDatasets.NCDataset{Nothing, Missing}; extra_dim::@NamedTuple{name::String, value::Array{Float64, 1}})
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\io.jl:715
│      [6] Main.Wflow.Model(config::Main.Wflow.Config, type::Main.Wflow.SbmGwfModel)
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\sbm_gwf_model.jl:37
│      [7] Main.Wflow.Model(config::Main.Wflow.Config)
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\Wflow.jl:186
│      [8] run(config::Main.Wflow.Config)
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\Wflow.jl:305
│      [9] (::Main.Wflow.var"#751#752"{IOStream, Main.Wflow.Config})()
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\Wflow.jl:286
│     [10] with_logstate(f::Main.Wflow.var"#751#752"{IOStream, Main.Wflow.Config}, logstate::Base.CoreLogging.LogState)
│        @ Base.CoreLogging .\logging\logging.jl:542
│     [11] with_logger
│        @ .\logging\logging.jl:653 [inlined]
│     [12] run(tomlpath::String; silent::Nothing)
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\Wflow.jl:282
│     [13] run(tomlpath::String)
│        @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\Wflow.jl:275
│     [14] top-level scope
│        @ REPL[9]:1
│     [15] eval(m::Module, e::Any)
│        @ Core .\boot.jl:489
│     [16] eval
│        @ .\Base_compiler.jl:146 [inlined]
│     [17] repleval(m::Module, code::Expr, ::String)
│        @ VSCodeServer c:\Users\jpollacco.local\.vscode\extensions\julialang.language-julia-1.219.2\scripts\packages\VSCodeServer\src\repl.jl:278
│     [18] #evalrepl##2
│        @ c:\Users\jpollacco.local\.vscode\extensions\julialang.language-julia-1.219.2\scripts\packages\VSCodeServer\src\repl.jl:241 [inlined]
│     [19] with_logstate(f::VSCodeServer.var"#evalrepl##2#evalrepl##3"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt}, logstate::Base.CoreLogging.LogState)
│        @ Base.CoreLogging .\logging\logging.jl:542
│     [20] with_logger
│        @ .\logging\logging.jl:653 [inlined]
│     [21] (::VSCodeServer.var"#evalrepl##0#evalrepl##1"{Module, Expr, REPL.LineEditREPL, REPL.LineEdit.Prompt})()
│        @ VSCodeServer c:\Users\jpollacco.local\.vscode\extensions\julialang.language-julia-1.219.2\scripts\packages\VSCodeServer\src\repl.jl:242
│     [22] (::VSCodeServer.var"#start_eval_backend##0#start_eval_backend##1")()
│        @ VSCodeServer c:\Users\jpollacco.local\.vscode\extensions\julialang.language-julia-1.219.2\scripts\packages\VSCodeServer\src\eval.jl:34
└ @ Main.Wflow D:\JOE\MAIN\MODELS\WFLOW\Wflow.jl\Wflow\src\Wflow.jl:293

Desired behaviour

Obtaining output subsurface_water__to_river_volume_flow_rate

Additional Context

I also tried:

routing.subsurface_flow.variables.to_river_average= "subsurface_water__to_river_volume_flow_rate"

which also failed

caused by: FieldError: type Main.Wflow.GroundwaterFlowVariables has no field `to_river_average`, available fields: `n`, `head`, `conductance`, `storage`, `q_net`, `q_net_cumulative`, `q_net_average`, `q_net_bnds`, `q_in_cumulative`, `q_in_average`, `q_cumulative`, `q_average`, `exfiltwater_cumulative`, `exfiltwater_average`

Many thanks for any help you may provide,
Joseph A.P. Pollacco

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions