#!/bin/sh

# This script makes ASCII files corresponding to the coordinates
# of an MM5 domain, starting from a TERRAIN file, in the MM5 file
# format.
# At output 3 files are produced:
# COORD

# Give the following information

terrain_file=/home/mm5/mm5gn-anls-eucl3/code.20050602avn/TERRAINS/TERRAIN_MM5GN5 # Full MM5 TERRAIN file name
output_directory=/home/MM5                                                # Output files will be placed there
domain_name=MM5GN5v2                               # Give a name to the MM5 domain (suffixes of output files)

f77 prepcoord.f
echo "'"${terrain_file}"'" | a.out
rm a.out
mv COORD     ${output_directory}/COORD_${domain_name}
mv COORD_DOT ${output_directory}/COORD_${domain_name}_DOT
mv HEIGHT    ${output_directory}/HEIGHT_${domain_name}
