Closed AnsleyManke closed 4 years ago
This is fixed in is_attrib_val.F
It's a bug in evaluating expressions that involve getting the value of more than one attribute.
Marco's example is now correct:
yes? let/units="m/s" v1 = 1.1
yes? let/units="mmol C m-3" v2 = 2.2
yes? list/nohead v1.units + v2.units
"m/smmol C m-3"
For numeric results using the attribute-getting syntax, previously it did the same thing - using ..nvars twice!
yes? use coads_climatology
yes? list/nohead ..nvars
7.000
yes? list/nohead ..ndims
3.000
yes? list/nohead ..nvars + ..ndims
14.00
but now,
yes? list/nohead ..nvars + ..ndims
10.00
and, back to another example with string results:
yes? list/nohead slp.long_name + " (" + slp.units + ") " + slp.history
"SEA LEVEL PRESSURE (MB) From coads_climatology"
Marco van Hulton noticed this. Addition can be used to concatenate strings, but depending on the syntax, it's returning incorrect results.
@AndrewWittenberg