#!/bin/bash -l

conda activate e3sm_unified_latest

datadir="b.e11.B1850CN.T31_g37.001/atm"
outdir="climo"
if [ ! -d "$outdir" ];then
  mkdir $outdir
fi

years=1
yeare=500

for var in TS U V T Q TS SOLIN PHIS;do
   files=`echo ts/${var}_*`
   outfile="${outdir}/${var}_climo.nc"
   nces ${files[@]} ${outfile}
done 

