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

Empty output file #327

Closed
Mavisan6 opened this issue Oct 29, 2021 · 6 comments
Closed

Empty output file #327

Mavisan6 opened this issue Oct 29, 2021 · 6 comments
Assignees

Comments

@Mavisan6
Copy link

Mavisan6 commented Oct 29, 2021

I have been trying to run a few experiments on circuitscape but the resulting current maps are made of a grid where every cell is zero. Once the experiment it's finished however the console is showing me a grid with numbers. I was wondering whether those numbers were the ones that the output file was supposed to contain.

Here is a folder with the ini file, the focal nodes and resistance map as well as the resulting output map.

https://drive.google.com/drive/folders/1ln5QgznqwC88jvxmOiVWePN_s1M0H3V9?usp=sharing

@vlandau
Copy link
Member

vlandau commented Oct 29, 2021

The numbers that you're seeing printed are the pairwise resistances, and not the cumulative current map. That being said, I am also getting a map of 0s as the cumulative current map, and that shouldn't be the case. I did notice that two of your focal node pixels are labeled as 9990. I assumed that was an error, and to test if that was what was causing the issue, I changed those to -9999 (NoData) prior to reproducing, and I still got a map of 0s.

The cumulative current map is, however, written correctly only if write_cur_maps and write_cum_cur_map_only are both True in the INI file, but this is not ideal/expected.

@ranjanan any idea what might be going on here?

@merijnvdb
Copy link

merijnvdb commented Nov 1, 2021

Hi @vlandau , while my issue is similar I do not think it is a duplicate;
it seems like @Mavisan6 does get output files, but they are not what they should be.

My problem is that no cumulative current map is written at all, despite the tool seeming to run without trouble.

Some details on my input below, I will also attach the node raster file and resistance raster.
https://we.tl/t-CdWoGgDLII (a 5mb WeTransfer file, the Github attach system is not working for me..)

Modeling mode: pairwise
Resistance raster: see attached
Focal node raster: see attached
output file path: a path only one link away from my C-drive (C::folder::subfolder::basefilename)
Write current maps: unchecked
Mapping options: CHECK write cumulative current map only

The rest is left untouched.

Then the process will start...;
Graph has 3462333 nodes, 434 focal nodes and 82 components.
Solving focal pair 1 of 204 ( slightly strange, I would expect 434/2 pairs?)
It will finish successfully, but without any current map to be found in my destination folder.
The only output is: points.asc, resistances.asc (asc, xml and prj file for both), scratch.gdb (containing resistances raster if opened from Arcmap, if opened in directory it shows a lot of GDBTABLE and ATX files I can't make sense of)

If I run everything the same, but CHECK 'write current maps' (regardless of whether write cumulative current map only is checked),
everything seems the same except the process will start with 'Solving focal pair 1 of 20506', so I've never let this process finish of course, it would take ages. It would also have me end up with 20506 partial maps? This process DOES however write those partial current maps.

P.S: When importing the resistance raster it may show min-max different from 1-100, I use 'set raster properties' to change the min and max values to 1 - 100 before using it in Circuitscape. I tried a re-run after actually rescaling the values from 1-100 without any effect.

@ranjanan
Copy link
Member

ranjanan commented Nov 1, 2021

Thanks for posting this. I'll take a look.

@ranjanan ranjanan self-assigned this Nov 1, 2021
@ranjanan
Copy link
Member

ranjanan commented Nov 2, 2021

This should have been picked out by our tests. #330 should fix this, and add a test

@ranjanan
Copy link
Member

ranjanan commented Nov 3, 2021

Fixed by #330

@ranjanan ranjanan closed this as completed Nov 3, 2021
@ranjanan
Copy link
Member

ranjanan commented Nov 3, 2021

@merijnvdb and @Mavisan6 I've fixed this and tagged a new version. Feel free to reopen if it doesn't work.

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

No branches or pull requests

4 participants