------------------------------------------------------------------------
An icosahedron based method for even binning of globally distributed remote sensing data
------------------------------------------------------------------------
N. Teanby
------------------------------------------------------------------------

Suite of programs for performing subdivided icosahedral binning on x,y,z ASCII data, where x is the longitude, y is the latitude, and z is the value of the dependent variable.

Running IDL programs
--------------------

start IDL and type '.run synth' (for example)

Test Dataset
------------

Synthetic data is made using 'synth.pro'. This makes a data file based on a raster scan of a planet taken from directly over its north pole.

supplied test dataset:
synth.dat		lon,lat,z triplets, where z = lat/90 + G(0,0.5)

Change variable 'noiselevel' to change the noise.
Change variables 'dx' and 'dy' to change the grid spacing.

Binning Programs
----------------

binicos.pro    bin the test data from 'synth.dat' and output 'synth.bin_icos'
               change variable 'icoslevel' to change number of subdivisions.
               change 'step' from 2 to 3 or 5 to give additional grid spacings.
binrect.pro    bin the test data from 'synth.dat' and output 'synth.bin_rect'
               change variables 'wlat' and 'wlon' to use different
               bin widths.

Plotting the Output
-------------------

plotxyz.pro    plot contour map of the binned output. Edit 'infile' in the 
               program to plot either 'synth.bin_icos' or 'synth.bin_rect'

Points to Note
--------------

The subdivided icosahedral binning is designed to give accurate binning of the data around polar regions. Compare the contour plots for the rectangular and icosahedral binning methods and note how the rectangular bins introduce distortions around the pole, whereas the icosahedral bin does not.


Included Routines
-----------------

binicos.pro				driver program for icosahedral binning
binrect.pro				program for conventional rectangular binning
synth.pro				program for making synthetic the dataset
plotxyz.pro				program to plot the binned output from
					binicos.pro or binrect.pro

fangular_sep.pro			subroutines/functions
finsides.pro
nlines.pro
zicosbin.pro
zlonlat2xyz.pro
ztesselation_varstep.pro
ztriangulate.pro

Included Example Files
----------------------

synth.dat				synthetic observation
synth.xy				synthetic observation 
					(x,y coords in spacecraft frame)
synth.bin_rect			synth.dat binned with rectangular bins
synth.bin_icos			synth.dat binned with subdivided icosahedral bins


