diff --git a/ECMWF_convert_to_ROMS.py b/ECMWF_convert_to_ROMS.py index 12eaf7c..8e56845 100644 --- a/ECMWF_convert_to_ROMS.py +++ b/ECMWF_convert_to_ROMS.py @@ -116,7 +116,7 @@ def write_to_ROMS_netcdf_file(self, config_ecmwf: ECMWF_query, data_array, var_u longitude = ds.variables['longitude'][:] latitude = ds.variables['latitude'][:] time, time_units, time_calendar = self.change_reference_date(ds, config_ecmwf) - netcdf_roms_filename = f"{out_filename[0:-3]}_roms.nc" + netcdf_roms_filename = f"{netcdf_file[0:-3]}_roms.nc" if os.path.exists(netcdf_roms_filename): os.remove(netcdf_roms_filename) logging.info(