Commit 7db99e42 authored by Clément Haëck's avatar Clément Haëck
Browse files

Add support for climatology in datasets

change pregex if climato argument is present
parent ac74978c
......@@ -40,7 +40,13 @@ def create_dataset(module: str, pregex_func: Callable,
return decorated
# Create function to obtain pre-regex
get_pregex = with_args(pregex_func)
def get_pregex(args):
if args.get('climato', None) is not None:
pregex = "{0:d}/{0:d}_%(m)%(d).nc".format(args['climato'])
pregex = pregex_func(args)
return pregex
# Create function to obtain data root directory
Markdown is supported
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