0

I have some netCDF data that I have been trying to import into ArcMap with ArcPy using the Make NetCDF Raster Layer tool. This should be straightforward, except I believe the structure of my NC files is not compatible with the arcpy.MakeNetCDFRasterLayer_md() function.

Each of my NC files are composed of a number of sub-directories in which the variables are stored. In other words, the variable, x_dim and y_dim variables/dimensions required in the MakeNetCDFRasterLayer_md function are located in different sub-directories in the main NC file, e.g.:

'C:/path_to_data/file_1.nc/4.4_KM_PRODUCTS/Aerosol_Optical_Depth' [variable]
'C:/path_to_data/file_1.nc/4.4_KM_PRODUCTS/GEOMETRY/Longitude' [x_dim]
'C:/path_to_data/file_1.nc/4.4_KM_PRODUCTS/GEOMETRY/Latitude' [y_dim]

This I believe is in contrast to the structure of most NC files, in which variables are contained within. I have tried calling on the path to the variables as follows:

arcpy.MakeNetCDFRasterLayer_md('file_1.nc', 'C:/path_to_data/file_1.nc/4.4_KM_PRODUCTS/Aerosol_Optical_Depth', 'C:/path_to_data/file_1.nc/4.4_KM_PRODUCTS/GEOMETRY/Longitude', 'C:/path_to_data/file_1.nc/4.4_KM_PRODUCTS/GEOMETRY/Latitude',
"test_make_netcdf")

But get the following error:

ERROR 002073: Dimension Longitude is either invalid or not defined. ERROR 002073: Dimension Latitude is either invalid or not defined.

There is probably a very simple fix for this but I have been sitting here for hours trying to figure it out. Is it impossible with arcpy.MakeNetCDFRasterLayer_md() to call on variables located in netCDF sub-directories?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.