for file in /ftp/fettweis/MARv3.13/PolarRES/Antarctic/MAR-C*/*1986*;do
	ofile=$(echo $file | rev | cut -d'/' -f 1 | rev)
	echo $ofile
	cdo sellevel,0.9997479 -selvar,TTMAX,TT $file $ofile.tt
	cdo selvar,SF,RF $file $ofile.pr
	cdo merge $ofile.tt $ofile.pr $ofile
	rm $ofile.tt $ofile.pr
done

#cdo -selvar,LON,LAT /ftp/fettweis/MARv3.13/PolarRES/Antarctic/MAR-ERA5/*2000*.nc* gridfile.nc

