All the X,Y coordinates are stored in arrays and can be extracted by:
Let's say we need to extract the value of IR_108 at a specific location (X=500000, Y=250000). Get the array indices for the data point nearest this position:
The grid coords for ...
The process is quite simple:
get the netcdf's latitudes and longitudes as lists;
use these lists to get the column and row of the netcdf's grid that correspond to your point's longitude and latitude, respectively;
use these column and row values to get the netcdf data for your
Below I attach a function that implements the aforementioned workflow ...
When you use the -a_srs flag you are telling GDAL that you know that the projection of the raster is the following epsg code (in your case EPSG:4326) but that is not the projection of your raster (grid_mapping=Lambert_Conformal).
There isn't enough information encoded in the raster to tell us what the actual projection is but you should be able to find it ...
QGIS can read NetCDF vector files but has no visible support for writing them at the moment: https://github.com/qgis/QGIS/issues/30492
You can use GDAL's ogr2ogr though:
ogr2ogr -F netCDF output.nc input.shp
Make sure you throughly read through https://gdal.org/drivers/vector/netcdf.html so that your output is not accidently broken or misleading.
A raster is a set of cells that form a grid; each cell has a value. When you reproject a raster, you are re-drawing the grid to be aligned with a new projection. So, in the below figure, your original raster grid is shown in blue, and the reprojected grid is shown in red.
Right away you can see a problem--the grids do not align. So, for example, in the ...