Code for Reading Cluster Format Files

To help you read the cluster format files it may be helpful to look at some of the code we use. We have a Fortran 90 structure called "a_star" which closely matches the contents of a line of the file. This can be found in define_star.f90. This code also has a routine for reading and writing a single line of the file. This is working code, in the sense that we only recently regularised the internals of our own code so that the sign of the declination is passed via a character. Hence define_star.f90 will also cope with code that does things like set all the elements of the declination negative.

You can see how this is wrapped up into a full routine for reading a file in cluster_match_subs.f90, and should you be curious about what we use this module for, you can look at cluster_match.f90