I have some NetCDF files (sea level anomaly) and I can open them in Python, but how can I extract pixel values of a specific region (square shape) and save the pixel values as CSV file?
the details of files are like this one, sorry for picture bad quality.
and this is one of the files.(Both links are for the same file)

gdal_translate~ https://gdal.org/programs/gdal_translate.html#gdal-translate – nmtoken Jul 29 '20 at 16:33xarray, you may find the example presented in this question useful: https://stackoverflow.com/questions/58992490/how-to-extract-pixel-value-of-a-variable-projected-on-an-irregular-grid-from-a-n. Once you have extracted a value at a given geocoordinate, you can simply export the dataset to Pandas dataframe then use their.to_csv()method. – Trevor J. Smith Jul 30 '20 at 02:41