I need to export a folder (with subfolders) of rasters (saved as Geotif files) to a single netcdf file. I have done this by creating a mosaic dataset within a file geodatabase, then adding all the rasters within the file tree to the mosaic dataset. Then, I used the tool Raster to Netcdf to create the .nc file I need. However, when I look in the .nc file in R where I need to do further processing, the names of each raster in the .nc file are reduced to x1, x2, etc. I opened the .nc file in ArcMap, and looked under the netcdf tab in the layer properties. The dimension is called Record ID and the values under the dropdown menu are values 0-8131, so it appears that the Raster to Netcdf is just numbering the rasters starting with 0.
My question: Does anyone know how to export rasters to netcdf in Arc while preserving the names of the rasters in the output .nc file? The name of each raster is the date and I need that for further processing. When I look in the mosaic dataset in ArcCatalog, the name of each raster is shown, but there is no option that I can see in the Raster to Netcdf tool to keep the raster names. Apparently, under the Fields to Dimensions in the tool, you can only choose numerical fields, not a character field.
I am working with ArcMap/ArcCatalog 10.8.1.
Thanks in advance for your help!