Bug 899 - Classic atmosphere yields poor results for horizon viewing geometries
Summary: Classic atmosphere yields poor results for horizon viewing geometries
Alias: None
Product: DIRSIG4
Classification: Unclassified
Component: Atmosphere (show other bugs)
Version: 4.4.2-beta
Hardware: Macintosh Intel MacOS 10.6
: P5 normal
Assignee: Scott D. Brown
Depends on:
Reported: 2011-11-22 18:14 EST by Jeff Dank
Modified: 2012-01-12 09:49 EST (History)
1 user (show)

See Also:

Directory files to reproduce scene (32.11 KB, application/x-gzip)
2011-11-22 18:22 EST, Jeff Dank
Directory Structure Again (32.08 KB, application/x-gzip)
2011-11-22 18:30 EST, Jeff Dank

Note You need to log in before you can comment on or make changes to this bug.
Description Jeff Dank 2011-11-22 18:14:45 EST
I've attached all the files needed to reproduce this bug:

Using Modtran5.2.0.0

Used make_adb and dirsig -xml beta version on the d442.sim 
Used make_adb and dirsig -xml release version on the d441.sim

The atmosphere is ~ 4 orders of magnitude different
The ground is ~ the same

Simple scene ... a ground plate, camera looking ~sideways
Comment 1 Jeff Dank 2011-11-22 18:22:36 EST
Created attachment 259 [details]
Directory files to reproduce scene
Comment 2 Jeff Dank 2011-11-22 18:30:49 EST
Created attachment 260 [details]
Directory Structure Again

This just updates the d441.sim file to not have hard coded links in it
Comment 3 Scott D. Brown 2011-11-23 10:09:54 EST
Just to verify, this is using the same version of MODTRAN5 that is NOT working with Threshold Atmosphere model?
Comment 4 Jeff Dank 2011-11-23 11:27:16 EST
yup...same version
Comment 5 Michael Gartley 2011-11-24 06:57:36 EST
just noticed the values for 'GROUND_RANGE = ' in the SENSOR_PATHS sections of the .adb files have negative distance values for ZENITH angles greater than 90 degrees.. my guess is this is contributing somehow for the sky appearing to be brighter in 4.4.2
Comment 6 Scott D. Brown 2011-11-28 12:07:25 EST
Checking out the files you sent now.  Thanks for that BTW, it makes it much easier.

Yes, Mike is right.  Both the 4.4.1 and 4.4.2 ADB files have negative GROUND_RANGE values for some angles.  But, in general, the ADB files are the same. So 4.4.2 is dealing with those bogus ranges differently.
Comment 7 Scott D. Brown 2011-11-28 15:22:08 EST
What a pain this bug is.  I don't have MODTRAN5 2.0.0 here and I run into a different error with MODTRAN itself, rather than the issue with make_adb making bogus ranges.
Comment 8 Scott D. Brown 2011-11-28 15:58:38 EST
So when MODTRAN5 fails for a run above the horizon without a RANGE, it creates an empty "tape7.scn" file rather than one containing -9999.0.  This makes it very hard to differentiate from other types of errors.
Comment 9 Scott D. Brown 2012-01-12 09:48:53 EST
Update on conversations happening outside of Bugzilla:

It was discovered that MODTRAN5 2.0.0 doesn't make an empty "tape7.scn" file when it fails to run the first sky path. Instead, it never creates the "tape7.scn" file.  Furthermore, it doesn't remove a previously generated "tape7.scn" file.  Since make_adb runs a sequence of MODTRAN runs, what was happening was that we saw the "tape7.scn" from the previous run and thought MODTRAN had run correctly.  This was fixed by having make_adb remove an existing "tape7.scn" file prior to running MODTRAN.

The second major discovery was that the updates in earlier versions of 4.4.2 to allow for viewing of exo-atmospheric objects was found to be insufficient. Prior to 4.4.2 you could not see an exo-atmospheric object because we did not include the transmission to space in the calculations (only the sky radiance). In the 4.4.2 beta, we started to use the existing transmissions in the "sensor path" table of the ADB file.  However, we found this was prone to significant scaling artifacts near the horizon. The 4.4.2 final release includes a new transmission term in the downwelled/sky table of the ADB file which is now used for the ground to space transmission.

A test build of make_adb and dirsig was given to Jeff and he was able to verify expected results.  We also ran the new code against our in-house exo-atmospheric examples and got expected results.