#!/bin/csh -f

#Script to ncrcat the nc files for plots:

setenv CASE b.e13.Bi1850C5CN.f19_g16.alpha01b.21ka.002
setenv YEAR0 1
setenv YEAR1 507

set year0 = `printf "%04d" $YEAR0`
set year1 = `printf "%04d" $YEAR1`

ncrcat ${CASE}.pop.h.MOC*.nc ${CASE}.pop.h.MOC.${year0}_cat_${year1}.nc
ncrcat Atl_*${CASE}*.nc Atl_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Arc_*${CASE}*.nc Arc_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Gin_*${CASE}*.nc Gin_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Glo_*${CASE}*.nc Glo_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Hud_*${CASE}*.nc Hud_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Ind_*${CASE}*.nc Ind_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Lab_*${CASE}*.nc Lab_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Pac_*${CASE}*.nc Pac_hor_mean_${CASE}.${year0}-${year1}.nc
ncrcat Sou_*${CASE}*.nc Sou_hor_mean_${CASE}.${year0}-${year1}.nc

exit 0
