I am attempting to convert the MISR_AM1_AS_AEROSOL_*.nc dataset with 4.4 km resolution to GeoTIFF using Python, but the tif generated is not georeferenced (see image below). I don't have much experience with that so is there a way to do that?
fname = "MISR_AM1_AS_AEROSOL_P206_O112235_F13_0023.nc"
f = nc.Dataset(fname)
var = f['/4.4_KM_PRODUCTS/Aerosol_Optical_Depth']
# Read data.
data = var[:]
lat = f['/4.4_KM_PRODUCTS/Latitude'][:]
lon = f['/4.4_KM_PRODUCTS/Longitude'][:]
fillvalue = var.getncattr('_FillValue')
data[data == fillvalue] = np.nan
data = np.ma.masked_array(data, np.isnan(data))
t = rio.transform.from_origin(lon.min(), lat.max(), 0.044, 0.044)
fout="MISR_AM1_AS_AEROSOL_P206_O112235_F13_0023.tif"
ndt=rio.open(fout, 'w',
driver='GTiff',
height=data.shape[0],
width=data.shape[1],
count=1,
dtype=str(data.dtype),
crs='EPSG:4326',
transform=t)
ndt.write(data,1)
ndt.close()