Commit 8c51e5a1 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

--begin and --end for time series.

parent f3571a47
......@@ -92,6 +92,14 @@ def main():
help=f'output a value of the time series '
f'every n years. cannot be used together '
f'with --res')
series_base_parser.add_argument('--begin', metavar='b', type=float,
help=f'beginning of the time series. if '
f'not given, use the earliest year '
series_base_parser.add_argument('--end', metavar='e', type=float,
help=f'end of the time series. if '
f'not given, use the latest year '
# the subparser for commands
subparsers = parser.add_subparsers(dest='command', required=True)
# parser for the master curve handling
......@@ -80,6 +80,17 @@ def args2times(args):
with open(args.input, 'r') as fh:
t_min, t_max = map(float, fh.readline().split()[0:2])
if args.begin is not None:
if args.longterm:
t_min = lt2yr(args.begin)
t_min = args.begin
if args.end is not None:
if args.longterm:
t_max = lt2yr(args.end)
t_max = args.end
if args.every is not None:
times = np.arange(t_min, t_max + args.every, args.every)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment