From 7e25255eed65cb5322576d6280fafcbb00fe972a Mon Sep 17 00:00:00 2001 From: Anne Philipp <anne.philipp@univie.ac.at> Date: Mon, 29 Jul 2019 11:55:09 +0200 Subject: [PATCH] python2 downgrade/ extra check for pure forecast vs one day forecast --- source/python/mods/get_mars_data.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/source/python/mods/get_mars_data.py b/source/python/mods/get_mars_data.py index f862f80..0743c9e 100755 --- a/source/python/mods/get_mars_data.py +++ b/source/python/mods/get_mars_data.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python3 +#!/usr/bin/env python # -*- coding: utf-8 -*- #******************************************************************************* # @Author: Anne Fouilloux (University of Oslo) @@ -56,6 +56,8 @@ Read the documentation for usage instructions. # ------------------------------------------------------------------------------ # MODULES # ------------------------------------------------------------------------------ +from __future__ import print_function + import os import sys import inspect @@ -272,6 +274,10 @@ def mk_dates(c, fluxes): if c.basetime == 0: start = start - timedelta(days=1) + if c.purefc and fluxes and c.maxstep < 24: + start = start - timedelta(days=1) + end = end + timedelta(days=1) + if not c.purefc and fluxes and not c.basetime == 0: start = start - timedelta(days=1) end = end + timedelta(days=1) -- GitLab