Skip to content

Conversation

@Rosejoycrocker
Copy link
Contributor

habitable_locs is a BitVector which describes which locations have k>0.0. This was being used incorrectly in several places but was unnoticed due to Moore having no locations with k=0.0. For example habitable_loc_areas was reshaped to length habitable_locs', but habitable_loc_areasmay be shorter than habitable_locs' due to filtering using `habitable_locs'.

Unnoticed previously as all locs in Moore domain are habitable
@Rosejoycrocker Rosejoycrocker self-assigned this Jan 30, 2025
@Rosejoycrocker Rosejoycrocker added the bug Something isn't working label Jan 30, 2025
Comment on lines +537 to +538

habitable_loc_areas′ = reshape(habitable_loc_areas, (1, 1, length(habitable_loc_areas)))
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the reason for the additional whitespace?

@ConnectedSystems
Copy link
Collaborator

unnoticed due to Moore having no locations with k=0.0

Not saying there isn't a problem, but I find this hard to believe as the related code hasn't changed in a long time and we were using the older representation of Moore for a long time (which does have 0 valued site areas).

I'll have to check the GBR-wide dataset too.

@Rosejoycrocker
Copy link
Contributor Author

unnoticed due to Moore having no locations with k=0.0

Not saying there isn't a problem, but I find this hard to believe as the related code hasn't changed in a long time and we were using the older representation of Moore for a long time (which does have 0 valued site areas).

I'll have to check the GBR-wide dataset too.

Perhaps not all of these changes are necessary but some lines don't make sense to me logically. For example
habitable_loc_areas' = reshape(habitable_loc_areas, (1, 1, length(habitable_locs))) where habitable_loc_areas=vec_abs_k[habitable_locs] is bound to break because habitable_locs is a bit vector, so unless it is always all trues, habitable_loc_areas will be shorter than habitable_locs and the reshape will error.

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

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants