================================= galprop C++ Version 41p ================================= A.W. Strong I.V. Moskalenko Max-Planck-Institut NASA/Goddard Space Flight Center fuer Extraterrestrische Physik Code 660 Postfach 1603 Greenbelt, MD 20771 D-85740 Garching, Germany U.S.A. aws@mpe.mpg.de imos@galprop.gsfc.nasa.gov http://www.gamma.mpe-garching.mpg.de/~aws/aws.html http://lheawww.gsfc.nasa.gov/~imos/cv.html >> 19 Sep 2001 << Introduction ============ This is the C++ version of galprop. Featuring: Galactic cosmic-ray propagation in 2D and 3D nuclear network & cross-sections database electrons, positrons, antiprotons, gamma-rays Stochastic SNR source option. Vector processing option for 3D. Dummy files and routines in the public version: Kcapture_cs.cc crn6.f barpol.dat eval_iso_cs.dat isotope_cs.dat p_cs_fits.dat Documentation of the methods and code is in: galprop.ps On-line documentation is at: http://www.gamma.mpe-garching.mpg.de/~aws/propagate.html More information can be found at xxx.lanl.gov archive "astro-ph" by searching for the author's names. Building galprop ================ The galprop program requires the FITSIO package obtainable from http://heasarc.gsfc.nasa.gov/docs/software/fitsio/ In the following it is assumed FITSIO is a directory (or link) where FITSIO is installed. To build the program the following steps are typical (these are for Sun compiler). f77 -c -fast *.f CC -c -fast -IFITSIO/include *.cc CC *.o -lfsu -lsunmath -lF77 -LFITSIO/lib -lcfitsio -lsocket -lnsl -o galprop if f77 is not available can also do f90 -c -fixed -fast *.f Other compiler examples: PC Linux (at LHEA NASA/GSFC) f77 -c *.f g++ -c -O5 -I/software/lheasoft/release/Linux_2.2_i686/include *.cc g++ *.o ../libs/*.a -L/usr/lib/gcc-lib/i386-redhat-linux/egcs-2.91.66 -L/usr/i386-redhat-linux/lib -lg2c -lm -lgcc -lc DEC Alpha (at LHEA NASA/GSFC) f77 -c *.f g++ -c -O5 -I/software/lheasoft/release/OSF1_4.0_alpha/include *.cc g++ *.o ../libs/*.a -lUfor -lfor -lFutil -lm -lots -lgcc -lc -lgcc Platform-dependent interface: ============================ The code contains several fortran subroutines inherited from the original version. Hence these routines have to be called by the C++ code. Fortran compilers append one or two underscores, "_" or "__" to the symbols for routines in the object code. The interface C++/fortran is handled in one source file: fort_interface1.cc Depending on the compiler, in this routine "_(" may have to be replaced everywhere with "__(" The simplest way to find out is to try it as delivered; if the linker complains of missing routines like "set_sigma__" then replace "_(" by "__(" or viceversa everywhere in fort_interface1.cc The other interface routine: fort_interface2.cc must not be changed. Directory structure =================== In the delivered configuration the following directories are set: ../GALDEF contains the "galdef" files containing run parameters ../FITS contains the input and output FITS data This configuration can be changed by editing Configure.cc and recompiling it and relinking galprop. Input datasets ============== The following input datasets are included in the distribution in ../FITS Interstellar radiation field: isrf_interp_04_000015 HI skymaps: (for gamma-ray skymaps) COMPASS.COR.* CO skymaps: (for gamma-ray skymaps) COMPASS.HIR.* To run galprop ============== cd to the directory where it has been built and do eg galprop 900001 This runs galprop with parameter file ../GALDEF/galdef_39_900001 The output FITS files are in files like ../FITS/nuclei_39_900001 Sample galdef files (e.g. 900001 for 2D and 900002 for 3D) are included in the distribution, and it is suggested to test first with these. This code has been successfull run under Sun/Solaris 6 and 8, Linux, DEC Alpha and with the vectorized options on NEC SX-5 The authors are interested in information on portability to other platforms. Included in this distribution are a number of idl programs (*.pro) which are intended to illustrate how the results can be read and plotted, but they are exemplary only and not maintained or documented. The C++ plotting program will be added as a part of the distribution some time later. The program must be installed in ../CPLOTS directory and uses FITSIO library and GNUPLOT to produce postscript output file (tmp.ps).