pysteps.io.exporters.export_forecast_dataset#
- pysteps.io.exporters.export_forecast_dataset(field, exporter)#
Write a forecast array into a file.
If the exporter was initialized with n_ens_members>1, the written dataset has dimensions (n_ens_members,num_timesteps,shape[0],shape[1]), where shape refers to the shape of the two-dimensional forecast grids. Otherwise, the dimensions are (num_timesteps,shape[0],shape[1]). If the exporter was initialized with incremental!=None, the array is appended to the existing dataset either along the ensemble member or time axis.
- Parameters:
exporter (dict) – An exporter object created with any initialization method implemented in
pysteps.io.exporters
.field (array_like) –
The array to write. The required shape depends on the choice of the ‘incremental’ parameter the exporter was initialized with:
incremental
required shape
None
(num_ens_members,num_timesteps,shape[0],shape[1])
’timestep’
(num_ens_members,shape[0],shape[1])
’member’
(num_timesteps,shape[0],shape[1])
If the exporter was initialized with num_ens_members=1, the num_ens_members dimension is dropped.