TERRAIN Tutorial : How to Run
The first step in preparing to run program TERRAIN, is to create
and edit terrain.deck
-
Type to create terrain.deck:
make terrain.deck
If it is successful, the last message printed will say:
Making terrain deck for your_machine
i.e. Making terrain deck for Compaq (on
a Dec machine)
-
Edit terrain.deck on your machine until
you hit "END OF USER MODIFICATION".
-
The default deck has everything selected to do the SOC
case, so no changes to the deck should be necessary. You
can check the parameters defined in the deck against what
is described in the Notes
(Chapter 15).
-
You seldom or ever need to change anything below the
"END OF USER MODIFICATION" line.
-
Also click on the example terrain.deck
to see highlighted parameters that need to be considered
and changed if you start to configure your own case. Some
of the more commonly used variables have clickable links
with additional information. Other namelist variables
can be left as they are unless there is special need to
change them. (The deck you see here is an example for
Compaq machine.)
-
For complete references to all script variables and namelist
variables, please see section 4.7 - 4.9 in Chapter
4 of the Tutorial Notes.
The next step is to compiler and run program TERRAIN:
terrain.deck >& log &
The terrain.deck will first compile, and output from the compilation
is redirected to a file called 'make.terrain.out'.
You should check this file to see if compilation is carried out
successfully. If the compilation is successful, you should get
four executables created in the src/ directory:
-rwxr-xr-x 1 mesouser users 33632 Oct 23 13:52
src/rdnml
-rwxr-xr-x 1 mesouser users 91856 Oct 23 13:52
src/data_area.exe
-rwxr-xr-x 1 mesouser users 43952 Oct 23 13:52
src/rdem.exe
-rwxr-xr-x 1 mesouser users 2795760 Oct 23 13:52 src/terrain.exe
These executables are used for:
rdnml: |
read namelist and figure out what data to
obtain from ftp site |
data_area.exe: |
used only if you choose 30 sec elevation data
it figures out which tiles to get from USGS ftp site |
rdem.exe: |
used only if you choose 30 sec elevation data
i t reformats the titled USGS data for TERRAIN |
terrain.exe: |
this is the main executable for program TERRAIN |
The deck will then go to NCAR's
ftp site to get the basic set of input data to your local
machine under directory Data/. The ftp
is carried out by using the file ftp.csh in Data/ directory. If
you set NTYPE = 6 in terrain.deck, another ftp script: ftp30s.csh
will also be used to get additional data.
|
If you have problems downloading
the data automatically, download the files manually from
NCAR's
ftp site, and place them in the Data/ directory.
For 30sec data,
|
Next, the deck will run the TERRAIN program. If everything is
successful, you should see these files in the directory:
-rw-r--r--
1 mesouser users 900000 Mar 17 11:15 TER.PLT
-rw-r--r-- 1 mesouser users
170912 Mar 17 11:15 TERRAIN_DOMAIN1
-rw-r--r-- 1 mesouser users
210980 Mar 17 11:15 TERRAIN_DOMAIN2
-rw-r--r-- 1 mesouser users
18149 Mar 17 11:15 terrain.print.out
where terrain.print.out
is log file of all print statements generated by Terrain program,
TERRAIN_DOMAINx are binary output files that are going
to be used by other MM5 programs, and TER.PLT
is a plot file generated by NCAR Graphics. In the SOC case, there
are two domains (MAXNES=2) so you will get two binary output files,
and 15 frames in the plot file. The example uses USGS 24-category
landuse data.
Always check the end of terrain.print.out file to see if this
line appears:
==
NORMAL TERMINATION OF TERRAIN PROGRAM ==
This is a good indication that the Terrain program has successfully
run. Check to see how big the sizes of binary files are - they
shouldn't have 0 size.
To view TER.PLT generated by Terrain, type
idt TER.PLT &
(See man page on idt if necessary: man idt)
If you've seen these files generated in your TERRAIN directory,
and you've checked your plot file to see if they compare OK with
our example TER.PLT,
then your attempt to run the first program in MM5 modeling system
suite is a success!
|
Test to make sure that
the TERRAIN_DOMAINx files have been created correctly. This
can easily been done by making use of the readv3.f
utility. Download this utility to you local compute and
compile (for more information refer to Chapter
14 of the Tutorial Notes).
readv3.exe TERRAIN_DOMAIN1
>& header_log
&
|
You can now move to the next program: REGRID.
|