forrest@0
|
1 |
The Fractal Realizer (FR) code was originally developed under DEC Fortran
|
forrest@0
|
2 |
under ULTRIX (Yeah, incredible, huh?).
|
forrest@0
|
3 |
|
forrest@0
|
4 |
I have updated the Makefile to work well with the Portland Group Fortran
|
forrest@0
|
5 |
77 compiler under RedHat 7.2 Linux.
|
forrest@0
|
6 |
|
forrest@0
|
7 |
Since this is a research code, I assume that users have some facility
|
forrest@0
|
8 |
with compilation and Makefiles. The FR code consists of a visualization
|
forrest@0
|
9 |
portion, written in C, and the FR model itself, written in Fortran.
|
forrest@0
|
10 |
The Fortran portion is a subroutine called by the main C program.
|
forrest@0
|
11 |
The visualization portion is based on the XPM extension to X windows
|
forrest@0
|
12 |
(http://koala.ilog.fr/lehors/xpm.html),
|
forrest@0
|
13 |
written by Arnaud Le Hors. The XPM extension is already present in
|
forrest@0
|
14 |
(almost) all recent versions of operating systems which include X windows,
|
forrest@0
|
15 |
so it is not necessary to get anything new.
|
forrest@0
|
16 |
|
forrest@0
|
17 |
When using non-Portland compilers, change pgf77 in the Makefile to
|
forrest@0
|
18 |
whatever your installation may have. Since the C piece is main, many
|
forrest@0
|
19 |
Fortran compilers need to be given a "nomain" switch, or they get very
|
forrest@0
|
20 |
confused. Since the syntax for this switch varies among compilers, you
|
forrest@0
|
21 |
may have to look up the equivalent switch for your particular compiler.
|
forrest@0
|
22 |
Since we use a lot of common blocks, a switch to align these on common
|
forrest@0
|
23 |
boundaries is helpful also.
|
forrest@0
|
24 |
|
forrest@0
|
25 |
Another typical cross-language problem is the number and placement of
|
forrest@0
|
26 |
underscores in the names. Some compilers want "_MAIN_", while others
|
forrest@0
|
27 |
want "_MAIN" or other variants. Since there is no universal solution,
|
forrest@0
|
28 |
you may have to mess with these names manually.
|
forrest@0
|
29 |
|
forrest@0
|
30 |
Function prototyping may be a problem, but shouldn't be if you use an
|
forrest@0
|
31 |
ANSI-compatible C compiler. We have included a local strdup function,
|
forrest@0
|
32 |
but that shouldn't be a problem either.
|
forrest@0
|
33 |
|
forrest@0
|
34 |
It should be possible to get g77 to work, but I have not pursued this.
|
forrest@0
|
35 |
If you get g77 to work, or modify the Makefile to get other compilers to
|
forrest@0
|
36 |
work, please let me know (hnw@fire.esd.ornl.gov) so that I can incorporate
|
forrest@0
|
37 |
your improvements back into this distribution.
|
forrest@0
|
38 |
|
forrest@0
|
39 |
If you don't understand any of the above, don't worry -- you probably
|
forrest@0
|
40 |
don't have to. JUST TRY IT AND IT WILL PROBABLY WORK.
|
forrest@0
|
41 |
|
forrest@0
|
42 |
|
forrest@0
|
43 |
Say "make depend" and then "make fast" to get an FR executable called
|
forrest@0
|
44 |
"realizer"
|
forrest@0
|
45 |
|
forrest@0
|
46 |
If you modify or do further development, you may wish to say "make debug"
|
forrest@0
|
47 |
or "make profile" to get debug and profile versions of the executable,
|
forrest@0
|
48 |
respectively. This is not necessary to run the present version.
|
forrest@0
|
49 |
|
forrest@0
|
50 |
Then try it out with any of the included script files (*.scr) like this:
|
forrest@0
|
51 |
|
forrest@0
|
52 |
./realizer < whatever.scr
|
forrest@0
|
53 |
|
forrest@0
|
54 |
When the FR runs, it writes an input script called input.scr, so if you
|
forrest@0
|
55 |
just want to change one or a few things, you can rename and edit input.scr
|
forrest@0
|
56 |
and rerun it easily. The order and nature of the question prompts asked
|
forrest@0
|
57 |
by the FR are answer-driven and input-dependent, so larger manual changes
|
forrest@0
|
58 |
to input.scr may not work -- rerun ./realizer without redirected input
|
forrest@0
|
59 |
and answer new questions to regenerate a correct input.scr.
|
forrest@0
|
60 |
|
forrest@0
|
61 |
After the FR runs, it makes two output files called landscape.xpm and
|
forrest@0
|
62 |
ties.xpm
|
forrest@0
|
63 |
|
forrest@0
|
64 |
You can use the XPM utility sxpm, available on most systems, to view these
|
forrest@0
|
65 |
(xv will also work).
|
forrest@0
|
66 |
|
forrest@0
|
67 |
sxpm landscape.xpm
|
forrest@0
|
68 |
|
forrest@0
|
69 |
The FR program uses a heap sort to sort the entire map to find the
|
forrest@0
|
70 |
highest probability sites, so execution time will increase rapidly as
|
forrest@0
|
71 |
the size of the map is increased. Execution time also increases with
|
forrest@0
|
72 |
increasing numbers of categories in the map. Because of the midpoint
|
forrest@0
|
73 |
displacement algorithm for generating (pseudo)fractals, the maps must be
|
forrest@0
|
74 |
square, with sides of (2**n)+1. However, the use of constraint masks
|
forrest@0
|
75 |
will permit oddly-shaped and smaller synthetic maps to be generated
|
forrest@0
|
76 |
while still preserving both p and the fractal dimension of each category.
|
forrest@0
|
77 |
|
forrest@0
|
78 |
We hope that the FR will prove useful (or at least stimulating) to you.
|
forrest@0
|
79 |
Please be sure to cite our Conservation Ecology paper in all work stemming
|
forrest@0
|
80 |
from the use of the FR, and be sure to let us know of any improvements
|
forrest@0
|
81 |
or suggestions that you may have ...
|
forrest@0
|
82 |
|
forrest@0
|
83 |
____ Oak Ridge National Laboratory
|
forrest@0
|
84 |
/ ) / / / / P.O. Box 2008, M.S. 6407
|
forrest@0
|
85 |
/--< o / / /--/ Oak Ridge, TN 37830-6407
|
forrest@0
|
86 |
/___/__<__/__/_ / / _ (865) 241-2748
|
forrest@0
|
87 |
William W. Hargrove (865) 574-4665 (fax)
|
forrest@0
|
88 |
FedEx/UPS, use "Bethel Valley Rd." http://research.esd.ornl.gov
|
forrest@0
|
89 |
hnw@fire.esd.ornl.gov http://research.esd.ornl.gov/~hnw
|