Generalization, bugfixes

If an input file is used as a template for the output, the filename has
to be given, instead of assuming atmos_average.nc.
Bugfixes for the shape of input tempi and tauin