Skip to content
Snippets Groups Projects
Commit 664de416 authored by Lene Wasskog's avatar Lene Wasskog
Browse files

refactor: Rename variables

parent 8b0d2ce7
No related branches found
No related tags found
No related merge requests found
Pipeline #6011 skipped
......@@ -75,7 +75,6 @@ tm_max = "air_temperature_2m_max"
THRESHOLD = 15
# Run given command using subprocess.run. Handle logging.
def run_command(command, stdout=subprocess.PIPE):
logging.debug(f"{command}")
......@@ -157,8 +156,8 @@ def split_by_date(input_file, prefix):
if __name__ == "__main__":
start_time = time.time() # For logging execution time
today = datetime.now().date()
script_start_time = time.time() # For logging execution time
today = datetime.now().date() # timezone not included, since we are only interested in the year
cron_run = True
# Check if a year argument is provided
......@@ -166,7 +165,6 @@ if __name__ == "__main__":
year = int(sys.argv[1])
cron_run = False
else:
today = datetime.now().date()
year = today.year
# Ensure that model is not run for future year
......@@ -346,7 +344,7 @@ if __name__ == "__main__":
remove_temporary_files()
end_time = time.time()
script_end_time = time.time()
logging.info(
f"End model {model_id} - Execution time: {'{:.2f} seconds'.format(end_time - start_time)}"
f"End model {model_id} - Execution time: {'{:.2f} seconds'.format(script_end_time - script_start_time)}"
)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment