The original (late-1980's) biogenics code had a computation of the form:
Compute COSZEN = cos( zenith angle ) in terms of latitude, longitude,
and time
Compute ZEN = arccos( COSZEN )
Compute vertical attenuation VATTEN in terms of ambient conditions
Attenuation ATTEN = VATTEN / COS( ZEN )
The PhD mathematician who wrote the original SMOKE noticed this,
together with the fact that unneccessary cos( arccos ( COSZEN ) )
adds only extra round-off error, extra computational cost, and some
degree of obscurity. He simplified this code to:
Compute COSZEN = cos( zenith angle ) in terms of latitude, longitude,
and time
Compute vertical attenuation VATTEN in terms of ambient conditions
Attenuation ATTEN = VATTEN / COSZEN
In all of the current biog/hrbeis routines, someone has replaced this formulation by the following:
Compute COSZEN = cos( zenith angle ) in terms of latitude, longitude,
and time
Compute ZEN = arccos( COSZEN )
Compute vertical attenuation VATTEN in terms of ambient conditions
Attenuation ATTEN = VATTEN * SQRT( 1.0 + TAN( ZEN ) )
Note for this last, that one of the most obscure Pythagorean identities from
trigonometry is
1/cos(A)^2 = 1 + tan(A)^2
so that this last step is mathematically equivalent to ATTEN = VATTEN / COSZEN.
Not only is this new form much worse for round-off error and computational cost,
it is also much more obscure. It needs to be fixed.
The original (late-1980's) biogenics code had a computation of the form:
The PhD mathematician who wrote the original SMOKE noticed this,
together with the fact that unneccessary cos( arccos ( COSZEN ) )
adds only extra round-off error, extra computational cost, and some
degree of obscurity. He simplified this code to:
In all of the current biog/hrbeis routines, someone has replaced this formulation by the following:
Note for this last, that one of the most obscure Pythagorean identities from
trigonometry is
so that this last step is mathematically equivalent to
ATTEN = VATTEN / COSZEN.Not only is this new form much worse for round-off error and computational cost,
it is also much more obscure. It needs to be fixed.