To give time series spatial data (temperature) in NetCDF format to a CNN model in machine learning, you will need to first convert the data into a format that is compatible with the model. This could include converting it to a numerical array, or a format such as TensorFlow or PyTorch. Once the data has been converted, it can then be used as input to the CNN model. For example, if the data is in the form of a 2D array representing the temperature values over time, then this array could be used as input to the model. Alternatively, if the data is in the form of a 3D array, representing temperature values over time and space, then this array could be used as input to the model. Depending on the complexity of the model, additional data preprocessing may be needed.
If you use Python, you can use Pandas or netCDF4 to read data in NETCDF format, convert it to array format through numpy, and then convert the array to Tensor format through Torch.