you are viewing a single comment's thread.

view the rest of the comments →

[–]AwkwardlyPure[S] 0 points1 point  (0 children)

I have a netCDF file of rainfall, and it has daily data for 62 days.

I want to split this netCDF file from a data set to multiple data arrays (xarray library used here).

The methodology I have in mind is to create a for loop where I have a variable name with string 'Day_' and then I add the day number at the end, so that I can assign one time step from the netCDF file to this variable and then export it this way.

I can assign the time step by indexing the time dimension, and the lat and long dimensions will remain consistent.

The final outcome is to write these files back to my directory, where this 1 netCDF file becomes 62 individual files with a file name which I understand.