TransWikia.com

Extract pixel values of NetCDF and save them as CSV

Geographic Information Systems Asked by Kourosh Shahryari on October 2, 2021

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?


enter image description here

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)

https://gofile.io/d/TVzuSO

https://filebin.net/mxwe3t466wdngzuk

One Answer

You can try using rioxarray & xarray:

If you are able to provide a file, a more targeted example could be given.

EDIT: In case you have lon 0-360, these links should help:

Based on this comment from the moderators:

Your questions should as much as possible describe not just what you want to do, but precisely what you have tried and where you are stuck trying that.

Mind attempting to come up with a solution based on the links referenced here and adding code you have attempted and any errors you have run into to the question?

Answered by snowman2 on October 2, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP