#!/bin/bash
# delete first line
sed  '/setup_case()/d' setup_case.py > temp_file
# add new first line plus global declarations
cat  ../global-GPU temp_file modify_case.py ../STG-GPU.py ../synt_fluct-GPU.py ../pyCALC-LES-GPU.py >  temp_file1;
# find setting of 'gpu' 
'grep' gpu setup_case.py > gpu_value;
# remove leading white space
sed -i 's/^[ \t]*//' gpu_value;
# add value of 'gpu' at first line
cat  gpu_value temp_file1  > exec-pyCALC-LES-GPU.py;
 /home/lada/anaconda3/bin/python -u  exec-pyCALC-LES-GPU.py > out
