#!/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=/COMPERES/pub/mm5/TERRAIN_FILES/TERRAIN_MM5FRA18  # Full MM5 TERRAIN file name
output_directory=../meteo  # Output files will be placed there
domain_name=MM5FRA18       # 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}
