Skip to content

Fix scenarios where a variables points to itself #317

@bryan-harter

Description

@bryan-harter

For example, in a file Tenzin recently gave me, one of the DEPEND_1 variables had an attribute of LABL_PTR_1 that was pointing to itself. This caused it to be skipped over entirely when it came to creating variables.

This isn't really ISTP compliant, but that said it shouldn't cause the files to disappear. The way I temporarily got it working was making line 788 look like this:

if (var_name in label_variables) and not ((var_name in depend_dimensions) or (var_name + "_dim" in depend_dimensions)) and (var_name not in uncertainty_variables)

But beyond that, we should make sure ALL variables get created and there isn't anything else in that if/elif/else loop that could sneak by.

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions