#TDF to ascii
#06.08.01
#! /bin/csh -fx

foreach file (sub)
angles \
	latitude='yes' \
	longitude='yes' \
	sat_zenith='n' \
	sun_zenith='n' \
	scatter_phase='n' \
	sun_reflection='n' \
	rel_azimuth='n' \
	store_cosines='n' \
	real_output='y' \
	poly_size='100' \
$file

expasc \
	include_vars='latitude longitude avhrr_ch*'\
	all_same_dim='yes'\
	list_dims='no'\
$file \
$file.ascii

echo removing null data points

sed '/\*\*\*/s//0.00/g' $file.ascii >$file.idl

rm $file.ascii
end
