#! /bin/csh -f

set OUTFILE = tn460nyf.gxgxs.T62.050711.nc
set DOMFILE =  domain.T62.050711.nc

rm $OUTFILE

ncks -A -h -v lat,lon    prec.1958.nc $OUTFILE
ncks -A -h -v area,mask  $DOMFILE     $OUTFILE
ncks -A -h -v time       prec.1958.nc $OUTFILE
ncks -A -h -v prc        prec.1958.nc $OUTFILE

ncatted -h -O -a     history,global,a,c," \nReformatted by `whoami`, `date`"         $OUTFILE
ncatted -h -O -a conventions,global,o,c,"CF-1.0"                                     $OUTFILE

ncatted -h -O -a      units,time,o,c,"days since 0001-01-01 00:00:00" $OUTFILE
ncatted -h -O -a   calendar,time,o,c,"noleap"                         $OUTFILE

#--- why is this attribute created? ---
ncatted -h -O -a nco_openmp_thread_number,global,d,, $OUTFILE

