subroutine omflatindex
Check parameters
if(mode == "create")
Create index file
else if(mode == "insert")
Open index file
Read date, observation ID from combined image files
Calculate total counts in mod-8 images
Find row index file to insert entry
Insert entry
Close index file
endif
end subroutine omflatindex