From 884500b2b7a7a2ab72ae9b4364ec7be27c3886c9 Mon Sep 17 00:00:00 2001 From: Zach Smith Date: Wed, 13 Jul 2022 14:59:10 +0200 Subject: [PATCH] Updated post processing script to output int 32 values for the time steps, since its hours since x date. And updated the scheduled algoa bay forecast run to be at 6AM SAST to avoid any potential problems with UTC 00:00 time zones. Also, previously work included setting the boundary data job to restart on failure (#12 #13) --- .github/workflows/run_algoa-bay-forecast.yml | 2 +- .../post-processing/src/cli/transform/__init__.py | 15 +++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run_algoa-bay-forecast.yml b/.github/workflows/run_algoa-bay-forecast.yml index 3df30bd7..2ef56aec 100644 --- a/.github/workflows/run_algoa-bay-forecast.yml +++ b/.github/workflows/run_algoa-bay-forecast.yml @@ -8,7 +8,7 @@ on: required: false default: schedule: - - cron: '0 0 * * *' # 0200 SAST + - cron: '0 4 * * *' # 0600 SAST env: REGISTRY: ghcr.io diff --git a/models/algoa-bay-forecast/toolkit/post-processing/src/cli/transform/__init__.py b/models/algoa-bay-forecast/toolkit/post-processing/src/cli/transform/__init__.py index 632454eb..2e47098c 100644 --- a/models/algoa-bay-forecast/toolkit/post-processing/src/cli/transform/__init__.py +++ b/models/algoa-bay-forecast/toolkit/post-processing/src/cli/transform/__init__.py @@ -128,7 +128,18 @@ def transform(options, arguments): ) print('-> Generated NetCDF dataset', str(datetime.now() - now)) - #Print output - data_out.to_netcdf(nc_output_path) + # Print output + data_out.to_netcdf(nc_output_path, encoding = { + 'temperature': { }, + 'salt': { }, + 'u': { }, + 'v': { }, + 'm_rho': { }, + 'lon_rho': { }, + 'lat_rho': { }, + 'depth': { }, + 'time': { 'dtype': 'i4' } + }) + print('-> Output NetCDF data to disk', str(datetime.now() - now)) print('\nComplete! If you don\'t see this message there was a problem') \ No newline at end of file