Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ncol warning #285

Closed
linhunt opened this issue Mar 24, 2021 · 16 comments
Closed

ncol warning #285

linhunt opened this issue Mar 24, 2021 · 16 comments

Comments

@linhunt
Copy link

linhunt commented Mar 24, 2021

I was running Circuitscape using ascii files and I received an error message that said
"warning: 2021-03-24 10:56:38 : ncols is not the same"

the program is still running but I am not sure what this warning means. The focal nodes layer was derived from the resistance layer so they should be the same extent and grid size.

@vlandau
Copy link
Member

vlandau commented Aug 10, 2021

@linhunt I think this must be because the width/height of your raster inputs are not the same. If you look at the raster information from a GIS, are you able to find the exact number of columns and rows in each?

@linhunt
Copy link
Author

linhunt commented Aug 11, 2021 via email

@vlandau
Copy link
Member

vlandau commented Aug 11, 2021

They do not need to be perfect squares. They just need to to have the same exact dimensions. Hopefully we'll be able to figure this out once you look into the exact dimensions.

@linhunt
Copy link
Author

linhunt commented Aug 11, 2021 via email

@vlandau
Copy link
Member

vlandau commented Aug 11, 2021

If you are running Circuitscape, you will need two rasters -- one for resistance, and another for the locations of the nodes to connect.

@linhunt
Copy link
Author

linhunt commented Aug 23, 2021 via email

@vlandau
Copy link
Member

vlandau commented Aug 23, 2021

So which error are you getting, ncols is not the same or distance matrices must be symmetric? If it's the latter, we have your other issue in Circuitscape/Omniscape.jl/issues/102, but this one might be easier to debug if it's a smaller problem. Would you mind posting the full stacktrace here in a code block?

@linhunt
Copy link
Author

linhunt commented Aug 23, 2021 via email

@vlandau
Copy link
Member

vlandau commented Aug 23, 2021

There's a good example here. Just click "code" to access it.

@linhunt
Copy link
Author

linhunt commented Aug 30, 2021

I am not sure I am doing this correctly, but this is the distance matrices must be symmetrical error stack trace.

Adjacency / distance matrices must be symmetric
Stacktrace:
 [1] error(::String) at .\error.jl:33
 [2] SimpleWeightedGraph at C:\Users\rgrundel\.julia\packages\SimpleWeightedGraphs\IDzOp\src\simpleweightedgraph.jl:16 [inlined]
 [3] SimpleWeightedGraph at C:\Users\rgrundel\.julia\packages\SimpleWeightedGraphs\IDzOp\src\simpleweightedgraph.jl:27 [inlined]
 [4] compute_advanced_data(::Circuitscape.RasData{Float64,Int64}, ::Circuitscape.RasterFlags, ::Dict{String,String}) at C:\Users\rgrundel\.julia\packages\Circuitscape\9x9VD\src\raster\advanced.jl:56
 [5] calculate_current(::Array{Union{Missing, Float64},2}, ::Array{Union{Missing, Float64},2}, ::Array{Float64,2}, ::Circuitscape.RasterFlags, ::Dict{String,String}, ::DataType) at C:\Users\rgrundel\.julia\packages\Omniscape\UilaE\src\utils.jl:360
 [6] solve_target!(::Int64, ::Int64, ::Dict{String,Int64}, ::Array{Float64,2}, ::Array{Union{Missing, Float64},2}, ::Array{Union{Missing, Float64},2}, ::Omniscape.OmniscapeFlags, ::Dict{String,String}, ::Circuitscape.RasterFlags, ::Circuitscape.OutputFlags, ::Array{Union{Missing, Float64},2}, ::Array{Union{Missing, Float64},2}, ::Array{Union{Missing, Float64},2}, ::Array{Union{Missing, Float64},2}, ::String, ::String, ::Float64, ::Float64, ::Float64, ::Float64, ::Array{Float64,2}, ::Array{Float64,3}, ::Array{Float64,3}, ::DataType) at C:\Users\rgrundel\.julia\packages\Omniscape\UilaE\src\utils.jl:507
 [7] macro expansion at C:\Users\rgrundel\.julia\packages\Omniscape\UilaE\src\main.jl:273 [inlined]
 [8] (::Omniscape.var"#71#threadsfor_fun#15"{Dict{String,Int64},DataType,Omniscape.OmniscapeFlags,String,String,Float64,Float64,Float64,Float64,Dict{String,String},Int64,Circuitscape.OutputFlags,Circuitscape.RasterFlags,ProgressMeter.Progress,Int64,UnitRange{Int64}})(::Bool) at .\threadingconstructs.jl:81
 [9] (::Omniscape.var"#71#threadsfor_fun#15"{Dict{String,Int64},DataType,Omniscape.OmniscapeFlags,String,String,Float64,Float64,Float64,Float64,Dict{String,String},Int64,Circuitscape.OutputFlags,Circuitscape.RasterFlags,ProgressMeter.Progress,Int64,UnitRange{Int64}})() at .\threadingconstructs.jl:48
Stacktrace:
 [1] wait at .\task.jl:267 [inlined]
 [2] threading_run(::Function) at .\threadingconstructs.jl:34
 [3] macro expansion at .\threadingconstructs.jl:93 [inlined]
 [4] run_omniscape(::Dict{String,String}, ::Array{Union{Missing, Float64},2}; reclass_table::Array{Union{Missing, Float64},2}, source_strength::Array{Union{Missing, Float64},2}, condition1::Array{Union{Missing, Float64},2}, condition2::Array{Union{Missing, Float64},2}, condition1_future::Array{Union{Missing, Float64},2}, condition2_future::Array{Union{Missing, Float64},2}, wkt::String, geotransform::Array{Float64,1}, write_outputs::Bool) at C:\Users\rgrundel\.julia\packages\Omniscape\UilaE\src\main.jl:268
 [5] top-level scope at REPL[6]:1

@vlandau
Copy link
Member

vlandau commented Aug 30, 2021

@linhunt thanks! @ranjanan looks like an issue with graph creation in Circuitscape?

@vlandau
Copy link
Member

vlandau commented Aug 30, 2021

@linhunt can you share your inputs via google drive or dropbox so we can reproduce and debug? Also, is this the same issue as Circuitscape/Omniscape.jl/issues/102?

@linhunt
Copy link
Author

linhunt commented Aug 30, 2021

I sure can, the same inputs has produced multiple different errors this is one of the errors we have received, also that there are zero's/negative numbers but I have double checked and there aren't. The other possibly important thing is the inputs successfully ran Omniscape with a smaller block/radius, we are just receiving these errors at a large block/radius size, which doesn't on the surface seems odd but maybe it isn't.

@vlandau
Copy link
Member

vlandau commented Aug 30, 2021

Okay great thanks!

@ranjanan
Copy link
Member

@linhunt just checking if this is still an issue, and if so, could you share your inputs in a dropbox/google drive for us to look at

@ranjanan
Copy link
Member

Closing this, please feel free to reopen if this is still an issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants