function Usage { echo "Usage: $0 " echo " where is for instance shallow_openad" echo " executed in code_/RefTrans" } if [ $# -ne 1 ] then echo "Error: missing argument" Usage $* exit -1 fi testName=$1 currPath=${PWD%%/code_${testName}/RefTrans} if [ "$currPath/code_${testName}/RefTrans" != "$PWD" ] then echo "Error: not in code_${testName}/RefTrans" Usage $* exit -2 fi fileList='ad_input_code_sf.f ad_input_code_sf.w2f.f ad_input_code_sf.w2f.canon.f ad_input_code_sf.w2f.canon.xaif ad_input_code_sf.w2f.canon.xb.xaif ad_input_code_sf.w2f.canon.xb.x2w.w2f.f ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.f ad_input_code_sf.w2f.canon.xb.x2w.w2f.rs.pp.f ad_input_code.w2f.canon.xb.x2w.w2f.rs.pp.f all_mods.xb.x2w.w2f.pp.f m.out' for i in `echo ${fileList}` do gunzip -c ${i}.gz > ${i} echo "$i old reference (<) vs new file (>)" echo "------------------------------------------------------------------------------" echo "copying" cp ../../../../../MITgcm/verification/OpenAD/build_${testName}/$i $i gzip -f ${i} done