#!/bin/csh # # We have to start from the bottom and work our # way up. For the other scripts, it should be the inverse. # This is the script that generates the set of MR floats. # # Robert S Laramee # 13 July 2000 # # compile the program: echo 'compiling oneLevelCoarser.c...' gcc -Wall oneLevelCoarser.c -Iinclude -lm -o oneLevelCoarser.exe # set BASE = "../data" echo 'removing previous coarser data files...' # @ level = 6 @ resolution = 2 # Don't remove the 128 resolution floats! # And it is important to remember that the error data sets are not # generated by the oneLevelCoarser.c program # but by the generateError.c program. while ($resolution <= 64) rm -vf $BASE/level${level}/headRes${resolution}floats.ascii* @ level = $level - 1 @ resolution = $resolution * 2 end # echo 'uncompressing 128^3 resolution input data files...' gunzip -fv $BASE/level0/headRes128floats.ascii.gz gunzip -fv $BASE/level0/headRes128Error.ascii.gz # echo 'generating coarser resolution data...' @ fineLevel = 0 @ coarseLevel = 1 @ fineResolution = 128 @ coarseResolution = 64 while ($coarseLevel <= 6) oneLevelCoarser.exe \ $BASE/level${fineLevel}/headRes${fineResolution}floats.ascii \ $fineResolution $fineResolution $fineResolution > \ $BASE/level${coarseLevel}/headRes${coarseResolution}floats.ascii @ fineLevel = $fineLevel + 1 @ coarseLevel = $coarseLevel + 1 @ fineResolution = $fineResolution / 2 @ coarseResolution = $coarseResolution / 2 end echo 'done generating coarser resolution data' echo 'compressing input & output data files...' @ level = 6 @ resolution = 2 while ($resolution <= 128) gzip -fv $BASE/level${level}/headRes${resolution}floats.ascii gzip -fv $BASE/level${level}/headRes${resolution}Error.ascii @ level = $level - 1 @ resolution = $resolution * 2 end # chmod ugo=r $BASE/level0/headRes128floats.ascii* chmod ugo=r $BASE/level0/headRes128Error.ascii* echo 'one level coarser script finished' # level 0 --> level 1 #oneLevelCoarser.exe $BASE/level0/$BASEFILE 128 128 128 > \