first_use_name, first_use_dim_num = var.find_first_use () # Get the name and dimension number of the first array that uses this scalar, or None if it is not used
83
if first_use_name is not None:
84
dims = bpdata.get_dims (first_use_name)
85
if dims is None:
86
# Try adding a leading slash to deal with the way that bpls reports variable names without one
first_use_name, first_use_dim_num = var.find_first_use () # Get the name and dimension number of the first array that uses this scalar, or None if it is not used
99
if first_use_name is not None:
100
dims = bpdata.get_dims (first_use_name)
101
if dims is None:
102
# Try adding a leading slash to deal with the way that bpls reports variable names without one
103
dims = bpdata.get_dims ("/%s" % first_use_name)
104
if dims is not None:
105
scalar_value = dims[first_use_dim_num]
90
106
91
107
92
if scalar_value is None:
93
scalar_value = 0 # Should be used only for variables that do not appear in any array dimensions
108
if scalar_value is None:
109
scalar_value = 0 # Should be used only for variables that do not appear in any array dimensions