When no variables defined, the to_netcdf() function of the Topoclass (not topoexport!) raises an error.
Suggestion how to fix it:
add the follow at the beginning of the function:
if variables is None:
variables = list(self.downscaled_pts.keys())
This initializes the variables when not defined to all (which is described as default in the function description.)
Another option would be to remove the sub-setting of 'self.downscaled_pts[variables]' in the te.to_netcdf call and leave it to the topoexport class, which handles it already. But this I would not recommend, since it is prone to errors (when the function changes for example).
When no variables defined, the to_netcdf() function of the Topoclass (not topoexport!) raises an error.
Suggestion how to fix it: add the follow at the beginning of the function:
This initializes the variables when not defined to all (which is described as default in the function description.)
Another option would be to remove the sub-setting of 'self.downscaled_pts[variables]' in the te.to_netcdf call and leave it to the topoexport class, which handles it already. But this I would not recommend, since it is prone to errors (when the function changes for example).