I am trying to do a geotiff file with a netcdf file. I have this file (Sentinel_5_L2). But my code is not run. Anyone know as create the geotiff file?
File https://wetransfer.com/downloads/7c5692bef082bc64999e10d8a7a91e8f20211116115821/7774f8
This is the error
Error in .local(x, ...) :
unused arguments (xmin = -179.996887207031, ymin = c(....)
This is the code.
library(ncdf4)
library(raster)
library(rgdal)
library(ggplot2)
nc_data <- nc_open("TROPOSIF_L2B_2018-06-01.nc")
lon <- ncvar_get(nc_data, "PRODUCT/longitude", verbose=TRUE)
lat <- ncvar_get(nc_data, "PRODUCT/latitude", verbose=TRUE)
SIF_743 <- ncvar_get(nc_data,"PRODUCT/SIF_743", verbose=TRUE)
r <- raster(t(SIF_743), xmin=min(lon), xmx=max(lon), ymin=(lat), ymx=max(lat), crs=CRS("+init=epsg:4326"))
r <- flip(r, direction='y')
plot(r)