diff --git a/django_project/gap/ingestor/cbam_bias_adjust.py b/django_project/gap/ingestor/cbam_bias_adjust.py index 1f68098d..b4611b0e 100644 --- a/django_project/gap/ingestor/cbam_bias_adjust.py +++ b/django_project/gap/ingestor/cbam_bias_adjust.py @@ -291,7 +291,9 @@ def _append_new_date( } } for var in self.variables: - empty_data = da.empty(empty_shape, chunks=chunks) + empty_data = da.full( + empty_shape, np.nan, dtype='f8', chunks=chunks + ) data_vars[var] = ( ['date', 'lat', 'lon'], empty_data diff --git a/django_project/gap/ingestor/tio_shortterm.py b/django_project/gap/ingestor/tio_shortterm.py index 4dc024be..ff920ebc 100644 --- a/django_project/gap/ingestor/tio_shortterm.py +++ b/django_project/gap/ingestor/tio_shortterm.py @@ -270,7 +270,9 @@ def _append_new_forecast_date( } } for var in self.variables: - empty_data = da.empty(empty_shape, chunks=chunks) + empty_data = da.full( + empty_shape, np.nan, dtype='f8', chunks=chunks + ) data_vars[var] = ( ['forecast_date', 'forecast_day_idx', 'lat', 'lon'], empty_data @@ -532,7 +534,7 @@ def _process_tio_shortterm_data( # initialize empty new data for each variable new_data = {} for variable in self.variables: - new_data[variable] = np.empty(data_shape) + new_data[variable] = np.full(data_shape, np.nan, dtype='f8') for idx_lat, lat in enumerate(lat_arr): for idx_lon, lon in enumerate(lon_arr):