Page 1 of 1
Convert MEaSUREs GeoTIFF into NetCDF
Posted: Thu Apr 28, 2022 4:16 pm America/New_York
by EarthdataForumContributor
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.
Re: Convert MEaSUREs GeoTIFF into NetCDF
Posted: Thu Apr 28, 2022 4:20 pm America/New_York
by NSIDCx - danicalinda.cantarero
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:
Code: Select all
gdal_translate -of NetCDF <input filename> <output filename>
Just substitute your file in place of the example NSIDC-0731 file below:
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
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.