library(raster)
# read the netcdf file as raster
nc_raster = raster("input_file.nc")
# if raster crs is NA, set the correct projection using proj4
projection(nc_raster) = CRS(+proj=longlat +datum=WGS84 +ellps=WGS84 +towgs84=0,0,0)
# save output
writeRaster(nc_raster, "nc_raster.tif", "GTiff")
nc文件转换成tif文件使用R语言
最新推荐文章于 2024-04-23 11:12:43 发布