#!/bin/bash

set -ex

set=$1

cd ${set}

for run in HIPPO_r*i*p*f* ; do 

   bash ../compute_hadley_cell.py.bash ${run}/timeseries/mon/${run}_mastrfu_mon.nc  ${run}/timeseries/mon/${run}_hadley_mon.nc

   CDO_FILE_SUFFIX="_mon.nc" cdo splitvar ${run}/timeseries/mon/${run}_hadley_mon.nc ${run}/timeseries/mon/${run}_ && rm ${run}/timeseries/mon/${run}_hadley_mon.nc

done # run

exit 0
