Hello,
I hope you're doing well.
I have downloaded the SPEI data from the web page (https://spei.csic.es/database.html) for analysis. So I have converted the netcdf file into csv format using the code that is attached. After the conversion, I realized that some SPEI values are over -5 and have reached -10 at some points. What in general is not common. Could you welp me to know if I am wrong or if there is some transformation I have to apply to the data before it look normal?
local_storage_directory = 'C:/Users/DELL/OneDrive - WASCAL/These Montpellier CEE-M Dossier/Data/'
netcdf_dir = local_storage_directory + '/SPEI03 data/'
csv_dir = local_storage_directory + '/SPEI03 data/'
netcdf_file_name = 'spei03_clipped_1990_2023.nc'
netcdf_file_in = netcdf_dir + netcdf_file_name
csv_file_out = csv_dir + netcdf_file_name[:-3] + '.csv'
ds = xr.open_dataset(netcdf_file_in)
df = ds.to_dataframe()
df.to_csv(csv_file_out)
Hello,
I hope you're doing well.
I have downloaded the SPEI data from the web page (https://spei.csic.es/database.html) for analysis. So I have converted the netcdf file into csv format using the code that is attached. After the conversion, I realized that some SPEI values are over -5 and have reached -10 at some points. What in general is not common. Could you welp me to know if I am wrong or if there is some transformation I have to apply to the data before it look normal?
local_storage_directory = 'C:/Users/DELL/OneDrive - WASCAL/These Montpellier CEE-M Dossier/Data/'
netcdf_dir = local_storage_directory + '/SPEI03 data/'
csv_dir = local_storage_directory + '/SPEI03 data/'
netcdf_file_name = 'spei03_clipped_1990_2023.nc'
netcdf_file_in = netcdf_dir + netcdf_file_name
csv_file_out = csv_dir + netcdf_file_name[:-3] + '.csv'
ds = xr.open_dataset(netcdf_file_in)
df = ds.to_dataframe()
df.to_csv(csv_file_out)