1

I have a single NetCDF file which has 3 variables named temperature, salinity and pressure and each of these variable have 3 dimensions which are lat,long and time. I want to display this file as a raster layer in ArcGIS Pro 2.7.3 but when I simply import it using multidimensional raster layer and using any of the output configurations, it displays nothing. How can I display it properly so I can publish it as a service (which I know already)? I am able to display files having a single variable.

1 Answer 1

1

According to Create Space Time Cube (GeoAnalytics), you can create a space-time cube and store it as a netCDF file. This can also be visualized in 2D or 3D However, as far as I know, it only handles a single variable. Maybe if you split the NetCDF file into 3 different files.

I could suggest using the xarray library in Python for initially handling the netCDF data for splitting. It also supports saving to a GeoTiff, but AFAIK only for single-layer rasters without a time dimension.

import xarray as xr

my_data = xr.load_dataset("my_file.nc")
my_data["salinity"].to_netcdf("salinity.nc")

and then load these netCDFs into ArcGIS? (The visualisation does specify that only datasets generated with the "Create Space time cube" can be loaded) Maybe you will have to add some metadata.

exporting as a (sequence of) rasters:

salinity = my_data["salinity"]

for t in salinity:
    salinity[t]rio.to_raster('salinity'+t+'.tif')

The iteration may be different dependent how your axes are ordered, see here for reference.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.