Is there a way to convert a GeoTIFF file into a NetCDF file?
I am specifically interested in using this dataset: MEaSUREs Greenland Monthly Ice Sheet Velocity Mosaics from SAR and Landsat (NSIDC-0731).
Any help would be greatly appreciated.
Convert MEaSUREs GeoTIFF into NetCDF
-
- Posts: 284
- Joined: Thu Jul 11, 2019 4:32 pm America/New_York
-
- Posts: 4
- Joined: Wed Jan 19, 2022 11:45 am America/New_York
Re: Convert MEaSUREs GeoTIFF into NetCDF
You can use the Geospatial Data Abstraction Library (GDAL) in the command line to convert GeoTIFF files into a different format. Make sure GDAL is installed on your workstation before proceeding. You can find further details at https://gdal.org.
Open a terminal/command prompt and navigate to the folder where the file you want to convert is.
Here is an example of a script to convert a GeoTIFF file to NetCDF:
Just substitute your file in place of the example NSIDC-0731 file below:
You can also use GDAL in Python to do the file type conversion. You might find the GDAL in Python Section in this FAQ helpful: https://nsidc.org/support/faq/how-can-i-convert-geotiff-netcdf.
If you want to reproject to lat/lon as well, then we recommend reprojecting before converting to NetCDF.
Here's an FAQ for further guidance: https://nsidc.org/support/faq/how-can-i-reproject-geotiff-file-polar-stereographic-projecton-geographic-latlon.
Open a terminal/command prompt and navigate to the folder where the file you want to convert is.
Here is an example of a script to convert a GeoTIFF file to NetCDF:
Code: Select all
gdal_translate -of NetCDF <input filename> <output filename>
Code: Select all
gdal_translate -of NetCDF GL_vel_mosaic_Monthly_01May21_31May21_vv_v03.0.tif GL_vel_mosaic_Monthly_01May21_31May21_vv_v03.0.nc
If you want to reproject to lat/lon as well, then we recommend reprojecting before converting to NetCDF.
Here's an FAQ for further guidance: https://nsidc.org/support/faq/how-can-i-reproject-geotiff-file-polar-stereographic-projecton-geographic-latlon.